Skip to content

Collection Settings in React: Languages page (BL-16739) - #8502

Draft
andrew-polk wants to merge 18 commits into
BL-16735-team-collection-settingsfrom
BL-16739-languages-page
Draft

andrew-polk wants to merge 18 commits into
BL-16735-team-collection-settingsfrom
BL-16739-languages-page

Conversation

@andrew-polk

@andrew-polk andrew-polk commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The new React Collection Settings dialog still shows a placeholder on its Languages page. Collection languages, their fonts and their script settings can only be changed in the old WinForms dialog, spread over its Languages tab, the Book Making tab and the Special Script Settings dialog. The alphabet and sentence punctuation for the reader tools can only be changed in Reader Setup.

Fix

  • The Languages page (settingsPages/LanguagesPage.tsx) has a group each for Language 1, 2, 3 and the Sign Language. Each shows its language with Change…, which opens the existing language chooser as a nested React dialog. Language 3 and the Sign Language also offer Set… and Remove. Each written language has its Default Font (the font picker, with suitability warnings) and a More sub-page, which uses Config-R's sub-pages. More holds the tool font size, line spacing, Asian word breaking and right-to-left. Values not in a list are kept, so looking at them doesn't change them. A missing Language 3 shows only its language row.
  • Reader tools, Language 1 only. Language 1's More page also edits the reader tools' alphabet and sentence-ending punctuation. On save, C# writes just those two keys into ReaderToolsSettings-<L1 tag>.json in the collection folder and keeps the stages and levels; it writes nothing if they didn't change. The two fields are disabled while Language 1 itself is being changed, because the file is named for Language 1. An edited alphabet is cleaned the way Reader Setup cleans it. If the reader tools file is damaged, those two fields are disabled with an explanation, so the rest of the settings still save and the file is never written over.
  • Page Numbering Style is at the bottom of the page (plan Q5). In the dialog's JSON it moved from frontBackMatter to languages; the collection file is unchanged.
  • Small supporting changes:
    • The GET now sends defaultFontName for a newly added Language 3.
    • LanguageChooserDialog can hand its pick to a callback, and gets its WinForms frame's size when it has no frame.
    • The reader tools' default settings JSON and cleanSpaceDelimitedList moved where both callers can use them, unchanged.

ScriptSettingsDialog and the Book Making font controls stay until the old dialog is removed at cutover.

Config-R moves to 1.0.0-alpha.32 for sillsdev/config-r#31. Before it, any edit on a More page threw the user back to the Languages page, because Config-R reset the focused page whenever the dialog re-rendered, and this dialog re-renders on every edit.

Screenshots

The Languages page:

The Languages page: Local Language and Language 2 with Change buttons, Default Font pickers and More rows; Language 3 with only a Set button

Language 1's More page, with the reader tools' fields:

Language 1's More page: line spacing, the Script group's two checkboxes, and the Reader Tools group with the alphabet and sentence punctuation

Change… opens the language chooser over the dialog:

The Choose Language dialog open over Collection Settings, with English selected

Risk Evaluation

  • Shared paths:
    • The dialog's save path now cleans an edited alphabet as well as trimming edited text, and the restart check uses the same function.
    • ReadersApi now builds the reader tools' default settings through the shared method; the JSON is the same.
    • The WinForms dialog's language chooser takes the same path as before when no callback is given.
  • Reader tools file. The new C# writes that file only when the alphabet or punctuation actually changed, and it writes them into the file read when the dialog opened, keeping everything else in it.
  • The rest is new code reached only from the new page.

