Improve Leveled Reader tool UI (BL-16585) - #8087
Conversation
Redesign the Leveled Reader toolbox panel to match the approved mockup:
- Over-level warning banner and a within/over-level color legend.
- Section headers uppercased with a consistent underline rule; "This Page"/
"This Book" sub-labels get half-em breathing room.
- Stats table: a MEASURE column header, right-aligned quiet-grey Max values,
em dash for no-limit Max cells, first-letter-capitalized row labels.
- Level indicator split into a large "Level N" plus a small muted "of M",
on one line, with boxed prev/next arrow buttons. This required splitting
the localized "Level {0} of {1}" / "Stage {0} of {1}" strings into
LevelNumber/StageNumber + a shared ReaderTools.OfCount (old combined
strings marked obsolete as of 6.5).
- Teal "Set up Levels" link with a colorable edit icon; outlined
"Copy Book Stats" button.
- Single horizontal panel padding so every row shares one left edge.
- Reserve scrollbar width (scrollbar-gutter: stable) on the reader panels.
- Hide "For this Level" when the level has no real reminders (an empty
field comes back as [""]).
New localization strings added to the English XLF files (banner/legend to
BloomMediumPriority; Measure and the split level/stage strings to Bloom.xlf).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
| Filename | Overview |
|---|---|
| src/BloomBrowserUI/bookEdit/toolbox/readers/leveledReader/LeveledReaderToolControls.tsx | Major UI redesign adding OverLevelBanner, StatsLegend, conditional 'For this Level' section, and unified bottom action group; isBookOverLevel logic correctly mirrors StatsRow coloring for all 12 stat pairs. |
| src/BloomBrowserUI/bookEdit/toolbox/readers/readerToolStyles.ts | New shared styles file exporting accent/muted colour tokens, section-header CSS, and contained/text button CSS used by both reader tool panels. |
| src/BloomBrowserUI/bookEdit/toolbox/readers/ReaderToolNav.tsx | Navigation redesigned from a flat layout to a flex row with labelled 'Level {0}' + muted 'of {1}' and boxed arrow buttons; both reader tools share this component. |
| src/BloomBrowserUI/bookEdit/toolbox/readers/ReaderSetupButton.tsx | New shared 'Set Up Levels/Stages' button component wrapping BloomButton with a contained blue style and background-image icon. |
| src/BloomBrowserUI/bookEdit/toolbox/readers/decodableReader/DecodableReaderToolControls.tsx | Refactored to use shared styles, replaced the plain Link with a BloomButton for 'Generate Report', added uniform panel padding, and restructured the bottom action group to mirror the leveled reader layout. |
| src/BloomBrowserUI/bloomUI.less | Adds the .bloomDarkScrollbars class with a mixin that styles WebKit scrollbar pseudo-elements; the & * descendant rule gives full coverage to all scrolling children with a single root class. |
| DistFiles/localization/en/BloomMediumPriority.xlf | Adds nine new localizable strings (GenerateReport, GenerateReport.ToolTip, StageNumber, OfCount, LevelNumber, Measure, OverLevel, OverLevelWarning, WithinLevel) all correctly marked sil:dynamic=true. |
| DistFiles/localization/en/Bloom.xlf | Adds obsolete notes to MakeLetterWordReport, StageNofM, and LevelNofM strings; no IDs changed, existing translations preserved. |
Reviews (7): Last reviewed commit: "Merge remote-tracking branch 'origin/mas..." | Re-trigger Greptile
…son (BL-16585)
- The banner's "This book reads above Level {0}" was raw JSX, so {0}
evaluated to the number 0, corrupting the registered/harvested English
fallback. Pass it as a string literal like the other Spans.
- isBookOverLevel compared raw average values against the limits while the
rows display/color those values rounded to one decimal, so a raw 5.04
could trip the banner while every row showed green "5.0". Compare against
the same one-decimal rounding (a no-op for integer stats).
- Remove a duplicated comment block in ReaderToolNav.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
isBookOverLevel is documented to mirror the per-row orange coloring, but it omitted the "total sentences in the book" measure, so if that limit were exceeded the row would color orange while the banner stayed hidden. Add the pair. (Harmless today since maxSentencesPerBook() currently returns 0, so it is guarded out; this keeps the mirror complete if that limit becomes active.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
[Claude Opus 4.8] Consulted Devin on 2026-07-20 16:40 MDT up to commit
Greptile: clean (positive summary, no inline findings). CI: green. |
…(BL-16585) Leveled/Decodable Reader tools: move the Set Up button below the "Book is Leveled/Decodable" toggle, put Copy Book Stats / Generate Report in that stack, give Set Up a contained (blue) style bearing the tool's accordion-header icon, uppercase the toggle labels, and let the toggle scroll with the panel content. Add a reusable `bloomDarkScrollbars` class, defined once in bloomUI.less, and apply it to the dark panels (Collection tab, the Edit-tab toolbox and page-list iframes, and the Publish tab's dark tab strip), replacing the ad-hoc toolbox scrollbar styling. Light panels keep the browser default. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
[Claude Opus 4.8] Consulted Devin on 2026-07-22 up to commit
Greptile: pass — its only substantive points were the same XLF |
|
[Claude Opus 4.8] Consulted Devin on 2026-07-23 up to commit This commit just merges the latest
CI green (pr-automation, track). Greptile re-review in progress. |
…ss (BL-16585) Per developer decision on the preflight review: - The new "Generate Report" button and its tooltip were marked translate="no", which would have kept them English for every user — a regression from the translatable button they replace (MakeLetterWordReport). Switch both to sil:dynamic="true" to match the predecessor, the sibling reader-tool strings, and the runtime (BloomButton) mechanism that displays them, so the label is translated like the rest of the feature. - Remove readerOutlineButtonCss from readerToolStyles.ts: it was exported but never imported anywhere (flagged by both the local review and Devin). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
[Claude Opus 4.8] Consulted Devin on 2026-07-23 up to commit This commit implements the developer's decision from the preflight report (make "Generate Report" translatable; remove an unused style export) and merges the latest
CI green (pr-automation, track). Greptile re-review: pass, no new findings. |
hatton
left a comment
There was a problem hiding this comment.
@hatton reviewed 13 files and all commit messages, and made 1 comment.
Reviewable status: 13 of 15 files reviewed, 4 unresolved discussions.
src/BloomBrowserUI/bookEdit/toolbox/readers/ReaderToolNav.tsx line 37 at r3 (raw file):
} // Boxed square buttons at the right, matching the mockup. Unlike before,
Don't put comments in our code referring to the mockup, or what things looked like "before".
The six new decodable/leveled reader strings this branch added (GenerateReport, GenerateReport.ToolTip, StageNumber, LevelNumber, Measure, and the shared ReaderTools.OfCount) were in Bloom.xlf; move them to BloomMediumPriority.xlf, grouped with the existing DecodableReaderTool and LeveledReaderTool entries. IDs, source text, notes, and sil:dynamic="true" are unchanged, so every l10n lookup still resolves — only the priority file changes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Per review feedback: reword three comments so they describe what the code does now, without pointing at the design mockup or how things looked "before" (ReaderToolNav arrow buttons, the LeveledReader label first-letter capitalization, and the shared reader accent color). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
hatton
left a comment
There was a problem hiding this comment.
@hatton+JHAI made 1 comment and resolved 1 discussion.
Reviewable status: 10 of 15 files reviewed, 3 unresolved discussions (waiting on hatton).
src/BloomBrowserUI/bookEdit/toolbox/readers/ReaderToolNav.tsx line 37 at r3 (raw file):
Previously, hatton (John Hatton) wrote…
Don't put comments in our code referring to the mockup, or what things looked like "before".
[Claude Opus 4.8] Done in c0052bd3. Reworded the three comments so they describe what the code does now, dropping the mockup reference and the "before" framing: the boxed arrow buttons here in ReaderToolNav, the first-letter capitalization in LeveledReaderToolControls, and the shared reader accent color in readerToolStyles.ts. I also swept the rest of the branch's changed files — the only other "no longer / used to" comments were pre-existing on master, so I left those alone.
hatton
left a comment
There was a problem hiding this comment.
@hatton reviewed 5 files and all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on hatton).
StephenMcConnel
left a comment
There was a problem hiding this comment.
@StephenMcConnel reviewed 15 files and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on hatton).
src/BloomBrowserUI/bookEdit/toolbox/readers/ReaderToolNav.tsx line 95 at r4 (raw file):
`} > {props.isForLeveled ? "Level {0}" : "Stage {0}"}
Are we sure that "Level X" always precedes "of Y" in every language? I agree that assumption makes nicer styling easier (or possible), but it is an assumption.
src/BloomBrowserUI/bookEdit/toolbox/readers/readerToolsModel.ts line 105 at r4 (raw file):
"EditTab.Toolbox.DecodableReaderTool.StageNumber": "Stage {0}", "EditTab.Toolbox.LeveledReaderTool.LevelNumber": "Level {0}", "EditTab.Toolbox.ReaderTools.OfCount": "of {0}",
See my earlier comment about localization.
StephenMcConnel
left a comment
There was a problem hiding this comment.
@StephenMcConnel resolved 3 discussions.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on hatton).
Redesigns the Leveled Reader toolbox panel to match the approved mockup (BL-16585).
Highlights
ReaderToolNav, so the Decodable tool's "Stage N of M" gets the same treatment).scrollbar-gutter: stablereserves scrollbar width on the reader panels.Localization
LevelNofM/StageNofMstrings intoLevelNumber/StageNumber+ a sharedReaderTools.OfCount(old strings marked obsolete as of 6.5) so the two parts can be styled separately.BloomMediumPriority.xlf;Measureand the split level/stage strings inBloom.xlf. English (DistFiles/localization/en/) only.Ref: https://issues.bloomlibrary.org/youtrack/issue/BL-16585
Devin review
This change is