PT-4579: Percent stepper for the content-zoom default; Settings layout - #2818
Closed
rolfheij-sil wants to merge 7 commits into
Closed
rolfheij-sil wants to merge 7 commits into
rolfheij-sil wants to merge 7 commits into
Conversation
…pporter settings get their own group Reorders the General settings group so visible settings read interface language, zoom factor, content zoom, then the hidden book-keeping entries. Interface mode is now hidden, since the Simple/Power toggle lives in the profile popover and a Settings entry would be a redundant second switch. Request timeout and the registration reminder move into a new Supporter settings group, for settings a support person adjusts rather than day-to-day translation settings. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…a decimal Add PercentStepper, a +/-/reset control that displays a factor as a percentage and clamps every step to the caller's own min/max/step rather than the shared zoom constants, so callers with different bounds don't get a control that silently ignores them. Optimistic display keeps two quick presses from racing the stored value's round-trip through the platform's subscription. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ecimal factor Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…o a tenth Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ent wording for the zoom stepper Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ses are confirmed Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…presses step from the last emitted factor Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Contributor
Author
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.
Summary
Work item 4 of the per-pane content-zoom epic (PT-4575): the Settings side of content zoom, plus the General / Supporter layout the Epic Lead agreed with UX on 2026-09-14.
platform.webViewContentZoomrenders as−·100 %·+· reset instead of a text box holding a decimal factor. A new renderer-internalPercentStepper(Button + lucide icons,role="group", localized aria-labels,aria-livereadout, buttons disabled at the bounds and reset disabled at the default). It writes through the existing validate →setSettingtail without the text box's 500 ms debounce, so a press reaches following panes immediately (PT-3236 is sidestepped for this control only). Bounds, step and default come from the shared content-zoom constants; rounding follows the caller'sstep.%settings_platform_zoomFactor_label_2%, with a deprecation entry for the shipped key inmetadata.json, per the Localization Guide's immutable-strings rule); "Zoom" → Tab content default zoom in place (never shipped); the content-zoom description is rewritten in percent terms and names Interface Scaling. Spanish keeps the two distinguishable ("Escalado de la interfaz" / "Zoom predeterminado del contenido de la pestaña").platform.zoomFactor's control and behaviour are untouched (PT-3458 stays a no-go).user-profile-popover.component.tsx,platform-bible-toolbar.tsx), so a Settings entry would be a second switch for the same value.Nothing zooms yet on its own: the default this control edits is applied by #2803 to panes that mark a zoom area, and the first such pane is PT-4581.
Why review this
Part of the current epic (PT-4575). This is the user-facing default for content zoom and the Settings relabel the PRD's terminology rule depends on.
Decisions worth a look
adjustZoomFactor. That helper hard-codes the shared step and bounds, which would make the component'smin/max/stepprops decorative. It clamps to the props and rounds to the step's precision; the one call site passes the shared constants, so behaviour is identical.handleChangeSettingaccepts a raw number for the stepper, next to the existing change-event, boolean and string-array cases, and is now auseCallback(it joinedgenerateComponent's dependency list).es.jsonhad been missing, which the new group would otherwise show half in English.repo-patches/paranext-core.patchoverrides the two relabelled keys and the General group metadata; that refresh belongs to PT-4585.e2e-testsand the settings components found no assertion on the old labels or the General-group order; the zoom hits there are the Enhanced Resources media viewer, a different feature.Testing
/review-paratext(four analyzer passes) and an OpenCodeReview delegate pass ran on the branch. One Critical (the in-place relabel of a shipped string, fixed via the new key) and the Important items are fixed here: tooltips on the three icon buttons andButtonGroupper the Storybook guidelines, the glossary page, a story, the description in percent terms, and the stepper's readout following the stored value. Defaults applied without a ruling: "Interface Scaling" keeps UX's capital S although the capitalization guideline prefers sentence case; "Tab content default zoom" stays and its description explains it as the default for every pane in a tab; the Supporter group gained a description.percent-stepper.component.test.tsx(19 cases: display, step up/down/reset, bounds, disabled, keyboard reachability, group label, optimistic double-press, prop catch-up, quarter and five-hundredths steps, tenth-step exactness).setting.component.test.tsx: the stepper renders forplatform.webViewContentZoomand no text box; a press writes the stepped factor throughsetSetting;platform.zoomFactorstill renders a text box.core-settings-info.data.test.ts: visible General order; Supporter group membership; moved settings keep keys, labels, defaults and validators; Interface mode hidden; every setting declared exactly once across groups.shipped-locale-assets.test.tsgreen.Risk Level
Low–Medium. Relabels two visible settings and regroups two more; the new control is confined to one setting key.
AI-assisted — Claude Code (Fable 5.1 coordinating; Opus design pass; per-task Sonnet agents under TDD; Sonnet verification pass).
🤖 Generated with Claude Code
This change is