PostCard: media-kind placeholder label in the reserved thumb box - #207
Merged
Conversation
…humb box
PostCard reserved its thumbnail column only for a decoded image; a card whose
post declared media but whose image had not yet landed drew a blank SurfaceAlt
box. The historical feed card drew the media kind ("image"/"video") centred in
that box while loading, so the migration to PostCard read as "thumbnails not
loading".
Add ThumbPlaceholder: a non-empty value reserves the thumbnail column even while
Thumbnail is nil (so the card does not reflow when the image arrives) and draws
the label centred in dim ink on the muted ground, reproducing the old loading
card. Column geometry now keys off reservesThumb (image OR placeholder) rather
than hasThumb (image only). The label is skipped when it has no font or would
not fit the box.
100% statement coverage; gofmt clean.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
What
PostCardreserved its thumbnail column only once a decoded image was present. A card whose post declares media but whose image has not yet landed drew a blankSurfaceAltbox. The reader's historical feed card drew the media kind (image/video) centred in that box while loading — so the toolkit migration read as "thumbnails not loading".Change
ThumbPlaceholder string(e.g."image","video").Thumbnailis nil, so the card does not reflow (grow a column) when the image finally lands.postThumbdraws the label centred in dim ink on the muted ground when no image is present, reproducing the old loading card.reservesThumb()(image or placeholder) instead ofhasThumb()(image only).Tests / gates
gofmtclean;go vetclean.🤖 Generated with Claude Code