Skip to content

Store Icons added to the list, capsule and hero items.#419

Merged
utkarshdalal merged 2 commits intoutkarshdalal:masterfrom
phobos665:store-icons
Jan 16, 2026
Merged

Store Icons added to the list, capsule and hero items.#419
utkarshdalal merged 2 commits intoutkarshdalal:masterfrom
phobos665:store-icons

Conversation

@phobos665
Copy link
Contributor

@phobos665 phobos665 commented Jan 15, 2026

This PR adds the Game Source Icons for stores.

Supports:

  • Steam
  • GOG
  • Custom Games

Also updated the GOG Icon to a rounder icon.

New Screens:
custom-steam-example
gog-example

Summary by CodeRabbit

  • New Features

    • Added visual indicators displaying game source (Steam, GOG, custom games) in the library view alongside compatibility status.
  • Style

    • Adjusted layout spacing and icon sizing for improved visual clarity.
    • Condensed compatibility status messaging for a cleaner interface.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 15, 2026

📝 Walkthrough

Walkthrough

A new GameSourceIcon composable was added to display game source indicators (STEAM, CUSTOM_GAME, GOG) within library item headers. The composable was integrated into LibraryAppItem, replacing the status text-only display with a row containing both status and icon. Minor UI adjustments and string resource updates accompany the changes.

Changes

Cohort / File(s) Summary
UI Components
app/src/main/java/app/gamenative/ui/screen/library/components/LibraryAppItem.kt, app/src/main/java/app/gamenative/ui/screen/library/components/LibraryBottomSheet.kt
Added public GameSourceIcon composable with conditional rendering for different game sources. Integrated into AppItem header overlay (changed alignment from TopCenter to TopStart), replacing single Text with Row. Reorganized imports; standardized FlowRow spacing and formatting; increased GOG icon size from 24.dp to 28.dp.
String Resources
app/src/main/res/values/strings.xml
Updated library_compatibility_unknown string value from "Compatibility Unknown" to "Unknown".

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 Icons bloom like clover in spring,
Game sources now display their zing,
From Steam to GOG, the sources shine,
In library rows, so fine, so fine! 🎮✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'Store Icons added to the list, capsule and hero items' accurately describes the main change: adding game source icons (Steam, GOG, Custom Games) to multiple UI components throughout the library screen.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

