fix(desktop): Stabilize Discover pagination bar width#545
Open
Augustas11 wants to merge 1 commit into
Open
Conversation
The pagination bar shifts horizontally as users navigate between pages because buildPaginationTokens returns 6 tokens at the edges (page <= 3 or page >= totalPages - 2) and 7 tokens for middle pages, with no reserved width on the .pagination container. Add min-width: 240px to .pagination so the container reserves space for the widest layout (7 tokens including two ellipses). Fixes AntSeed#498.
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.
Fixes #498.
Problem
The pagination bar at the bottom of the Discover page shifts horizontally as users navigate between pages.
buildPaginationTokensinapps/desktop/src/renderer/ui/components/chat/DiscoverWelcome.tsx:332returns:page <= 3orpage >= totalPages - 2):[1, 2, 3, '…', N-1, N][1, '…', p-1, p, p+1, '…', N].paginationhas no reserved width, so the container resizes with the token count and the bar visibly jumps.Fix
One-line CSS change: add
min-width: 240pxto.paginationinapps/desktop/src/renderer/ui/components/chat/DiscoverWelcome.module.scss. 240px holds the widest layout (7 tokens × 28px button min-width + 6 × 4px gaps + 2 ellipses + headroom for two-digit page numbers).Test plan
.pagination-barswitches toalign-items: flex-startDisclosure
This PR was drafted with assistance from a Claude Code agent. The change has been reviewed and is being submitted by me (@Augustas11).