Ecosystem Impact

  • Collection file: no format change. PageNumberStyle is stored as before.
  • Reader tools file: unchanged in shape. Team Collections already sync it as a collection file, and it is written before the collection is saved.
  • Localization: 13 new translate="no" strings. The labels are in Bloom.xlf and the descriptions in BloomMediumPriority.xlf; existing translated strings were reused wherever the text fit.
  • Dependency: @sillsdev/config-r 1.0.0-alpha.30 → 1.0.0-alpha.32 (Update localizations for Hindi, Tamil, Telugu #31's sub-page fix, and a release of dev-tooling upgrades that changes nothing at run time). The lockfile changes only that package.
  • No published output or Bloom Player changes.

E2E Coverage

  • Languages page: collection-settings-languages.spec.ts, a journey through the real dialog: Language 1's Default Font, then on its More page a line spacing and a new alphabet; Restart; then the collection file, the reader tools' settings (stages kept) and the reopened dialog. It fails with Config-R alpha.30 at its first edit on a More page; that is how the Config-R bug was found.
  • Badge preview: the Front & Back Matter page's preview follows a language changed on this page before it is saved (BL-16733 built that); the dialog's vitest suite checks it with a sign language added in the dialog, and collection-settings-front-back-matter.spec.ts passes on this branch.
  • Not covered end to end: Language 3 and Sign Language Set/Remove, the language chooser itself, and the locked reader-tools fields; the dialog's vitest suite covers those.

Notion Test Suite

Preflight report: https://bloombooks.github.io/dev-process-artifacts/deciders/bloomdesktop-bl-16739-languages-page.html

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

🤖 Generated with Claude Code

Devin review


This change is Reviewable

@andrew-polk
andrew-polk added this pull request to stack #8498 October 23, 2026 17:39
@greptile-apps

greptile-apps Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in Greptile

[Medium impact] The PR appears safe to merge; no new blocking issues were found.

Summary

Adds the Languages page with language selection, fonts, script settings, reader-tool fields, and page numbering. The badge preview now follows draft language choices.

  • The Collection Settings dialog lets people change languages and their settings.
  • Language 1’s More page now includes reader-tool alphabet settings.
  • The badge preview follows the language selected in the open dialog.

Reviews (4) · Last reviewed commit: "Collection Settings in React: Languages ..." · Reviewed by Greptile

Comment thread src/BloomExe/web/controllers/CollectionSettingsTypes.cs
Comment thread src/BloomBrowserUI/collection/settingsPages/LanguagesPage.tsx Outdated
Comment thread src/BloomBrowserUI/collection/settingsPages/LanguagesPage.tsx
Comment thread src/BloomBrowserUI/collection/settingsPages/LanguagesPage.tsx
Comment thread src/BloomBrowserUI/collection/settingsPages/LanguagesPage.tsx
@andrew-polk

Copy link
Copy Markdown
Contributor Author

[Claude Opus 5.5 during preflight] @greptile-apps review

@andrew-polk

Copy link
Copy Markdown
Contributor Author

[Claude Opus 5.5 during preflight] Consulted Devin on 2026-10-23 18:06 UTC up to commit e5fbca0. It raised three findings, each with its own thread: the props type (fixed in e5fbca0), the uncancelled fetches (not an issue; replied), and the QR badge preview using the saved language (left open for a decision). No Investigate flags. The later commit e084157 only changes the plan document.

@andrew-polk

Copy link
Copy Markdown
Contributor Author

[Claude Opus 5.5 during preflight] @greptile-apps review

@andrew-polk

Copy link
Copy Markdown
Contributor Author

[Claude Opus 5.5 during preflight] Consulted Devin on 2026-10-23 18:44 UTC up to commit 1186b23. Nothing new: it now marks the QR badge preview finding resolved (fixed in 1186b23) along with the props type; the uncancelled-fetch finding is a repeat, already answered on its thread. No Investigate flags.

Reuses the old Subscription tab's pieces. The dialog keeps the code being typed and posts it with the other values; Apply hands it to ApplySubscriptionAndBookshelf before the xmatter check. The reused components describe a typed code with a stateless settings/subscription?code=, so Cancel leaves nothing behind; the WinForms tab keeps its own code in C#. Subscription badges and gated menu items open the dialog in the browser, falling back to C# where no dialog is mounted; a badge on the dialog's own pages switches page through Config-R's ConfigrPaneHandle, keeping edits. E2E tests: Notion Test Case 849.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrew-polk
andrew-polk force-pushed the BL-16739-languages-page branch from 1186b23 to 576fe22 Compare October 23, 2026 21:23
@andrew-polk

Copy link
Copy Markdown
Contributor Author

[Claude Opus 5.5 during preflight] @greptile-apps review

Comment thread src/BloomExe/web/controllers/CollectionSettingsApi.cs Outdated
@andrew-polk

Copy link
Copy Markdown
Contributor Author

[Claude Opus 5.5 during preflight] Consulted Devin on 2026-10-23 21:29 UTC up to commit 576fe22 (the branch squashed onto the rewritten stack). It reviewed the four conflict-resolved files and raised one new finding, the default caption's translation in the badge preview (thread left open for Andrew's decision). Its earlier findings stay closed. No Investigate flags.

andrew-polk and others added 3 commits October 23, 2026 14:40
They were not in the old tab; the card now stacks the code, status, branding summary and community invitation as the WinForms tab does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…16734)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed legacy copy (BL-16734)

The page's intro and invitation markup now live in SubscriptionPage.tsx, so it imports nothing from the WinForms tab. That tab (LegacySubscriptionSettings) keeps master's markup and gets deleted whole at cutover.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrew-polk

Copy link
Copy Markdown
Contributor Author

[Claude Opus 5.5 during preflight] Consulted Devin on 2026-10-23 22:09 UTC up to commit c25469c (adds the e2e test only). Nothing new; the default-caption thread stays open for Andrew's decision. No Investigate flags.

andrew-polk and others added 6 commits October 23, 2026 15:48
…og (BL-16734)

