Repository navigation
fix(push-notice): keep Dismiss on the screen at 320 px with large Japanese text - #3531
Conversation
…anese text On a 320 px phone in Japanese at the 20 px interface text size, the alerts notice's repair label was wider than the room beside the dismiss button even with the sentence cut to nothing, so the dismiss button ended 21 px past the right edge. The sentence now gives up its width first and the label then wraps inside its button, which grows in height; the dismiss button keeps its size and place. Where the label fits, the line is unchanged. Fixes #3498 Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
Merge passMerged head
Merged with these checks red, none of them required: ssh;
|
What was wrong
On a 320 px phone in Japanese at the 20 px interface text size, the alerts health notice (the one-line
banner from #3485) pushed its Dismiss button past the right edge of the screen. The repair button's
label (
通知をもう一度オンにする, 239 px wide at that size) never shrinks, so even with the sentencecut to nothing the row needed 341 px of a 320 px screen. Dismiss (44 px wide) sat at x 297 to 341:
its right 21 px, including most of the X glyph, was off-screen.
Reproduced on
origin/main(6fa11f4) in headless Chromium against the demo build, phone emulationat 320x568,
language: "ja",uiFontSize: 20, a retired push subscription.The fix
CSS only, in
src/components/PushHealthNotice.css, for the notice's fault line (the failed-repairlayout is untouched):
ended at 0 px in this case);
white-space: normal,text-wrap: balance,word-break: auto-phraseasAddPcSheet.cssalready does for Japanese),the button growing in height (
height: auto, with the same minimum height as before).Dismiss keeps its 44 px size and its place at the line's right end. Wherever the label fits, nothing
shrinks: the line stays the one-line banner of #3485.
Design reference (src/AGENTS.md): this follows the notice's own failed-repair state on a phone, where
the button's label already wraps (
.is-failure > .btn), rather than another app; no layout wascopied.
Measurements (headless Chromium, phone emulation, x positions in CSS px)
320 px, Japanese, 20 px interface text:
Same result while the repair runs (
通知をオンにしています…: Dismiss 292 to 336 before, 268 to 312after).
Unchanged, identical before and after (action button and Dismiss boxes, sentence width, notice
height), at rest and while repairing: en, ko, zh and ja at the default size at 320 and 390; en, ko
and zh at 20 px at 320 and 390; ja at 20 px at 390. That is 30 of the 32 measured states; the two
that changed are the ones above.
Regression
scripts/push-health-demo-regression.tsgainscheckLineAtLargeText(Japanese, 20 px): at 320 pxDismiss is whole on the screen after the button, at the line's right end, both controls are
finger-sized, the label stays inside its button, nothing scrolls sideways, at rest and while
repairing, and a tap on Dismiss closes the line; at 390 px the button keeps its one line.
Fixes #3498
Validation
bun run check fast(through the heavy queue, on the pushed commit): pass. Workflow syntax,generated types and themes, typecheck, build, unit tests 14386 pass / 0 fail / 50 skip.
bun scripts/push-health-demo-regression.tsin the CI runner image (herdr-ci-runner:local, athrowaway container as the host user, Bun 1.4.2, the image's Chromium): pass, all ten lines,
including the two new ones. It ran on the same file contents as the pushed commit, before the
commit was made.
origin/mainand on the fix. The final CSS differs from the measured "after" run only by adropped
padding-blockon the button; the 320 px Japanese numbers above are from the final CSS(the regression run's screenshot).
bun run check integration browser/full, every other browser script, any desktop(fine pointer) before/after measurement (the existing regression's 1440 cases pass), real
devices, Safari and Firefox.
text-wrap: balanceandword-break: auto-phraseare refinements abrowser without them ignores; the label still wraps.
🤖 Generated with Claude Code