feat: redesign settings pages with improved UI#2224
feat: redesign settings pages with improved UI#2224
Conversation
- Add icons and group nav into sections - Visual theme picker with color previews - Segmented light/dark/system toggle - Card-based layout for settings sections - Alby Account: profile info with ProBadge - Locked themes trigger UpgradeDialog - Sidebar: startsWith for active states Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (1)
frontend/src/components/layouts/SettingsLayout.tsx (1)
188-238: Align new navigation UI wrappers with the shadcn-only UI guideline.
NavGroupand the custom-renderedMenuItemare UI primitives underfrontend/src/components. Please migrate to shadcn/ui primitives (or explicitly document why no shadcn equivalent exists for this case).As per coding guidelines,
frontend/src/components/**/*.{ts,tsx}: Use shadcn/ui components for all UI — do not create custom components unless no shadcn equivalent exists.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@frontend/src/components/AppSidebar.tsx`:
- Line 145: The active-state check in AppSidebar is using
location.pathname.startsWith(item.url) which treats routes like /appstore/... as
active for /apps; update the isActive logic in the AppSidebar component so it
only matches exact path or a proper path boundary: use location.pathname ===
item.url || location.pathname.startsWith(item.url + "/") (or equivalent
boundary-aware matching) when computing the isActive prop for each item
(reference: isActive, location.pathname, item.url in AppSidebar.tsx).
In `@frontend/src/screens/settings/AlbyAccount.tsx`:
- Around line 42-53: The profile card currently uses {albyMe.name ||
albyMe.email} so accounts with a display name hide the email; update the JSX
around the albyMe rendering (the element containing the span with truncate and
the subsequent secondary block that currently only shows
albyMe.lightning_address) to always render the email as the secondary line and
render albyMe.lightning_address as an additional line below it when present;
locate the relevant components/JSX by the albyMe identifier, the ProBadge usage
and the ZapIcon element, adjust the conditional rendering so primary shows
albyMe.name (or email if name missing) and a separate secondary block always
shows albyMe.email and, if albyMe.lightning_address exists, an extra line with
ZapIcon plus the lightning_address.
In `@frontend/src/screens/settings/Settings.tsx`:
- Around line 243-265: The appearance option buttons only communicate selection
visually—update the mapped button elements (the ones iterating darkModeOptions
and calling setDarkMode) to expose state to assistive tech by adding
aria-pressed={darkMode === option.value} and a clear accessible name (e.g.,
aria-label={option.label}) so screen readers announce the current mode;
alternatively you may convert the wrapper to role="radiogroup" and each option
to role="radio" with aria-checked={darkMode === option.value}, but the minimal
fix is adding aria-pressed and aria-label to the existing buttons.
- Around line 150-238: The theme card is rendered as a plain div for locked
themes, removing it from keyboard focus; change the card wrapper to always be a
<button> element (use the same key prop) so UpgradeDialog receives a button
trigger and keyboard users can tab to it, and add accessibility props:
aria-pressed={isSelected} and aria-disabled={isDisabled}. For the enabled case
keep the onClick handler that calls setTheme(t) and toast("Theme updated."), and
for the disabled case let UpgradeDialog wrap the same button but remove the
onClick (or keep it inert) and rely on aria-disabled to indicate state; update
references to themeCard, isDisabled, isSelected, UpgradeDialog, setTheme, and
toast accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: a97ad155-17cd-4ec0-8c5c-fe8fbb391963
📒 Files selected for processing (5)
frontend/src/components/AppSidebar.tsxfrontend/src/components/SettingsHeader.tsxfrontend/src/components/layouts/SettingsLayout.tsxfrontend/src/screens/settings/AlbyAccount.tsxfrontend/src/screens/settings/Settings.tsx
- Sidebar: boundary-aware route matching - Theme cards: use button for keyboard a11y - Appearance toggle: add aria-pressed - Alby Account: show email when name exists Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use actual theme classes with CSS variables instead of hardcoded hex colors for theme preview cards. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Use CSS theme classes directly on preview elements with a theme-default wrapper for proper fallback. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…redesign # Conflicts: # frontend/src/themes/default.css
Summary
startsWithmatching so Settings stays highlighted on sub-pagesScreenshots
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes