Skip to content

Control the font used for book buttons in RAB books (BL-16351)#7977

Merged
hatton merged 1 commit into
masterfrom
BL-16351-BookButtonFont
Jun 23, 2026
Merged

Control the font used for book buttons in RAB books (BL-16351)#7977
hatton merged 1 commit into
masterfrom
BL-16351-BookButtonFont

Conversation

@StephenMcConnel

@StephenMcConnel StephenMcConnel commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Devin review


This change is Reviewable

@greptile-apps

greptile-apps Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR sets the lang attribute on bloom-link-grid elements to the collection's Language 1 tag, allowing CSS font rules in RAB books to target the correct script/language for book button labels.

  • getLanguage1Tag() reads languageForNewTextBoxes from the runtime-injected GetSettings() and sets it on each link grid during initial setup (setupBookLinkGrids) and after the user confirms edits (editLinkGrid).
  • The /// <reference path> directive is added so the existing collectionSettings.d.ts type definitions are available in this file.

Important Files Changed

Filename Overview
src/BloomBrowserUI/bookEdit/js/linkGrid.ts Adds lang attribute to bloom-link-grid elements using the collection's language1 tag, enabling CSS font rules to target the correct language; change is small, focused, and logically correct.

Reviews (3): Last reviewed commit: "Control the font used for book buttons i..." | Re-trigger Greptile

@StephenMcConnel StephenMcConnel self-assigned this Jun 17, 2026

@hatton hatton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hatton made 1 comment.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on StephenMcConnel).


src/content/bookLayout/basePage-sharedRules.less line 293 at r1 (raw file):

.bloom-canvas .bloom-canvas-element .bloom-link-grid .bloom-bookButton p {
    font-size: var(--DefaultBookButtonFontSize, 10pt);
    font-family: Andika, NotoSans, sans-serif;

What if their language needs a different font? It doesn't seem like any fixed list will do here.

@StephenMcConnel StephenMcConnel force-pushed the BL-16351-BookButtonFont branch from ef108ef to a715142 Compare June 23, 2026 14:26

@StephenMcConnel StephenMcConnel left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@StephenMcConnel made 1 comment.
Reviewable status: 0 of 6 files reviewed, 1 unresolved discussion (waiting on hatton).


src/content/bookLayout/basePage-sharedRules.less line 293 at r1 (raw file):

Previously, hatton (John Hatton) wrote…

What if their language needs a different font? It doesn't seem like any fixed list will do here.

I changed the code to inject the Language1 font on the paragraph elements.

and in the edit tab and bloompub preview as well.
@StephenMcConnel StephenMcConnel force-pushed the BL-16351-BookButtonFont branch from a715142 to 5d9bcb0 Compare June 23, 2026 17:13

@StephenMcConnel StephenMcConnel left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@StephenMcConnel made 1 comment.
Reviewable status: 0 of 6 files reviewed, 1 unresolved discussion (waiting on hatton and StephenMcConnel).


src/content/bookLayout/basePage-sharedRules.less line 293 at r1 (raw file):

Previously, StephenMcConnel (Steve McConnel) wrote…

I changed the code to inject the Language1 font on the paragraph elements.

The code has changed again to just set the lang attribute on the .bloom-link-grid elements.

@StephenMcConnel StephenMcConnel left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final change I hope

@StephenMcConnel made 1 comment.
Reviewable status: 0 of 6 files reviewed, 1 unresolved discussion (waiting on hatton and StephenMcConnel).

@hatton hatton left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hatton partially reviewed 2 files.
Reviewable status: 0 of 6 files reviewed, 1 unresolved discussion (waiting on StephenMcConnel).

@hatton hatton merged commit 9c78bdc into master Jun 23, 2026
2 of 3 checks passed
@hatton hatton deleted the BL-16351-BookButtonFont branch June 23, 2026 17:40
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