fix: header breakpoints with headroom for wider system fonts (1.3.1) #29

Open
oliver.maklott wants to merge 0 commits from oliver.maklott/fix-header-breakpoints into main AGit

Header items overlapped at some viewport widths (navigation under the school title, or under the logo once the title is hidden).

Cause: the navigation breakpoints (D015) were the exact entry widths measured in the e2e container, whose system-ui resolves to a narrow fallback font. Real UI fonts are wider: measured in the container, Arial-metric fonts (Liberation Sans, FreeSans) are about 7 % wider than the fallback for the full navigation, and the reported screenshots match that. The navigation box shrank correctly, but its right-aligned list spilled left under the brand.

Fix

  • The label part of every threshold carries 17 % headroom: Arial metrics plus room for slightly wider fonts such as Noto Sans or SF. The icon part doesn't change with the font. Example (admin + teacher): labels turn into icons below 63 / 48.5 / 35.75 rem of navigation width instead of 56.5 / 44 / 33.
  • e2e/02-header: new check that the first entry starts after the brand. The old checks couldn't see left overflow, because it doesn't show up in scrollWidth. The test also sweeps 560–1720 px in 40 px steps with Liberation Sans at 100 % and 200 % text, inside the existing session (the login rate limit is 30 per 5 min, and the suite is close to it).
  • Verified: on the old breakpoints the new test fails at 920 px ("nav slides under the brand"); on the new ones the full suite passes.
  • .gitignore: /Screenshot_*.png, so review screenshots with real names can't be committed.

Version 1.3.1.

Local: check ✓, e2e 42 ✓.

🤖 Generated with Claude Code

Header items overlapped at some viewport widths (navigation under the school title, or under the logo once the title is hidden). **Cause:** the navigation breakpoints (D015) were the exact entry widths measured in the e2e container, whose `system-ui` resolves to a narrow fallback font. Real UI fonts are wider: measured in the container, Arial-metric fonts (Liberation Sans, FreeSans) are about 7 % wider than the fallback for the full navigation, and the reported screenshots match that. The navigation box shrank correctly, but its right-aligned list spilled left under the brand. **Fix** - The label part of every threshold carries 17 % headroom: Arial metrics plus room for slightly wider fonts such as Noto Sans or SF. The icon part doesn't change with the font. Example (admin + teacher): labels turn into icons below 63 / 48.5 / 35.75 rem of navigation width instead of 56.5 / 44 / 33. - `e2e/02-header`: new check that the first entry starts after the brand. The old checks couldn't see left overflow, because it doesn't show up in `scrollWidth`. The test also sweeps 560–1720 px in 40 px steps with Liberation Sans at 100 % and 200 % text, inside the existing session (the login rate limit is 30 per 5 min, and the suite is close to it). - Verified: on the old breakpoints the new test fails at 920 px ("nav slides under the brand"); on the new ones the full suite passes. - `.gitignore`: `/Screenshot_*.png`, so review screenshots with real names can't be committed. Version 1.3.1. Local: check ✓, e2e 42 ✓. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix: header breakpoints with headroom for wider system fonts (1.3.1)
All checks were successful
Test / test (pull_request) Successful in 31s
Check / check (pull_request) Successful in 56s
E2E / e2e (pull_request) Successful in 4m36s
Check / check (push) Successful in 1m17s
Publish / publish (push) Successful in 54s
Test / test (push) Successful in 35s
E2E / e2e (push) Successful in 4m30s
33d4a82e64
The navigation thresholds matched the e2e container's fallback font
exactly; with Arial-metric or similar UI fonts (~7–10 % wider) the
navigation slid under the title or the logo. The label part of every
threshold now carries 17 % headroom (icons are font-independent).

The header e2e test missed this: the list is right-aligned, so its
overflow spills to the left without showing in scrollWidth. It now
checks that the first entry starts after the brand, and sweeps widths in
40 px steps with Liberation Sans (Arial metrics) at 100 % and 200 % text,
in the existing session (the login rate limit leaves no room for more
logins). Against the old breakpoints it fails at 920 px, as reported.
Screenshots in the repository root are ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
All checks were successful
Test / test (pull_request) Successful in 31s
Check / check (pull_request) Successful in 56s
E2E / e2e (pull_request) Successful in 4m36s
Check / check (push) Successful in 1m17s
Publish / publish (push) Successful in 54s
Test / test (push) Successful in 35s
E2E / e2e (push) Successful in 4m30s
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin +refs/pull/29/head:oliver.maklott/fix-header-breakpoints
git switch oliver.maklott/fix-header-breakpoints

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch main
git merge --no-ff oliver.maklott/fix-header-breakpoints
git switch oliver.maklott/fix-header-breakpoints
git rebase main
git switch main
git merge --ff-only oliver.maklott/fix-header-breakpoints
git switch oliver.maklott/fix-header-breakpoints
git rebase main
git switch main
git merge --no-ff oliver.maklott/fix-header-breakpoints
git switch main
git merge --squash oliver.maklott/fix-header-breakpoints
git switch main
git merge --ff-only oliver.maklott/fix-header-breakpoints
git switch main
git merge oliver.maklott/fix-header-breakpoints
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mehrerau/lvb!29
No description provided.