fix: nav wrap bug + mobile spacing polish (#49) #50
No reviewers
Labels
No labels
domain:backend
domain:devops
domain:frontend
status:approved
status:in-progress
status:needs-fix
status:qa
type:bug
type:devops
type:feature
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
forgejo_admin/pal-e-api!50
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "49-visual-qa-polish"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Changes
src/pal_e_docs/templates/base.html:flex-basis: 100%→flex: 0 0 100%for.brand,.nav-links,.nav-authin mobile breakpoint; added.section { margin-bottom: 3rem }in mobile breakpointtests/test_mobile_responsive.py: added test #6test_nav_three_row_layout— verifies brand, nav-links, nav-auth have strictly increasing Y positions at 375pxTest Plan
PALDOCS_DATABASE_PATH=:memory: python -m pytest)test_nav_three_row_layout)Review Checklist
Related Notes
plan-2026-02-27-responsive-design-mobile-ux— Phase 3: Visual QA + polishReview Pass — Clean
Round 1 review: No issues found.
CSS Fix
flex: 0 0 100%correctly disables flex-shrink, forcing each nav child onto its own row. Root cause properly identified and fixed..sectionmargin bump (2.5rem → 3rem) is a modest, reasonable increase.Test
test_nav_three_row_layoutfollows existing test patterns and usesgetBoundingClientRect().topto verify 3-row stacking — correct approach.Verification
Ready for merge.
PR Review — Round 1
Scope
2 files changed (CSS + test only). No scope creep.
CSS Fix:
flex-basis: 100%→flex: 0 0 100%Correct fix. The shorthand locks
flex-grow: 0,flex-shrink: 0,flex-basis: 100%, eliminating the shrink loophole thatflex-basis: 100%alone leaves (defaultflex-shrink: 1could let the browser compress below 100%). Each nav child is now rigidly full-width inside the flex-wrap container — guaranteed 3 rows.All three changes are inside
@media (max-width: 600px). Desktop nav has no competingflexshorthand, so no regression risk.Mobile Section Spacing: 2.5rem → 3rem
Correctly overrides the desktop
.section { margin-bottom: 2.5rem; }base rule. Properly scoped inside the media query.Test:
test_nav_three_row_layoutGood test. Uses
getBoundingClientRect().topto verify strictly increasing Y positions for brand, nav-links, and nav-auth. Tests actual geometry, not just DOM existence. Clear assertion messages.Suggestions (non-blocking, can fix later)
links_top > brand_toppasses even if the gap is 0.1px. Alinks_top > brand_top + 5threshold would catch degenerate cases. Theoretical concern only — real content makes this moot.Verdict: ✅ APPROVE
Clean, minimal, correct. No blocking issues.