Repository navigation
feat(frontend): repli image manquante sur les cartes du catalogue - #107
Merged
regulardesigner merged 1 commit intoNov 29, 2026
Merged
Conversation
regulardesigner
merged commit Nov 29, 2026
8cf0295
into
integration/catalog-staging
12 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pourquoi
Même avec les variantes de date, certaines photos restent absentes du bucket. Une balise
<img>en échec laisse une vignette cassée dans la grille, sans information pour l’utilisateur.Changements
CatalogPhoto: écouteonErroret remplace l’image par un bloc gris clair avec le texte « Image manquante ».IndividualCardreste Server Component et délègue uniquement la vignette.catalog-card-photo-fallbackdans la feuille wireframe existante, même hauteur que la photo (150 px).erroraffiche le bloc et retire l’<img>.photos.storage_key.Comment tester
npm run lint,npm run format:check,npm test,npm run build: OK./catalogueet forcer une image indisponible (ex. blocage réseau sur/api/catalog/photos/…) : le bloc gris « Image manquante » apparaît à la place de la vignette cassée.Limites connues
Le repli est déclenché par l’événement
onErrordu navigateur ; il ne présélectionne pas l’autre côté quand il existe. Le texte est volontairement générique, sans code ni nom de personne.Suite
Quand l’ingestion écrira
photos.storage_keyetis_available, ce composant pourra être simplifié : l’API renverra directement une image disponible ou un état explicite.Checks exécutés
lint✅ ·format:check✅ ·npm test(17 tests, dont 1 nouveau test de composant) ✅ ·build✅.