From 9159e6e58c9407a4ac164650b8098502e37263e9 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 23 May 2026 06:39:11 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20Enhance=20Personal=20?= =?UTF-8?q?Rating=20UX=20and=20accessibility=20in=20GameDetailHeader?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit introduces several micro-UX and accessibility improvements to the `GameDetailHeader` component: 1. **Clear Rating Feature**: Added a "Clear Rating" button next to the personal rating slider, allowing users to unset their rating. 2. **Semantic Elements**: Converted the folder path from a non-semantic `

` tag to a proper ` )} @@ -234,20 +235,21 @@ export function GameDetailHeader({ game, onGameUpdated, onPlatformChange, onFilt {game.igdb_id && ( )} {/* Folder path */} -

- 📁 + {game.folder_path} - -

+ + {/* Status badges */}
@@ -364,11 +366,25 @@ export function GameDetailHeader({ game, onGameUpdated, onPlatformChange, onFilt {/* Personal Rating */}
- {t('personalRating')} (0-100): {game.personal_rating !== null && game.personal_rating !== undefined ? `${game.personal_rating}/100` : '-'} + + {game.personal_rating !== null && game.personal_rating !== undefined && ( + + )}
- 0 + - 100 +
diff --git a/src/components/Library/GameScreenshotsCarousel.tsx b/src/components/Library/GameScreenshotsCarousel.tsx index 6a4e37c..bfae3b8 100644 --- a/src/components/Library/GameScreenshotsCarousel.tsx +++ b/src/components/Library/GameScreenshotsCarousel.tsx @@ -20,7 +20,6 @@ export function GameScreenshotsCarousel({ gameId }: GameScreenshotsCarouselProps const [igdbScreenshots, setIgdbScreenshots] = useState([]); const [currentIndex, setCurrentIndex] = useState(0); const [loading, setLoading] = useState(true); - const [hasIgdbId, setHasIgdbId] = useState(false); useEffect(() => { const loadScreenshots = async () => { @@ -29,7 +28,6 @@ export function GameScreenshotsCarousel({ gameId }: GameScreenshotsCarouselProps // Load game data to check IGDB ID try { const game = await invoke<{ igdb_id: number | null }>("get_game_by_id", { id: gameId }); - setHasIgdbId(!!game?.igdb_id); // Load IGDB screenshots if available if (game?.igdb_id) { diff --git a/src/i18n/translations.ts b/src/i18n/translations.ts index 1664377..17d5b4f 100644 --- a/src/i18n/translations.ts +++ b/src/i18n/translations.ts @@ -49,6 +49,7 @@ export const translations = { // Game Detail personalRating: 'Personal Rating', + clearRating: 'Clear Rating', notes: 'Notes', saveNotes: 'Save Notes', deleteGame: 'Delete Game', @@ -291,7 +292,7 @@ export const translations = { playTime: 'Play Time', hours: 'hours', platform: 'Platform', - platforms: 'Plateformes', + platforms: 'Platforms', selectPlatform: 'Select platform...', noPlatform: 'No platform', availableOnIGDB: 'Available on', @@ -435,6 +436,7 @@ export const translations = { // Game Detail personalRating: 'Note personnelle', + clearRating: 'Effacer la note', notes: 'Notes', saveNotes: 'Sauvegarder les notes', deleteGame: 'Supprimer le jeu',