Gear icon dodge follows the page number's real position (BL-14901) - #8198
Open
andrew-polk wants to merge 3 commits into
Open
Gear icon dodge follows the page number's real position (BL-14901)#8198andrew-polk wants to merge 3 commits into
andrew-polk wants to merge 3 commits into
Conversation
https://issues.bloomlibrary.org/youtrack/issue/BL-14901 Follow-up to the landscape pictureOnRight fix: the tester found the gear icon (format cog) still displaced away from the margin on portrait ebook pages. The Zero Margin theme only places its page number at the bottom left on landscape pages; on portrait pages it leaves the number centered (the default for these page sizes), yet its 20px dodge applied to every page. The dodge is now scoped to the landscape page sizes. (Rounded Border needs no change here: its automatic page number really is at the bottom left in both orientations, so its dodge is still wanted.) Also gave the default theme's --formatButton-pageNumber-dodge a unit (0 -> 0px): the unitless zero made the cog's margin-left: calc(3px + var(...)) invalid, so in every book whose theme doesn't override the dodge the cog sat at 0 instead of the intended 3px - harmless but wrong since 6.0, and it would have eaten the legitimate dodge in the cases the next commit handles. Verified live in Bloom: on a Zero Margin Ebook 9x16 Portrait page the cog's computed margin-left is now 3px (was 23px); landscape pages still dodge (23px) and pictureOnRight landscape pages still don't (3px). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
https://issues.bloomlibrary.org/youtrack/issue/BL-14901 The Book Settings > Page Numbers control (Automatic/Left/Center/Right) moves the page number wherever the user says, overriding the theme - but the format cog's dodge ignored it, so the cog dodged a page number that was not there (Center/Right), and on pages where a theme waives the dodge it could sit on a number the user forced to the left. editMode.less now folds everything that determines where the page number actually sits into one effective dodge, reading the same pageNumber margin-override variables the appearance system writes for that setting (via container style queries, the same mechanism as the existing page-number-show gate): - Center or Right: nothing to dodge, whatever the theme wanted; - Left: apply the theme's full dodge even on pages whose theme moved the number elsewhere (e.g. pictureOnRight); - Automatic: the theme's per-page decision applies, as before. Both ebook themes publish the distance to use in the forced-Left case as the new --formatButton-pageNumber-dodge-when-forced-left; stylesheets that never waive the dodge per-page (the EFL migration books' customBookStyles.css) don't define it and fall back to their ordinary dodge value. Verified live in Bloom with a matrix over both ebook themes, both orientations, and all four Page Numbers settings, measuring the cog's computed margin-left on a Picture on Right page and a text-bottom control page: Center/Right never dodge (3px), Left always dodges (23px, including on a landscape pictureOnRight page), and Automatic matches the themes' behavior in the previous commit. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
andrew-polk
commented
Aug 12, 2026
Contributor
Author
|
[Claude Fable 5 during preflight] Consulted Devin on 2026-08-12 up to commit aa7c5bc. Review: 0 bugs, 1 Investigate flag, 3 Informational observations. The Investigate flag (default-theme books get no dodge when Page Numbers is forced Left) was posted as an inline thread, assessed as not-an-issue (the default theme reserves space so its page number sits below the text area in every case), and resolved: #8198 (comment). The informational notes (cascade verification, the 0px unit fix affecting all default-theme books by restoring the intended 3px, and the forced-left variable being published on portrait pages) all describe intended behavior. CI green at time of writing. |
andrew-polk
marked this pull request as ready for review
August 12, 2026 21:47
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.
Follow-up to #8182 (the landscape Picture-on-Right fix): the tester found the gear icon (format cog) still displaced away from the margin on portrait ebook pages, and the same pointless dodge occurred whenever the Book Settings "Page Numbers" control moved the number away from the bottom left.
Two commits:
Zero Margin portrait fix. That theme only places its page number at the bottom left on landscape pages; on portrait pages the number is centered (the device-size default), yet its 20px dodge applied everywhere. The dodge is now scoped to landscape. Also gave the default theme's dodge a unit (
0→0px): the unitless zero made the cog'smargin-left: calc(3px + var(...))invalid, so in every default-theme book the cog sat at 0 instead of the intended 3px (harmless but wrong since ~6.0).The dodge now honors the Page Numbers setting.
editMode.lessfolds everything that determines where the number actually sits into one effective dodge, reading the same margin-override variables the appearance system writes for that setting (via container style queries): Center or Right ⇒ nothing to dodge, whatever the theme wanted; Left ⇒ the theme's full dodge even on pages whose theme moved the number elsewhere (e.g. pictureOnRight); Automatic ⇒ the theme's per-page decision, as before. Both ebook themes publish the new--formatButton-pageNumber-dodge-when-forced-left; the EFL migration books' baked-in stylesheets fall back to their ordinary dodge.Verified live in Bloom with a 12-case matrix (both ebook themes × both orientations × all four Page Numbers settings, measuring the cog's computed margin on a Picture-on-Right page and a text-bottom control page): every case the tester reported now puts the cog at the margin, and every case where the number genuinely sits bottom-left still dodges, including landscape regression checks.
Ref: https://issues.bloomlibrary.org/youtrack/issue/BL-14901
🤖 Generated with Claude Code
Devin review
This change is