Repository navigation
fix(web): stop the phone admin header from cutting off title descenders - #4674
Conversation
The title in the sticky phone admin header used truncate with leading-none. truncate clips to the line box, and a 1em line box ends 1px below the baseline, so the bottom of "p", "g", and accented or non-Latin glyphs was sliced flat. Give the title leading-normal and drop its top margin. The taller line box holds descenders and accents in every shipped locale, its extra half-leading takes the margin's place, and long titles still end in an ellipsis. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 3 minutes. View limit details
|
Silo Kody — review completeReview finished. Check the inline comments for findings and verify each suggestion against the code and tests. Reviewing changes in Silo
Review settingsReview OptionsThe following review options are enabled or disabled:
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Problem
Related issue: N/A
Validation tasks: none
Other clients: N/A (browser layout fix in the web admin shell; the Apple, Android, and Roku apps don't render this header)
On phone and tablet widths, the sticky admin header cut off the bottom of the page title. The "p" in "Backups" and the "g" in "Settings" were sliced flat. Marks above and below the letters went too: Thai "Plugins" lost its tone mark, and the Vietnamese "Tasks" title read "Tác vu" instead of "Tác vụ". This change gives the title a line box tall enough for its letters, so they show whole and long titles still end in an ellipsis.
The title used
truncate, which clips to the element's box, together withleading-none, which makes that box exactly one font size tall. At 15 px, Plus Jakarta Sans descenders reach about 3 px below the baseline, but the box ended 1 px below it.Approach
The title now uses
leading-normal(1.5) and no longer hasmt-1. The extra half-leading (3.75 px) takes the place of the 4 px margin, so the gap between the "ADMIN" eyebrow and the title stays the same. The header's height doesn't change, because its 44 px buttons set it. The two-line text stack now sits about 2 px higher, since its box includes the room below the baseline.A smaller line height isn't enough. I rendered every shipped locale's header titles at each candidate.
leading-tightstill clips Thai, Arabic, Hindi, and some Latin accented capitals, andleading-snugstill clips Thai and Arabic by about 1 px.leading-normalleaves nothing visible outside the box. Since the title box now starts right under the eyebrow, I also checked that marks above a title don't run into marks below a translated eyebrow. Across eight locales, at default, large, and x-large text and at 320 px, none touch.Other web elements combine
truncateorline-clampwithleading-tight. I haven't confirmed that any of them visibly clips, so they aren't part of this change.Validation
main(66b836f) and from this branch, at 393 px. Onmain, "Backups", "Settings", and "Client Diagnostics" each lose 2 to 2.3 px of their descenders. On this branch, nothing is clipped, and "Client Diagnostics" still truncates with an ellipsis at 320 px.make test-webon Node 24 passes (303 files, 3050 tests).Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/admin-mobile-header-descenders/
Risks
None identified. The change is limited to the class list of one element in the web admin shell, shown below 1024 px.
Checklist
Council review
Background adversarial review of the head commit:
Visual review: 2 rounds, captures from d9974aa
Follow-up: Sol found that the Thai Plugins title still loses 1 px off the top of its tone mark when the UI font hasn't loaded. That clipping was worse before this change and is tracked in #4676, to follow this PR. Gemini noted that the header's
sticky top-0never pins, because the admin root wrapper'soverflow-x-hiddenmakes it a scroll container. That was already the case before this change, and it's being fixed separately.Fixed: captures taken while the navigation drawer was still closing were retaken. Answered: the Thai tone mark sits close to the eyebrow but doesn't touch it at any text size, and the 2 px rise of the text stack was kept.
AI Disclosure
🤖 Generated with Claude Code
Note
Fix descender clipping in phone admin header title in
AdminLayoutContentChanges the mobile header title span in AdminLayout.tsx from tight line height plus top margin to normal line height with no margin. Tight leading clipped descenders and accents when the title truncated. A comment now documents this.
Macroscope summarized d9974aa.