Repository navigation
fix(web): wrap a page title's long word instead of cutting it off - #4974
Conversation
A page title with one word wider than its column (German "wiederherstellen" on a narrow phone with a large browser font) ran past the column and the app shell clipped its end. The shared page header, the plugin page header and the Settings sessions title now hyphenate such a word in the interface language, and break it anywhere when the browser has no hyphenation dictionary for that language. The sessions title's column also gets min-w-0 so it can shrink to the row instead of pushing past it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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 44 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. |
|
This PR merged at febee43. The description above was edited after the merge and describes later commits that never landed. What's on main: |
…lugin title on narrow screens (#5031) Page titles got automatic hyphenation in #4974. With balanced titles it also split words that fit on their own line: Polish "Zaplanowa- / ne zadania" on Scheduled tasks and "Aktywno- / ść Autoscan" on Autoscan Activity, which wrapped between words before. Titles now break inside a word only when that word can't fit on a line by itself. The plugin title's column kept a fixed 220 px minimum, so on a window narrower than about 270 px a long plugin name still ran past the page edge. The minimum is now capped at the available width. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Problem
Related issue: N/A
Validation tasks: none
Other clients: N/A (web layout fix; the Apple, Android and Roku apps lay out their own titles)
A page title with one word wider than its column was cut off at the right edge. On a narrow phone with a large browser font, the German backup restore title "Sicherung vom wiederherstellen" showed as "…wiederherstell": at 300 px with a 24 px browser font, the word is 322 px wide in a 252 px column, and the app shell clips the overflow. The Settings → Signed-in sessions title did the same in Danish ("Loginsessioner"). It also pushed its description past the column.
Now a word that can't fit on a line by itself breaks at the column edge and continues on the next line. Titles whose words fit wrap exactly as before.
Approach
The title in the shared admin and settings page header (
PageHeader) getsbreak-words(overflow-wrap: break-word), which breaks a word only when it can't fit on a line by itself. Two titles copy the header's classes instead of using the component, and they get the same rule:min-w-0, because as a flex item it otherwise grew to the word's width instead of letting the word wrap.The user detail header already wraps long words, and I left it unchanged. I kept the change to these class strings and didn't move the copies into a shared constant. That cleanup isn't needed for the fix.
A break at the column edge can leave a short tail: at 360 px the German title ends "wiederherstelle / n", because the word is a few pixels too wide for the line. I tried automatic hyphenation (
hyphens: auto) to get "wiederher- / stellen", but with balanced titles it also hyphenated words that fit on their own line, such as Polish "Zaplano- / wane zadania" where main shows "Zaplanowane / zadania". The change leaves it out, so only a word that would otherwise be cut off ever breaks.This doesn't overlap the Text Size work in #4861 and #4874. #4861 changes a font size two lines below the plugin title and leaves the title line alone. Neither PR touches title wrapping.
Validation
Evidence
Evidence: https://evidence.siloserver.org/r/silo-server/page-title-long-word-wrap/
Risks
None identified.
overflow-wrap: break-wordchanges nothing for a title whose words fit their line, and the plugin column's minimum changes only when the window is narrower than about 270 px.Follow-ups
Checklist
Council review
This ran as a follow-up of the #4938 review, so each round has one member instead of the council.
Background review: 2 rounds, last reviewed 706cf63
Fixed in round 1: hyphenation split a Polish word that fits whole ("Aktywno- / ść"), and the plugin title's 220 px column minimum clipped on a 230 px window (now capped at the available width). Fixed after round 2: hyphenation still split fitting words ("Zaplano- / wane zadania"), so b089c51 removes it. Round 2's review couldn't be posted (the GitHub connector returned an authorization error), so its one finding is recorded here. b089c51 only removes classes that round 2 reviewed, so that round's findings still hold for this head.
Visual review: 2 rounds, captures from febee43; the after set was recaptured on b089c51
Round 1 found the "wiederherstelle / n" tail at 360 px; round 2 reviewed the hyphenated version that fixed it. The background review then showed hyphenation splitting words that fit, so the final head goes back to round 1's rendering for the wide-word case, and I accepted the short tail as the lesser cost. Its captures are back to round 1's layout, measured line for line.
AI Disclosure
🤖 Generated with Claude Code