PROJ-670: ProjectNav Priority+ More menu for mobile tab overflow - #297
Merged
Conversation
…y+ More menu (PROJ-670) Measures the nav row and each tab's natural width once, then shows as many leading tabs as fit with the rest collapsed into a "More ▾" menu (ResizeObserver-driven, no scroll). Highlights the More trigger when the active tab has overflowed into it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BjWZ86u91ZXsmGKoWC8vbx
3 tasks
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
ProjectNavwith a Priority+ pattern: as many leading tabs are shown as fit the available width, with the rest collapsed into a "More ▾" menu.ResizeObserver(falls back to showing all tabs if measurement is unavailable, e.g. containerWidth is 0 — this also keeps existing/unstubbed tests passing unchanged).aria-current="true"and active styling so the current section is still indicated.aria-haspopup="menu"/aria-expanded, and the menu closes on selection, outside click, and Escape (focus returns to the trigger).max-sm:overflow-x-autohorizontal scroll class — no more horizontal scrolling of the tab row at any width.Design decisions
display:noneelement reports 0 width in real browsers).clientWidth/offsetWidthonHTMLElement.prototype(jsdom doesn't compute real layout) to exercise the overflow math deterministically — seestubNavMeasurementsinProjectNav.test.tsx.Test plan
pnpm --filter @projektor/web test— all 680 tests pass (15 inProjectNav.test.tsx, including 5 new Priority+ overflow tests)pnpm --filter @projektor/web test:coverage— passespnpm turbo type-check --filter=@projektor/web— 0 errorspnpm biome checkon changed files — cleanpnpm --filter @projektor/web build— succeedsCloses PROJ-670.
🤖 Generated with Claude Code
https://claude.ai/code/session_01BjWZ86u91ZXsmGKoWC8vbx