Badges open the React dialog with no fallback to C# (a badge on a WinForms tab does nothing until cutover); the subscription GET without a code describes the collection; the Subscription value is built like the other sections; the code box carries its own styles instead of the legacy stylesheet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Style (the front/back matter packs, with the chosen one's description), QR Codes with a live preview of the badge (new GET collection/qrCodeBadge gives its QR code, made by the code the books use, and the default caption), and Places. Page Numbering Style goes with the Languages page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reuses the WinForms tab's panel; the dialog keeps the administrators (checked in the client) and the folder to create a Team Collection in, which C# applies after saving. The page is hidden when the feature is off outside a Team Collection, and for a Bloom Library book downloaded for editing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d administrators (BL-16735)

A collection becoming a Team Collection in the same save now gets the Team Collection subscription rule, so it cannot take a Pro code with it. Saved administrators are no longer re-checked by the browser's stricter email rule, which blocked every save for an address like admin@intranet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ename is unsaved (BL-16735)

Reverses PLAN Q12: the Create dialog's Create & Restart now has the settings dialog save at once (the user's other edits first, so they reach the shared copy), then create the Team Collection and restart, as in the old dialog. While the collection name has an unsaved edit, Create is disabled with a note to save the rename first; otherwise the Team Collection would get the old name, which is also the name the Create dialog asks the user to approve.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
BL-16734 made CollectionSettingsValues.Subscription a copy made in the constructor that populating overwrites; the Team Collection values, which follow its pattern, now do the same instead of keeping a posted object.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
andrew-polk and others added 4 commits October 23, 2026 16:16
The new dialog's Languages page: Language 1, 2, 3 and the Sign Language, each with the
existing language chooser opened as a nested dialog (Set and Remove for the optional ones),
a Default Font picker, and a More sub-page with the tool font size, line spacing, Asian word
breaking and right-to-left. Language 1's More page also edits the reader tools' alphabet and
sentence punctuation, written into ReaderToolsSettings-<L1>.json without touching its stages
and levels; locked while Language 1 is being changed or when that file is damaged. Page
Numbering Style moves to this page (only in the dialog's JSON). Front & Back Matter's badge
preview now follows the draft languages: the page sends the badge language's tag and supplies
its name itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…habet (BL-16739)

A journey through the new Collection Settings dialog: choose Language 1's Default Font, then on its More page a line spacing and a new alphabet, press Restart, and check the collection file, the reader tools' settings (stages kept) and the reopened dialog. New helpers address one language's group, its font picker and its More page. Needs the Config-R fix in sillsdev/config-r#31: without it an edit on a More page jumps back to the Languages page.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ges (BL-16739)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…m re-renders (BL-16739)

Edits on a language's More page no longer send the user back to the Languages page (sillsdev/config-r#31).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrew-polk
andrew-polk force-pushed the BL-16739-languages-page branch from f9135d1 to 330705a Compare October 23, 2026 23:18
@andrew-polk

Copy link
Copy Markdown
Contributor Author

[Claude Opus 5.5 during preflight] Consulted Devin up to 330705a (after the rebase onto BL-16735 01c8b47 and the Config-R alpha.32 bump): no new findings. The four it still lists come from earlier commits, and their threads here are already settled.

andrew-polk and others added 4 commits October 23, 2026 16:23
…BL-16733)

The packs, whether the branding chose one, and the default caption come in GET collection/settings, whose value is the pack the books really get; the page no longer reads the old dialog's settings/xmatter. The badge's QR code is an image from collection/qrCode?tag=, and its language comes from the dialog's values. The preview uses the values as they will be saved. The QR link rule is written once in BookStorage. The caption's compare-on-save rule is documented.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…BL-16735-team-collection-settings

# Conflicts:
#	src/BloomBrowserUI/collection/CollectionSettingsDialog.test.tsx
#	src/BloomBrowserUI/collection/CollectionSettingsDialog.tsx
#	src/BloomBrowserUI/collection/collectionSettingsTypes.ts
#	src/BloomExe/web/controllers/CollectionSettingsApi.cs
#	src/BloomExe/web/controllers/CollectionSettingsTypes.cs
…16739

BL-16733 now makes the badge preview follow the dialog's languages and shows the QR code as an image from collection/qrCode, so this branch's collection/qrCodeBadge?tag= fetch and QrCodeBadgeData give way to it. Kept: DefaultFontName in the GET, ReaderToolsValues, and valuesToSaveFrom (which also cleans an edited alphabet), now behind the base's currentValuesToSave. The default-caption decision comment moves to DefaultQrcodeCaption, and the unsaved-sign-language preview test is rewritten for the image.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@andrew-polk

Copy link
Copy Markdown
Contributor Author

[Claude Opus 5.5 during preflight] Consulted Devin up to e4d6a05 (the merge of BL-16735 with BL-16733's one-GET Front & Back Matter page): no new findings. The four it still lists come from earlier commits, and their threads here are already settled; the default-caption comment moved with the code to DefaultQrcodeCaption in the settings GET.

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