Skip to content

Fix Edit tab top bar growing taller with long translations (BL-16834) - #8334

Merged
StephenMcConnel merged 1 commit into
Version6.5from
BL-16834
Sep 9, 2026
Merged

Fix Edit tab top bar growing taller with long translations (BL-16834)#8334
StephenMcConnel merged 1 commit into
Version6.5from
BL-16834

Conversation

@andrew-polk

@andrew-polk andrew-polk commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Problem. With the UI language set to French, the Edit tab's top bar is noticeably taller than in English (a 6.5 regression; 6.4 did not show it). The "Book and Page Settings" button's French label, "Paramètres du Livre et de la Page", wraps onto three lines and pushes the whole bar down.

Cause. The button was fixed at 88px wide with a freely wrapping label. In 6.5 the top bar is a single React flex row whose height follows its tallest child, so a three-line label grows the bar. In 6.4 the same wrapping happened, but the bar lived in a fixed-height WinForms-hosted browser that simply hid it.

What the PR does. A CSS-only change to the Book and Page Settings button:

  • The button may now widen, from 88px up to 124px, so long translations (French, Portuguese) fit on two lines.
  • The label is clamped to two lines with an ellipsis as a backstop, so no translation can ever change the bar's height.
  • English now reads "Book and Page / Settings" in a slightly wider button; the bar height is unchanged (71px in both English and French, measured in a running Bloom).

Ref: https://issues.bloomlibrary.org/youtrack/issue/BL-16834

🤖 Generated with Claude Code

Devin review


This change is Reviewable

@andrew-polk

Copy link
Copy Markdown
Contributor Author

[Claude Fable 5.1] Consulted Devin on 2026-09-09 16:13 UTC up to commit adf9396. Devin found no bugs and raised no flags (0 Investigate, 0 Informational). CI (pr-automation) passed.

…er translations

https://issues.bloomlibrary.org/youtrack/issue/BL-16834

The Book and Page Settings button was fixed at 88px wide with a freely
wrapping label. In French ("Paramètres du Livre et de la Page") the label
wrapped to three lines, and since the 6.5 top bar is a single React flex row
whose height is driven by its tallest child, the whole bar grew (84px vs 71px).
6.4 hid the same wrapping behind a fixed-height WinForms-hosted bar.

Let the button widen (up to 124px) so long translations fit on two lines, and
clamp the label to two lines as a backstop so no translation can change the
bar's height. English now wraps as "Book and Page / Settings" in a slightly
wider button; bar height is unchanged.

Verified over CDP in a running Bloom: bar is 71px in both English and French.
pnpm typecheck, eslint, and the full vitest suite pass.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@andrew-polk
andrew-polk marked this pull request as ready for review September 9, 2026 17:41

@StephenMcConnel StephenMcConnel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@StephenMcConnel reviewed 1 file and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on andrew-polk).

@StephenMcConnel
StephenMcConnel merged commit 7dea499 into Version6.5 Sep 9, 2026
2 checks passed
@StephenMcConnel
StephenMcConnel deleted the BL-16834 branch September 9, 2026 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants