Add ellipsis truncation to saved export thumbnail row#40
Open
LukeNeedham wants to merge 8 commits into
Open
Conversation
When there are too many thumbnails to fit in a saved export item card, show the first N thumbnails, an ellipsis, then the last N thumbnails with equal counts on each side. Thumbnails fill the full card width. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qzxef2rAmtdRCKNa3khDs8
Thumbnails are always 40dp wide. When all fit, they align naturally without stretching to fill the card width. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qzxef2rAmtdRCKNa3khDs8
|
App apk at:
|
When thumbnails overflow, the row fills the card width with thumbnails flush to both edges. The ellipsis uses weight(1f) to absorb extra space in the middle. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qzxef2rAmtdRCKNa3khDs8
New column on SavedExportEntity with defaultValue=0 so no migration is needed (fallbackToDestructiveMigration handles existing installs). Query now sorts by timestampCreated DESC. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qzxef2rAmtdRCKNa3khDs8
No existing installs, so no migration handling needed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qzxef2rAmtdRCKNa3khDs8
LukeNeedham
commented
Jun 24, 2026
| import com.lukeneedham.videodiary.ui.theme.Typography | ||
| import java.io.File | ||
|
|
||
| private val ThumbnailHeight = 60.dp |
Owner
Author
There was a problem hiding this comment.
Should be deleted, thumbnail height is entirely driven by the intrinsic height of the thumbnail, only width is fixed
| for (file in firstThumbnails) { | ||
| ThumbnailImage(file = file) | ||
| } | ||
| Text( |
Owner
Author
There was a problem hiding this comment.
Use an ellipsis image here with fixed width, and reuse that fixed width in the calculations for whether to show ellipsis
| } | ||
| } else { | ||
| val maxWithEllipsis = maxThumbnailCountWithEllipsis(maxWidth) | ||
| val sideCount = maxWithEllipsis / 2 |
Owner
Author
There was a problem hiding this comment.
Ok slight change in logic, if maxwithellipsis is odd then show the extra one in the first items. So if we have space for 5 thumbnails, show 3 first items, then ellipsis, then 2 last items
- Remove ThumbnailHeight; thumbnail height is driven by intrinsic image height, only width is fixed at 40dp - Replace Text ellipsis with Image using new ellipsis vector drawable - When odd number of thumbnails fit, extra one goes to the first items Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qzxef2rAmtdRCKNa3khDs8
ContentScale.Crop requires both dimensions constrained. Since thumbnail height is intrinsic, use FillWidth which only needs the width. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qzxef2rAmtdRCKNa3khDs8
One dimension is always fixed; the other is known from the aspect ratio, so ContentScale is never needed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Qzxef2rAmtdRCKNa3khDs8
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.
Summary
ContentScale.CropLazyRowwith a measuredBoxWithConstraintslayout that calculates how many thumbnails fit based on a minimum thumbnail width (40dp)Original TODO
Test plan
🤖 Generated with Claude Code
https://claude.ai/code/session_01Qzxef2rAmtdRCKNa3khDs8
Generated by Claude Code