Skip to content

fix: header navigation overflows the window between 768px and 1080px (#288) - #291

Merged
frano-m merged 1 commit into
mainfrom
frano-m/288-header-nav-overflow
Nov 2, 2026
Merged

frano-m merged 1 commit into
mainfrom
frano-m/288-header-nav-overflow

Conversation

@frano-m

@frano-m frano-m commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #288

What changed

  • New site-config/hprc-data-explorer/local/navigation.ts holds the header navigation (HEADER_NAVIGATION); local/config.ts now just references it. prod/config.ts spreads the local config, so prod gets the same change.
  • At the sm breakpoint (768–1279px) the header shows: logo · Samples · Sequencing Data · More ▾ · Help & Documentation ▾.
    • "More ▾" holds Assemblies, Annotations and Alignments. It uses findable-ui's per-breakpoint flatten, so at every other breakpoint the menu is replaced by its three links in the same position.
    • "HPRC Website" moves to the top of the "Help & Documentation" menu at sm (findable-ui's per-breakpoint visible), as a plain label. The external-link icon stays only on the top-level link, where it was before.
  • From 1280px up the full bar is unchanged, and below 768px the drawer menu is unchanged.

Why

The full header (logo, five data links, "HPRC Website" and "Help & Documentation") needs about 1,085px. findable-ui only collapses to the hamburger menu below 768px, so between 768 and ~1,080px the nav overflowed the header and the window. This follows the same site-config pattern brc-analytics uses for its header ("More" menu at sm).

Assumptions I made

  • The fix lives in hprc's site config, not findable-ui (decided on the issue). A findable-ui change (e.g. a configurable collapse breakpoint) would help other sites, but isn't part of this PR.
  • Only two data links stay in the bar at sm: with a third (Assemblies) the bar needs ~800px and would still overflow at 768px.
  • "HPRC Website" goes in the help menu rather than "More", so "More" holds only data pages.
  • The flatten / visible maps list findable-ui's current breakpoints (xs, sm, md, lg). If findable-ui ever adds a breakpoint, these maps would need that key.
  • The header comes from the findable-ui version in use: 58.0.0.

How to verify

Run npm run build:local && npx serve out, open /assemblies, and resize the browser window (or use devtools' responsive mode).

Definition of done Step Expected
At every width from 320px to 1600px, nothing in the header extends past the header's or the window's right edge, and no page content shows beside the header. Drag the window width slowly from 1600px down to 320px. The header always spans the full width; nothing is cut off or spills past the right edge. Below 768px it shows the hamburger.
Every nav item is reachable at every width, either in the bar or in the menu. At 900px, open "More ▾" and "Help & Documentation ▾". At 390px, open the hamburger menu. "More" lists Assemblies, Annotations, Alignments; the help menu starts with "HPRC Website". At 390px the drawer lists all five data pages, HPRC Website and Help & Documentation.
Checked at 768, 900, 1024, 1080 and 1440px on main with the findable-ui version in use at the time. Check each width. 768/900/1024/1080: Samples · Sequencing Data · More ▾ · Help & Documentation ▾, all fitting. 1440: full bar, unchanged.

Also check that on /assemblies at 900px "More ▾" is highlighted as the current section.

Automated checks run locally: a Chromium sweep of every width from 1600 to 320px in 10px steps (129 widths, no header overflow), tsc, eslint, prettier --check, npm run build:local, and Playwright e2e (75/75 pass).

Screenshots

hprc-data-explorer-288-header-nav-resize.webm

🤖 Generated with Claude Code
🐦 Built with cc-claude-tools

…288)

at the sm breakpoint (768-1279px) assemblies, annotations and alignments
move into a "more" menu (findable-ui flatten) and "hprc website" moves into
the "help & documentation" menu (findable-ui visible). the header navigation
config moves from config.ts to navigation.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: cc-claude-tools <cc-claude-tools@clevercanary.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the responsive header-navigation changes.

No open issues 🎉

What changed in this PR

This PR addresses #288 by regrouping HPRC header navigation at tablet and smaller desktop widths, while preserving the full desktop bar and mobile drawer layout.

Changes:

  • Extracts header navigation into a dedicated configuration module.
  • At 768–1279px, groups Assemblies, Annotations and Alignments under “More” and moves “HPRC Website” into “Help & Documentation.”
  • Uses breakpoint-specific visibility and flattening to retain the existing navigation at other widths.
File Description
site-config/​hprc-data-explorer/​local/​navigation.ts Defines shared header navigation with responsive grouping and visibility.
site-config/​hprc-data-explorer/​local/​config.ts Replaces inline navigation with the extracted configuration.

Review effort: Balanced

@frano-m
frano-m marked this pull request as ready for review November 2, 2026 01:13
@frano-m
frano-m merged commit d6e0fa8 into main Nov 2, 2026
3 checks passed
@frano-m
frano-m deleted the frano-m/288-header-nav-overflow branch November 2, 2026 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Header navigation overflows the window between 768px and 1080px

3 participants