fix(settings): show project full name in settings sidebar ProjectSelector - #2674
Open
Sebastian-ubs wants to merge 3 commits into
Open
fix(settings): show project full name in settings sidebar ProjectSelector#2674Sebastian-ubs wants to merge 3 commits into
Sebastian-ubs wants to merge 3 commits into
Conversation
…lector The settings sidebar's <ProjectSelector> was adapting its ProjectInfo input by mirroring `projectName` into both `shortName` and `fullName` (see the compromise comment on settings-sidebar.component.tsx). That tripped the selector's `fullName === shortName` de-dup rule and rows rendered a single line, unlike every other <ProjectSelector> in the app (manage-books, checks side panel), which query `platform.fullName` alongside `platform.name` and pass both through. Fix at the source: * Extend the SettingsSidebar public `ProjectInfo` shape with an optional `projectFullName`. When present it feeds the selector's `fullName`; when absent the adapter still mirrors `projectName` so the de-dup rule keeps single-line rendering (no visual regression for consumers who don't upgrade). * settings-tab.component.tsx (the only in-repo caller) replaces its single-setting `getProjectName` helper with a `getProjectNames` that fetches `platform.name` and `platform.fullName` in parallel — mirroring `checks-side-panel.web-view.tsx:43-48`. Empty `platform.fullName` is collapsed to undefined so legacy projects still render a single line. Co-authored-by: Claude <noreply@anthropic.com>
Sebastian-ubs
requested review from
irahopkinson,
jolierabideau,
lyonsil,
rolfheij-sil and
tjcouch-sil
as code owners
August 13, 2026 15:06
The settings sidebar's <ProjectSelector> now sets `triggerLabelFormat="shortNameAndFullName"`, matching the manage-books wide sidebar. Legacy projects (empty `platform.fullName`) still collapse to shortName-only via the selector's de-dup rule, so no visual regression there. Story updates so the layouts are visible in Storybook: * settings-sidebar.stories.tsx: sampleProjects now carries distinct `projectName` (short) + `projectFullName` (long). Without both, the de-dup rule flattens the trigger and rows to a single line. * project-selector.stories.tsx: added `ShortNameTriggerLabel` at the same 320px width as `WideTriggerLabel` for a side-by-side compare. Includes the platform-bible-react dist rebuild so the renderer picks up the new ProjectInfo shape. Co-authored-by: Claude <noreply@anthropic.com>
Two legacy-project fixture stories now lead the single-project region:
* `ShortNameTriggerLabel` — `triggerLabelFormat="shortName"` with
`fullName` mirrored to `shortName`, so both trigger and popover rows
collapse to a single line.
* `ShortNameTriggerLabelNoScrollGroups` — same fixtures with
`openTabs={[]}`, suppressing the scroll-group chips and rendering
every row muted (the "not open anywhere" state).
`SingleProject` and `WideTriggerLabel` follow so the docs read
short → short-plain → default → wide.
Co-authored-by: Claude <noreply@anthropic.com>
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
The settings sidebar's
<ProjectSelector>was rendering each project as a single-line row (shortNameonly). Every other<ProjectSelector>consumer in the app (manage-books, checks side panel) shows a two-line row: short name over a muted full name. This PR aligns the settings sidebar with that pattern.Root cause
SettingsSidebaraccepts a publicProjectInfoshape with a singleprojectNamestring. Its internal adapter mirrored that string into bothshortNameandfullNameon theProjectSelectorProject, which trips ProjectSelector'sfullName === shortNamede-dup rule (present to avoid rendering the same string twice) — so the second line was correctly suppressed. That behaviour is right for callers that genuinely only have one name; the settings sidebar isn't one of them.Fix, at the source
SettingsSidebar.ProjectInfowith an optionalprojectFullName. The adapter now usesprojectFullName ?? projectNameforfullName. When callers upgrade to supply it, rows render two lines. When they don't, the de-dup rule still collapses to a single line — no visual regression.SettingsSidebar— replaces its single-settinggetProjectNamehelper withgetProjectNames, which fetchesplatform.nameandplatform.fullNamein parallel from theplatform.basePDP. This mirrors the pattern inextensions/src/platform-scripture/src/checks-side-panel.web-view.tsx:43-48. Emptyplatform.fullNameis collapsed toundefinedso projects without one still render single-line.Test plan
platform.nameandplatform.fullName(e.g. any manage-books-visible standard project). Confirm the sidebar's project picker rows now show short name over full name.platform.fullNameset (or an empty one). Confirm the row still renders as a single line (short name only).npm run typecheck:core— clean.npm --workspace lib/platform-bible-react run lint— clean.npm --workspace lib/platform-bible-react run test -- --run src/stories/advanced/settings/settings-sidebar.stories.tsx— 6 story smoke-tests pass.Scope
This PR only touches the settings-tab / SettingsSidebar path. Consumers of
SettingsSidebaroutside this repo (if any) don't need to change —projectFullNameis optional and the fallback preserves prior behaviour.AI-assisted.
This change is
before:

after:
