Repository navigation
refactor(web): share the admin settings save bar - #1919
Conversation
The admin settings save bar is about to move to components/ so the collection editor can share it. Pinning its rendered markup on General and Playback proves the move leaves every settings page unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The collection editor needs the same floating save bar the admin settings pages use. Moving it out of pages/admin-settings lets both import one component instead of growing a second copy. No markup changes; the settings pages render it exactly as before. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The collection editor needs the save bar under its page container in either shell, not centred beside the admin sidebar. placement="page" starts at the sidebar edge both shells already publish in --app-sidebar-offset, rises above the background playback bar by a new --main-inset-bottom that Layout and AdminLayout set on <main>, and announces only its message inside a labelled region. message and discardLabel let the editor name its staged fields and offer Cancel. Settings pages keep the default placement and render as before. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…e with content The page placement rose by a hard-coded 8rem/9rem, which overlapped the taller stacked watch bar on phones, and in the admin shell at lg its scroll room left the end of the page under the raised bar. It now rises by --playback-bar-clearance, derived on :root from the playback bar heights usePlaybackBarHeight already measures, and its spacer and scrim include that clearance. Both shells publish --page-gutter and pad by it, so the bar lines up with the content column at every width. The editor's create mode needs the bar before anything is staged, so visible, tone and label are opt-in props. The page status stays mounted, empty, while the bar is hidden, so the first change is announced. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Problem
Related issue: #192
Validation tasks: none. The settings pages keep the same save bar markup, and no other page uses the new options yet.
The collection editor in the collections redesign needs a save bar along the bottom of the page, in both the user and admin shells. The only save bar today is the admin settings pill under
pages/admin-settings/, which is laid out for the admin sidebar alone. A second copy for the editor would leave two bars to keep in step. This PR moves the settings save bar tocomponents/SaveBarand adds opt-in options for a page placement. Nothing visible changes.Stacked on #1918 (
fix(web): wait for Save before removing a personal poster).Approach
git mvmovesSaveBar.tsxand its test toweb/src/components/. Its 13 importers now import@/components/SaveBar. Those are the AI, Appearance, Compatibility Proxies, Downloads, General, Infrastructure, Library Metadata, Notifications, Playback, Providers, Requests, Security & Access and Sign-in settings pages.role="status"wrapper.placement="page"docks a bar up to 1000px wide, the page container's width, along the bottom of the page:--app-sidebar-offsetand pads by the shell's content gutter, so its edges line up with the content column.app.csscombines the--watch-bar-heightand--audiobook-bar-heightvalues thatusePlaybackBarHeightalready sets into one--playback-bar-clearancevariable.messagereplaces "N unsaved changes", anddiscardLabelturns Discard into Cancel. For the page placement only,visibleshows the bar before any edit,tone="idle"mutes the dot, andlabelrenames the region. "Create collection", disabled until the form is ready, uses the existingsaveLabelandcanSave.Layout.tsxandAdminLayout.tsxpublish their horizontal padding as--page-gutterand pad with it. The computed padding at each breakpoint is the same as before.No API change. jellycompat, the Apple and Android clients and the user manual need no change.
Validation
tsc -bandmake test-webpass.SaveBar.test.tsxpasses with only its import path changed.make verify-local-pathspasses. No Go, contract or migration files changed, so the Go and contract checks were not run.make verify-case-collisionsdoes not exist on this base and was not run.Risks
placement="page"yet. The collection editor will be the first, and it needs a visual check in both shells, with and without a playback bar.Buttonclass strings, so a later change toButtonstyling will need those snapshots updated.lg:pb-8still drops the playback-bar padding for admin pages. This PR doesn't change that. The page bar's own spacer covers the gap only for pages that use it.Checklist
AI Disclosure
🤖 Generated with Claude Code
Note
Move
SaveBarfrom admin-settings to shared components and add page-docked modeSaveBarcomponent from SaveBar.tsx to SaveBar.tsx and updates imports across all admin settings pagesLayoutandAdminLayoutnow expose a responsive page-gutter custom property via padding, and app.css adds a root-level playback clearance variable, so fixed page chrome can read active spacing valuesSaveBarsave action no longer forwards the click event to the callback; its status node stays mounted while hidden for first-change announcementsMacroscope summarized 0b4d94f.