Repository navigation
fix(claims): keep export dropdown within the viewport on small screens - #633
Merged
nonsobethel0-dev merged 2 commits intoSep 23, 2026
Conversation
Stack the page header on mobile and let the controls wrap, anchor the export menu to the left edge below sm (where the controls are left-aligned), cap its width to the viewport, and raise its z-index above the claims table.
Close the export menu on Escape, expose aria-haspopup/aria-expanded on the trigger and menu/menuitem roles on the dropdown. Add ClaimsPage tests covering the viewport-constrained menu classes and Escape close.
|
@posimideveloper Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
❌ Deploy Preview for boisterous-sunshine-dd4c4c failed.
|
nonsobethel0-dev
merged commit Sep 23, 2026
46c5008
into
Parashield-Protocol:main
0 of 4 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.
Problem
On narrow viewports the Claims page header didn't adapt:
flex justify-between) holding the title plus the Export, Pause and Refresh buttons, so on phone widths everything was squeezed into one line.absolute right-0 w-40with no viewport constraint. Anchored to the right edge of the Export button, it grew leftward and could run past its container or the screen edge. Itsz-20also left it in a fragile stacking position over the claims table below.Changes
Layout fix, commit 1 (
src/app/claims/page.tsx)flex-col→sm:flex-row), and the controls are left-aligned there and can wrap (flex-wrap).sm, where the controls are left-aligned, so it opens into the available space, and goes back toright-0fromsmup;max-w-[calc(100vw-3rem)](the viewport minus the page'spx-6padding), so it can never be wider than the screen;z-30, clearly above the table and the click-away backdrop (z-10).A portal (the issue's other suggestion) wasn't needed: the menu has no clipping ancestor, so constraining its anchor and width fixes the overflow with far less code.
Accessibility + tests, commit 2
aria-haspopup="menu"andaria-expanded; the menu usesrole="menu"and its optionsrole="menuitem".src/__tests__/ClaimsPage.test.tsx:aria-expanded, renders amenuwith the viewport-constraint and anchoring classes, and shows 2 items;Verification
npx vitest run src/__tests__/ClaimsPage.test.tsx: 2/2 pass.tsc --noEmitreports no errors in the touched files.Closes [bug] Claims page export dropdown clips over table border on small screens #546
Closes [bug] WithdrawModal does not explain why estimate is unavailable when user has 0 shares #544
Closes [a11y] Oracle page sort buttons missing aria-sort attribute #545
Closes [ux] Dashboard refresh button does not show loading state for claims fetch #547