Skip to content

Keep the Leveled Reader control block visible while the stats scroll (BL-16585) - #8160

Open
StephenMcConnel wants to merge 2 commits into
masterfrom
BL-16585-LeveledReaderUITweak
Open

Keep the Leveled Reader control block visible while the stats scroll (BL-16585)#8160
StephenMcConnel wants to merge 2 commits into
masterfrom
BL-16585-LeveledReaderUITweak

Conversation

@StephenMcConnel

@StephenMcConnel StephenMcConnel commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

The Decodable Reader tool keeps its stage nav pinned at the top and its "Book is Decodable" / "Set Up Stages" control block pinned at the bottom, letting only the word lists scroll. The Leveled Reader had no internal scrolling region, so a tall stats panel made the whole tool overflow: the accordion panel scrolled and the "Book is Leveled" toggle and "Set Up Levels" button scrolled out of sight.

This gives the Leveled Reader the same three-band layout:

pinned top scrolls pinned bottom
Decodable Stage n of m grapheme + word grids Generate Report / toggle / Set Up Stages
Leveled Level n of m banner, legend, stats, "For this Level", "Keep in mind" Copy Book Stats / toggle / Set Up Levels

The scrolling region carries a min-height floor (as the Decodable Reader's sections do) rather than min-height: 0. Without a floor it is the only shrinkable item in the column, so in a short panel it collapsed to zero height, leaving the stats both invisible and unscrollable. With the floor, a panel too short even for that overflows and scrolls as a whole — what it did before this change, and what the Decodable Reader does today.

CSS only; no behavior or API changes.

Verified in a running Bloom

Measured over CDP in the Edit tab with a leveled book, at several forced panel heights:

  • Normal height: the stats region scrolls internally; nav and control block stay put.
  • Squeezed to 220 / 170 / 140 px: the stats region floors instead of collapsing, the panel scrolls as a whole, and every control (including "Set Up Levels") remains reachable — the same numbers the Decodable Reader produces under the identical squeeze.

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

Devin review


This change is Reviewable

StephenMcConnel and others added 2 commits August 5, 2026 17:24
…(BL-16585)

The Decodable Reader tool pins its stage nav at the top and its "Book is
Decodable" / "Set Up Stages" control block at the bottom, and lets only the
word lists scroll. The Leveled Reader had no internal scrolling region, so a
tall stats panel made the whole tool overflow: the accordion panel scrolled,
and the "Book is Leveled" toggle and the "Set Up Levels" button scrolled out
of sight.

Give the Leveled Reader the same three-band layout: the "Level x of y" nav
pinned above, the stats / "For this Level" / "Keep in mind" content in a flex
region that scrolls internally, and the control block pinned below.

The scrolling region carries a min-height floor (as the Decodable Reader's
sections do) rather than min-height: 0. Without a floor it is the only
shrinkable item in the column, so in a short panel it collapsed to zero
height, leaving the stats both invisible and unscrollable. With the floor, a
panel too short even for that overflows and scrolls as a whole -- what it did
before this change, and what the Decodable Reader does today.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
When the toolbox panel is too short for the nav, the stats region's min-height
floor and the control block, the tool as a whole has to scroll so nothing
becomes unreachable. That fallback was already working, but only as a side
effect: "overflow-x: hidden" with no overflow-y makes the browser compute
overflow-y as auto, because a non-visible axis forces the other one to auto.

Declare the overflow-y: auto explicitly instead of relying on that, so a later
edit to the horizontal overflow can't silently take the fallback away. No
behavior change -- it is the value the panel already computed.

Noticed by Devin (informational finding on PR #8160).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@StephenMcConnel

Copy link
Copy Markdown
Contributor Author

[Claude Opus 5, during preflight] Consulted Devin on 2026-08-05 17:34 MDT, up to commit 2b5d35a.

No bugs. One Investigate flag — that the 120px floor on the scrolling region is a magic number — which is now its own thread on the diff, assessed as not an issue and resolved there with the reasoning.

Five informational items, not mirrored as threads. Two of them simply confirmed the layout reasoning (that dropping margin-top: auto is safe now that the scroll region absorbs the slack, and that the nav can't be squeezed). One noted that the whole-panel fallback scrolling was relying on overflow-x: hidden implicitly computing overflow-y to auto — that was worth acting on, and commit 2b5d35a states the overflow-y: auto explicitly so a later edit can't silently remove the fallback. The remaining two (the scrollbar sitting inside the panel's 12px padding, and the earlier run's duplicate of the margin note) need no action: the Decodable Reader's scrolling grids sit inside that same padding, which is the parity this PR is aiming for.

CI (pr-automation) passed. CodeRabbit has auto_review.enabled: false on this repo, so it does not review PRs here.

@StephenMcConnel
StephenMcConnel marked this pull request as ready for review August 6, 2026 23:24
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.

1 participant