Skip to content

fix(header): keep search and theme toggle visible on small laptops#11559

Merged
mergify[bot] merged 1 commit into
mainfrom
devs/jd/fix/header-overflow-small-laptop/keep-search-theme-toggle-visible-small-laptops--d5196600
May 20, 2026
Merged

fix(header): keep search and theme toggle visible on small laptops#11559
mergify[bot] merged 1 commit into
mainfrom
devs/jd/fix/header-overflow-small-laptop/keep-search-theme-toggle-visible-small-laptops--d5196600

Conversation

@jd
Copy link
Copy Markdown
Member

@jd jd commented May 19, 2026

On screens narrower than ~80em, the sidebar (17rem) plus 5 nav links
plus search bar plus theme toggle didn't fit in the header. The
flex-wrap: wrap rule pushed nav-actions to a second row, where the
header's overflow: hidden and fixed height clipped them — so search
and theme toggle vanished on the small-laptop range.

Behavior by viewport:

  • 80em: full label + icon for all 5 nav links

  • 60–80em (small laptop): icon-only nav links; labels visually hidden
    (kept in the DOM for screen readers and keyboard focus)
  • <60em: nav links hidden entirely

Also drop the broken flex-wrap: wrap + max-width:35em rule that tried
to put nav-actions on a second row inside a fixed-height
overflow-hidden container.

Co-Authored-By: Claude Opus 4.7 noreply@anthropic.com

Copilot AI review requested due to automatic review settings May 19, 2026 14:08
@mergify mergify Bot had a problem deploying to Mergify Merge Protections May 19, 2026 14:08 Failure
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 19, 2026

Merge Protections

Your pull request matches the following merge protections and will not be merged until they are valid.

🟢 🤖 Continuous Integration

Wonderful, this rule succeeded.
  • all of:
    • check-success = build
    • check-success = lint
    • check-success = test
    • any of:
      • check-success = test-broken-links
      • label = ignore-broken-links
    • any of:
      • check-success=Cloudflare Pages
      • -head-repo-full-name~=^Mergifyio/

🟢 👀 Review Requirements

Wonderful, this rule succeeded.
  • any of:
    • #approved-reviews-by >= 2
    • author = dependabot[bot]
    • author = mergify-ci-bot

🟢 Enforce conventional commit

Wonderful, this rule succeeded.

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?:

🟢 🔎 Reviews

Wonderful, this rule succeeded.
  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

Wonderful, this rule succeeded.
  • body ~= (?ms:.{48,})

@mergify mergify Bot requested a review from a team May 19, 2026 14:10
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts the header’s responsive layout so that search and the theme toggle remain visible on “small laptop” widths by preventing the header flex layout from wrapping/clipping, and by reducing the space taken by nav links in intermediate viewports.

Changes:

  • Prevent header content from wrapping by switching .nav-wrapper to flex-wrap: nowrap and removing the prior “second row” responsive rule for .nav-actions.
  • Add a .header-btn-label wrapper around header link text so labels can be visually hidden (icon-only) between 60em–80em while remaining accessible to screen readers.
  • Hide the nav links entirely under 60em to prioritize search + theme toggle.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/components/Header/HeaderLink.astro Wraps link label content in a span so it can be selectively visually hidden at certain breakpoints.
src/components/Header/Header.astro Updates header/nav flex behavior and adds breakpoint-specific rules for hiding nav links and/or their labels.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/Header/Header.astro
@jd jd marked this pull request as ready for review May 19, 2026 14:55
On screens narrower than ~80em, the sidebar (17rem) plus 5 nav links
plus search bar plus theme toggle didn't fit in the header. The
`flex-wrap: wrap` rule pushed nav-actions to a second row, where the
header's `overflow: hidden` and fixed height clipped them — so search
and theme toggle vanished on the small-laptop range.

Behavior by viewport:
- >80em: full label + icon for all 5 nav links
- 60–80em (small laptop): icon-only nav links; labels visually hidden
  (kept in the DOM for screen readers and keyboard focus)
- <60em: nav links hidden entirely

Also drop the broken `flex-wrap: wrap` + max-width:35em rule that tried
to put nav-actions on a second row inside a fixed-height
overflow-hidden container.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

Change-Id: Id5196600f9ca7765ada1d956082773ba75f950fc
@jd jd force-pushed the devs/jd/fix/header-overflow-small-laptop/keep-search-theme-toggle-visible-small-laptops--d5196600 branch from 81eb46b to 0679d7e Compare May 19, 2026 14:57
@jd
Copy link
Copy Markdown
Member Author

jd commented May 19, 2026

Revision history

# Type Changes Reason Date
1 initial 81eb46b 2026-05-19 14:57 UTC
2 content 81eb46b → 0679d7e (raw) 2026-05-19 14:57 UTC

@mergify mergify Bot deployed to Mergify Merge Protections May 19, 2026 14:57 Active
@mergify mergify Bot requested a review from a team May 19, 2026 16:54
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented May 19, 2026

Merge Queue Status

This pull request spent 13 hours 39 minutes 20 seconds in the queue, including 2 minutes 20 seconds running CI.

Required conditions to merge

mergify Bot added a commit that referenced this pull request May 19, 2026
@mergify mergify Bot added the queued label May 19, 2026
mergify Bot added a commit that referenced this pull request May 19, 2026
@mergify mergify Bot merged commit 16a16a8 into main May 20, 2026
8 checks passed
@mergify mergify Bot deleted the devs/jd/fix/header-overflow-small-laptop/keep-search-theme-toggle-visible-small-laptops--d5196600 branch May 20, 2026 07:02
@mergify mergify Bot removed the queued label May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants