Add reusable logbook entity thumbnails#159
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Owner
Author
|
Implements #98 |
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.
Motivation
data:image sources.object-fitbehavior for previews and thumbnails.Description
app/components/logbook/EntityImage.tsxwhich accepts a stored image payload (StoredImage | string | null | undefined), anentityType(boat | crew | sheet),alttext, and avariant(thumb | list | preview | header), and renders either an<img>with adata:${mimeType};base64,...source or an accessible fallback icon. (EntityImage,getImageSource).picture-thumbinapp/components/logbook/pages/LogbookListPage.tsxwithEntityImagefor boat thumbnails.EntityImageusage to boat list entries inapp/components/logbook/pages/BoatManagerPage.tsx, crew list entries inapp/components/logbook/pages/CrewManagerPage.tsx, and sheet preview/header rendering inapp/components/logbook/pages/LogbookDetailsPage.tsx(including preview areas and the sheet header).app/globals.cssandapp/styles/design-refresh.cssto style.entity-imagevariants for circular crew avatars, rounded thumbnails, list/preview/header sizes,object-fitrules, and fallback visuals.Testing
npm test(Vitest): all test files passed (23 passed,134 passed | 12 skippedin the run shown). — Success.npm run typecheck(tsc --noEmit): no type errors — Success.npm run lint(eslint .): linting completed; initial unused eslint-disable warnings were fixed and final lint succeeded — Success.Codex Task