Skip to content

BL-15958 Rename ebook theme to edge-to-edge, expand to all page sizes - #8262

Merged
StephenMcConnel merged 1 commit into
masterfrom
BL-15958-theme
Oct 7, 2026
Merged

StephenMcConnel merged 1 commit into
masterfrom
BL-15958-theme

Conversation

@hatton

@hatton hatton commented Aug 31, 2026 •

Copy link
Copy Markdown
Member

[Claude Opus 5.5 from Hatton's machine during preflight]

Part 1 of 3 of the BL-15958 work. The other two are the full-bleed page sizes (#8263) and the edit-mode crop marks (#8264).

Problem

The "Zero Margin Ebook" page theme takes pictures to the page edge, but only on ebook and device page sizes. Full-bleed print books need the same at any paper size, and once the theme is used for print its name no longer describes it.

What the PR does

  • Renames the theme to Edge to Edge. A book that stores the old name zero-margin-ebook is read and saved as edge-to-edge (AppearanceSettings.NormalizeThemeName). The eBook and Playground templates and the EFL ebook migration use the new name.
  • Applies the theme to every page size. Numbered content pages have no margin; front and back matter keep 3mm.
  • With full bleed on, text boxes stay 3mm inside the trimmed edge. Page numbers placed left or right line up with the text and shift with the trim offset (new --pageNumber-side-left-inset / --pageNumber-side-right-inset).
  • Keeps master's format-button placement on the theme's ebook pages (BL-14901): the button moves clear of a bottom-left page number on landscape pages and stays put on portrait pages, where the number is centered.
  • The full-bleed help text in Book Settings now names the theme. The theme label and that help text get new translatable string ids (AppearanceTheme.edge-to-edge, BookSettings.FullBleed.Description.EdgeToEdge). The old entries are kept and marked obsolete as of 6.6.

Screenshots

None captured yet. The theme has not been looked at in a running Bloom since master was merged in; the checks are in the test-ideas comment on BL-15958.

Risk Evaluation

  • appearance-theme-edge-to-edge.css now matches every numbered page instead of the four Ebook/Device sizes, so any book using the theme at a paper size changes layout. This includes existing books, which lose their content-page margins without the user doing anything. That is deliberate.
  • The page-number override formula in AppearanceSettings.SetPageNumberProperties runs for every book whose user forces page numbers left or right. It now reads --pageNumber-side-left-inset / --pageNumber-side-right-inset, which fall back to the page margin, so other themes are unchanged.
  • pageNumbers.less and pageBoxesSizing.less: the full-bleed bottom offset moves into its own variable, --pageNumber-full-bleed-bottom-adjustment. That affects page-number placement in every full-bleed book.
  • basePage.less adds text-box insets that are 0mm unless the theme sets them.

Ecosystem Impact

  • Published output and Bloom Player: the theme stylesheet travels with the book, so BloomPUB, ePUB and PDF get the new layout. Not checked by hand.
  • Older Bloom versions: a book saved by this build stores edge-to-edge, a theme name an older Bloom does not have. What an older Bloom then shows was not checked.
  • Localization: two new translatable strings reach Crowdin. The old ones stay, marked obsolete. Until translators catch up, the theme label and the full-bleed help show in English. Non-English XLF files are untouched.
  • Docs: the docs site's Page Themes Catalog and Bloom's Built-in Book Templates pages still say "Zero Margin Ebook".

E2E Coverage

No end-to-end test covers this theme. The visual-regression theme list (src/BloomVisualRegressionTests/index.spec.ts) now names edge-to-edge. That suite was not run for this PR.

Notion Test Suite

This PR added or changed no cards. The existing "Zero Margin Device Theme" cards in Test Case Runs describe the old name and say the theme only applies to Ebook/Device layouts.

Ref: BL-15958

🤖 Generated with Claude Code


Devin review


This change is Reviewable

@greptile-apps

greptile-apps Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR renames the zero-margin ebook appearance theme to Edge to Edge, normalizes the legacy theme ID, and extends its margin and page-number behavior to all page sizes.

  • Adds legacy-to-canonical theme-name normalization in AppearanceSettings.
  • Renames and broadens the appearance-theme CSS, including full-bleed text and page-number insets.
  • Updates templates, migration data, tests, and localization catalogs for the new theme name.

Important Files Changed

Filename Overview
src/BloomExe/Book/AppearanceSettings.cs Normalizes the legacy theme alias on loading, assignment, and CSS generation, and updates explicit side-page-number formulas.
src/content/appearanceThemes/appearance-theme-edge-to-edge.css Renames the theme, applies zero margins across page sizes, and introduces full-bleed text and page-number inset rules.
src/content/bookLayout/basePage.less Adds an inset frame for top-level translation groups so full-bleed text can remain within the safe area.
src/content/bookLayout/pageNumbers.less Refactors the full-bleed bottom offset into a separately composed CSS variable.
DistFiles/localization/en/BloomMediumPriority.xlf Renames an established trans-unit ID, which breaks the repository’s localization identity and retirement workflow.
DistFiles/localization/es/BloomMediumPriority.xlf Directly rewrites a Crowdin-owned locale while retaining an approved translation for the old theme meaning under the new key.
src/BloomTests/Book/AppearanceSettingsTests.cs Updates expectations for canonical theme naming and the new page-number inset formulas.
src/BloomVisualRegressionTests/index.spec.ts Replaces the old theme ID with the canonical ID in the visual-regression theme matrix.

Reviews (1): Last reviewed commit: "BL-15958 Rename ebook theme to edge-to-e..." | Re-trigger Greptile

Comment thread DistFiles/localization/en/BloomMediumPriority.xlf
@hatton

hatton commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

[Claude Opus 5.5 from Hatton's machine during preflight] @greptile-apps review

@greptile-apps greptile-apps Bot 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.

Greptile has paused reviews on this repository — it used its 100 free open-source review credits for this billing period. Reviews resume automatically on October 24. To continue before then, an organization admin can keep reviews running past the free credits — those bill as normal usage.

Comment thread DistFiles/localization/en/BloomMediumPriority.xlf
@hatton

hatton commented Oct 6, 2026 •

Copy link
Copy Markdown
Member Author

Decided: leave as is. The three BL-15958 PRs (#8262, #8263, #8264) target master deliberately. The card has no [6.5] prefix, so it names no release branch.

[Devin] Investigate: Wrong release branch target (AGENTS.md, outside the diff, so not resolvable as a thread)

This PR targets master despite the temporary Version6.5 mandate in AGENTS.md. Retarget it or document an explicit exception before merging.

@hatton

hatton commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

[Claude Opus 5.5 from Hatton's machine during preflight] Consulted Devin on 2026-10-06 up to commit 3da2bb4. It raised one bug and two investigate flags that apply to the current code: two are answered and resolved on their threads, and the release-branch question is open for the developer. Four more findings described the earlier commit 66fb4d1 (edited non-English XLF files, the damaged Portuguese file, the renamed theme id) and are fixed in 3da2bb4. Two informational notes, not posted.

@hatton

hatton commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

[Claude Opus 5.5 from Hatton's machine during preflight] On Devin's release-branch flag (#8262 (comment)): the developer decided to keep master as the base. The three BL-15958 PRs (#8262, #8263, #8264) are one chain built on master, and the card has no [6.5] prefix, so it names no release branch.

- Rename the "Zero Margin Ebook" appearance theme to "Edge to Edge". A book
  that stores zero-margin-ebook is read and saved as edge-to-edge; the eBook
  and Playground templates and the EFL ebook migration use the new name.
- Apply the theme to every page size: numbered content pages get no margin,
  front and back matter keep 3mm. Master's Ebook/Device format-button
  placement (BL-14901) is kept.
- With full bleed on, keep text boxes 3mm inside the trim, and line side page
  numbers up with the text via --pageNumber-side-left-inset/-right-inset.
- Name the theme in the full-bleed help text. The theme label and that help
  text get new translatable ids; the old entries are marked obsolete as of 6.6.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@hatton
hatton marked this pull request as ready for review October 6, 2026 13:46

@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 56 files and all commit messages, and resolved 2 discussions.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on hatton).

@StephenMcConnel
StephenMcConnel merged commit f3c320a into master Oct 7, 2026
2 checks passed
@StephenMcConnel
StephenMcConnel deleted the BL-15958-theme branch October 7, 2026 19:44
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