Add e2e test for All Format Controls (Notion test case 357); Format text color reaches all languages (BL-16803) - #8288
Open
JohnThomson wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
[Claude Fable 5.1] Consulted Devin on 2026-09-03 00:06 UTC up to commit 659135d. Devin's review completed with no bugs and no flags (0 informational items). CI (pr-automation) passed. |
JohnThomson
commented
Sep 3, 2026
JohnThomson
commented
Sep 3, 2026
Contributor
Author
|
[Claude Fable 5.1] Consulted Devin on 2026-09-03 05:58 UTC up to commit 4b2e961. Devin's review of the previous commit raised one bug (sibling languages losing their chosen fonts when a style is created), fixed in this commit and now marked resolved by Devin; its one flag (explicit waits in the e2e helpers) was answered on its thread and resolved. Re-review of this commit: clean, bots quiet. CI (pr-automation) passed. |
…mat text color reach all languages (BL-16803) The Format dialog's Characters tab promises that a change made on a text box in the collection's first language applies to the style as a whole, so the other languages follow. Color was the one control that broke that promise: it wrote only the language-specific rule. changeColor now also writes the style's language-independent rule for a first-language box, as bold, size and spacing do. Font stays per language, as before. Automating the manual test exposed a second gap: creating a new style copied every setting of the box except a font the user had set explicitly, so the box (and the other languages of its group, which move to the new style too) fell back to the collection's font. A box's font normally comes from the language settings, so the new style names a font only where the old style set one explicitly, per language, for every language in the group. Five unit tests in StyleEditorSpec.ts cover the two fixes. The new edge-to-edge test, src/BloomE2E/tests/all-format-controls.spec.ts, builds a Basic Book with three pages in two languages (eight text boxes) and drives every control on all four tabs of the Format dialog, checking where each change lands: on the box at once, on all eight boxes across the pages, or in one language only; the Talking Book tool's highlight colors; and creating, changing and applying a style. Helpers for the dialog's controls, the toolbox handle, the Talking Book highlight, reading a page's text-box formatting and CSS unit conversion are new; clickInGroup/typeInGroup take a group index and typeInGroup makes a paragraph break from a newline. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
JohnThomson
force-pushed
the
JohnThomson/BL-16803-All-Format-Controls-357
branch
from
September 3, 2026 13:58
4b2e961 to
f55ed2a
Compare
JohnThomson
marked this pull request as ready for review
September 3, 2026 13:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Format dialog's Characters tab promises that a change made on a text box in the collection's first language applies to the style as a whole, so every other language of that style follows. Every control on the tab keeps that promise except Color: a text color chosen on the first-language box changed only that language, and the same style's boxes in the other languages kept their old color (BL-16803).
Separately, the manual test "All Format Controls" (Notion test case 357), which walks every control on all four tabs of the dialog and checks where each change lands, had no automated equivalent.
What the PR does
StyleEditorSpec.tspin that down. Font is deliberately left per language, as before.src/BloomE2E/tests/all-format-controls.spec.ts. It builds a Basic Book with the three pages the card names (four text boxes, eight once the second language is on), then drives every control: Characters tab on a first-language box (each change checked on the box at once, then on all eight boxes across the three pages), a custom font size typed into the size box, Characters changes on a second-language box (only its four boxes change), the Paragraph tab (all eight), the Highlighting tab (the colors the Talking Book tool then highlights with), creating a style, changing it, and applying it to another box.Automates Notion test case 357 (All Format Controls): https://app.notion.com/p/All-Format-Controls-3904bb19df1281ae8491f08a28684211
Bloom production code changes
src/BloomBrowserUI/bookEdit/StyleEditor/StyleEditor.ts:changeColoralso writes the language-independent rule for a first-language box (BL-16803);createStylecarries an explicitly set font into the new style.StyleEditorSpec.ts: five unit tests for those two changes.The fix is deliberately not being taken to Version6.5 (a long-standing "live with it"; not worth the risk in a near-beta version).
Ref: https://issues.bloomlibrary.org/youtrack/issue/BL-16803
Devin review
This change is