painter = painterResource(R.drawable.ic_gog),
contentDescription = "GOG",
modifier = Modifier.size(24.dp)
modifier = Modifier.size(28.dp),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the GOG icon size in the filter as it was slightly too small

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@app/src/main/java/app/gamenative/ui/screen/library/components/LibraryAppItem.kt`:
- Line 503: The local variable alpha is created with an incorrect key usage via
remember(Int) and appears unused; replace remember(Int) with remember { 1f } or
remove the alpha declaration if dead, and similarly remove or rename the inner
hideText that shadows the outer scope (in LibraryAppItem / GameInfoBlock) to
avoid shadowing and dead code—either keep the variables only if they will be
used later (initialize correctly with remember { ... }) or delete both unused
alpha and the inner hideText to clean up the component.
🧹 Nitpick comments (1)
app/src/main/java/app/gamenative/ui/screen/library/components/LibraryAppItem.kt (1)

609-616: Consider using string resources for content descriptions and fix capitalization.

The hardcoded content descriptions should use string resources for internationalization support. Also, "Gog" should be "GOG" for consistency with the rest of the codebase (e.g., line 110 in LibraryBottomSheet.kt uses "GOG").

♻️ Suggested improvement
 `@Composable`
 fun GameSourceIcon(gameSource: GameSource, modifier: Modifier = Modifier, iconSize: Int = 12) {
     when (gameSource) {
-        GameSource.STEAM -> Icon(imageVector = Icons.Filled.Steam, contentDescription = "Steam", modifier = modifier.size(iconSize.dp).alpha(0.7f))
-        GameSource.CUSTOM_GAME -> Icon(imageVector = Icons.Filled.Folder, contentDescription = "Custom Game", modifier = modifier.size(iconSize.dp).alpha(0.7f))
-        GameSource.GOG -> Icon(painter = painterResource(R.drawable.ic_gog), contentDescription = "Gog", modifier = modifier.size(iconSize.dp).alpha(0.7f))
+        GameSource.STEAM -> Icon(imageVector = Icons.Filled.Steam, contentDescription = stringResource(R.string.library_source_steam), modifier = modifier.size(iconSize.dp).alpha(0.7f))
+        GameSource.CUSTOM_GAME -> Icon(imageVector = Icons.Filled.Folder, contentDescription = stringResource(R.string.library_source_custom), modifier = modifier.size(iconSize.dp).alpha(0.7f))
+        GameSource.GOG -> Icon(painter = painterResource(R.drawable.ic_gog), contentDescription = "GOG", modifier = modifier.size(iconSize.dp).alpha(0.7f))
     }
 }
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9816825 and 2bfe94c.

⛔ Files ignored due to path filters (1)
  • app/src/main/res/drawable/ic_gog.png is excluded by !**/*.png
📒 Files selected for processing (3)
  • app/src/main/java/app/gamenative/ui/screen/library/components/LibraryAppItem.kt
  • app/src/main/java/app/gamenative/ui/screen/library/components/LibraryBottomSheet.kt
  • app/src/main/res/values/strings.xml
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-12-17T05:14:05.133Z
Learnt from: utkarshdalal
Repo: utkarshdalal/GameNative PR: 344
File: app/src/main/java/app/gamenative/service/SteamAutoCloud.kt:415-419
Timestamp: 2025-12-17T05:14:05.133Z
Learning: In SteamAutoCloud.kt, when uploading files to Steam Cloud API (beginFileUpload and commitFileUpload), the filename parameter intentionally uses different formats: `file.path + file.filename` (relative path without placeholder) when `appInfo.ufs.saveFilePatterns.isEmpty()` is true (fallback case), and `file.prefixPath` (includes placeholder like %SteamUserData%) when patterns are configured. This difference is by design.

Applied to files:

  • app/src/main/java/app/gamenative/ui/screen/library/components/LibraryAppItem.kt
📚 Learning: 2025-09-19T17:07:27.941Z
Learnt from: utkarshdalal
Repo: utkarshdalal/GameNative PR: 159
File: app/src/main/java/app/gamenative/service/DownloadService.kt:6-6
Timestamp: 2025-09-19T17:07:27.941Z
Learning: In app/src/main/java/app/gamenative/service/DownloadService.kt, the getSizeFromStoreDisplay() function uses runBlocking to call SteamService.getDownloadableDepots() because the latter was converted from synchronous to suspend in this PR. The user confirmed the previous synchronous implementation worked fine, and if performance is acceptable, keeping runBlocking is a valid approach.

Applied to files:

  • app/src/main/java/app/gamenative/ui/screen/library/components/LibraryAppItem.kt
🧬 Code graph analysis (1)
app/src/main/java/app/gamenative/ui/screen/library/components/LibraryAppItem.kt (2)
app/src/main/java/app/gamenative/ui/util/Images.kt (1)
  • ListItemImage (24-51)
app/src/main/java/app/gamenative/ui/screen/library/appscreen/CustomGameAppScreen.kt (1)
  • findSteamGridDBImage (83-90)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build
🔇 Additional comments (8)
app/src/main/res/values/strings.xml (1)

797-797: LGTM!

The shortened label "Unknown" is more concise and consistent with the other compatibility status labels displayed in the UI.

app/src/main/java/app/gamenative/ui/screen/library/components/LibraryBottomSheet.kt (3)

12-34: LGTM!

The new imports are correctly added to support the icon rendering and game source display functionality.


56-57: LGTM!

The consistent verticalArrangement = Arrangement.spacedBy(12.dp) across FlowRow components improves chip spacing uniformity.

Also applies to: 93-94, 126-128


112-119: LGTM!

The GOG icon size increase to 28.dp improves visual consistency with the other store icons.

app/src/main/java/app/gamenative/ui/screen/library/components/LibraryAppItem.kt (4)

300-318: LGTM!

The header overlay layout with SpaceBetween arrangement effectively positions the compatibility status on the left and the game source icon on the right, providing a clean visual hierarchy.


213-268: LGTM!

The image URL resolution logic correctly handles all three game sources with appropriate fallbacks to Steam CDN URLs for custom games when local SteamGridDB images aren't available.


600-603: LGTM!

The GameSourceIcon integration in GameInfoBlock is consistent with the header overlay implementation.


622-737: LGTM!

The preview functions are updated appropriately to demonstrate the new GameSourceIcon functionality with different game sources and compatibility states.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

@utkarshdalal utkarshdalal merged commit 9a59fac into utkarshdalal:master Jan 16, 2026
2 checks passed
@coderabbitai coderabbitai bot mentioned this pull request Jan 20, 2026
@coderabbitai coderabbitai bot mentioned this pull request Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants