Skip to content

feat: update theme selector in preferences modal - #6550

Merged
bijin-bruno merged 1 commit into
mainfrom
feat/improve-pref-modal-theme
Dec 29, 2025
Merged

bijin-bruno merged 1 commit into
mainfrom
feat/improve-pref-modal-theme

Conversation

@bijin-bruno

@bijin-bruno bijin-bruno commented Dec 29, 2025 •

Copy link
Copy Markdown
Collaborator

Description

Update theme selector UX in preferences modal

Contribution Checklist:

  • I've used AI significantly to create this pull request
  • The pull request only addresses one issue or adds one feature.
  • The pull request does not introduce any breaking changes
  • I have added screenshots or gifs to help explain the change if applicable.
  • I have read the contribution guidelines.
  • Create an issue and link to the pull request.

Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.

Publishing to New Package Managers

Please see here for more information.

Summary by CodeRabbit

  • New Features

    • Icon-based theme mode selector (Light, Dark, System) replaces prior radio controls
    • Icons added to Preferences tab labels for clearer navigation
    • Theme previews now derive colors from selected themes for more accurate visuals
  • Style

    • Simplified theme display names (e.g., "Bruno Light" → "Light")
    • Enhanced interactive styling for theme options (hover/selected states, borders, backgrounds)
    • Adjusted theme card sizing and section spacing; reduced emphasis on variant labels

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Dec 29, 2025 •

Copy link
Copy Markdown
Contributor

Caution

Review failed

The pull request is closed.

Walkthrough

Reworks theme preferences UI: introduces an icon-based appearance mode selector (light/dark/system), derives preview colors from theme objects, updates theme option styles and spacing, increases variant card min-width, and renames several theme display names (removes "Bruno" prefix). No public APIs changed.

Changes

Cohort / File(s) Summary
Themes Styling
packages/bruno-app/src/components/Preferences/Themes/StyledWrapper.js
Removed old layout scaffolding; added wrapper padding; replaced radio-style layout with .theme-mode-option rules (border, radius, padding, hover, .selected state); increased .theme-variant-card min-width to 165px and added cursor: default when selected; adjusted .section-divider margin to 15px; preserved .theme-variants flex/wrap.
Theme Mode & Preview Logic
packages/bruno-app/src/components/Preferences/Themes/index.js
Added imports (rgba, theme helpers, icons); ThemePreview now reads colors from theme objects (theme.background.base, theme.sidebar.bg, theme.brand) with fallbacks; computes lineColor via rgba; introduced themeModes array (light/dark/system) with icons; replaced radio controls with icon-based selector and handleModeChange to update storedTheme; reorganized render to map themeModes and theme variants.
Preferences Tabs UI
packages/bruno-app/src/components/Preferences/index.js
Added Tabler icons to each preference tab label (General, Themes, Display, Proxy, Keybindings, Support, Beta); tab behavior unchanged.
Theme Registry Names
packages/bruno-app/src/themes/index.js
Renamed display names in themeRegistry: Bruno Light → Light, Bruno Light Pastel → Light Pastel, Bruno Dark → Dark, Bruno Dark Monochrome → Dark Monochrome, Bruno Dark Pastel → Dark Pastel.

Sequence Diagram(s)

(omitted — changes are UI/stylesheet and do not introduce multi-component sequential flows)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • helloanoop
  • lohit-bruno
  • naman-bruno

Poem

🎨 Icons, borders, colors blend,
Light, dark, system now ascend.
Previews pull from theme and brand,
Cards grown wider, styled by hand.
A tiny tweak, a brighter land ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: updating the theme selector UI in the preferences modal with new icon-based controls and styling.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4f492a6 and 038fdbb.

📒 Files selected for processing (4)
  • packages/bruno-app/src/components/Preferences/Themes/StyledWrapper.js
  • packages/bruno-app/src/components/Preferences/Themes/index.js
  • packages/bruno-app/src/components/Preferences/index.js
  • packages/bruno-app/src/themes/index.js

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Dec 29, 2025 •

Copy link
Copy Markdown

CLI Test Results

  1 files  ±0  140 suites  ±0   55s ⏱️ +4s
235 tests ±0  235 ✅ ±0  0 💤 ±0  0 ❌ ±0 
301 runs  ±0  300 ✅ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit 4f492a6. ± Comparison against base commit 6d77cac.

♻️ This comment has been updated with latest results.

@bijin-bruno
bijin-bruno force-pushed the feat/improve-pref-modal-theme branch from f37189e to 4f492a6 Compare December 29, 2025 21:28

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6d77cac and f37189e.

📒 Files selected for processing (4)
  • packages/bruno-app/src/components/Preferences/Themes/StyledWrapper.js
  • packages/bruno-app/src/components/Preferences/Themes/index.js
  • packages/bruno-app/src/components/Preferences/index.js
  • packages/bruno-app/src/themes/index.js
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (CODING_STANDARDS.md)

**/*.{js,jsx,ts,tsx}: Use 2 spaces for indentation. No tabs, just spaces
Stick to single quotes for strings. For JSX/TSX attributes, use double quotes (e.g., )
Always add semicolons at the end of statements
No trailing commas
Always use parentheses around parameters in arrow functions, even for single params
For multiline constructs, put opening braces on the same line, and ensure consistency. Minimum 2 elements for multiline
No newlines inside function parentheses
Space before and after the arrow in arrow functions. () => {} is good
No space between function name and parentheses. func() not func ()
Semicolons go at the end of the line, not on a new line
Names for functions need to be concise and descriptive
Add in JSDoc comments to add more details to the abstractions if needed
Add in meaningful comments instead of obvious ones where complex code flow is explained properly

Files:

  • packages/bruno-app/src/components/Preferences/index.js
  • packages/bruno-app/src/themes/index.js
  • packages/bruno-app/src/components/Preferences/Themes/index.js
  • packages/bruno-app/src/components/Preferences/Themes/StyledWrapper.js
🧠 Learnings (4)
📚 Learning: 2025-12-17T21:41:24.730Z
Learnt from: naman-bruno
Repo: usebruno/bruno PR: 6407
File: packages/bruno-app/src/components/Environments/ConfirmCloseEnvironment/index.js:5-41
Timestamp: 2025-12-17T21:41:24.730Z
Learning: Do not suggest PropTypes validation for React components in the Bruno codebase. The project does not use PropTypes, so reviews should avoid proposing PropTypes and rely on the existing typing/validation approach (e.g., TypeScript or alternative runtime checks) if applicable. This guideline applies broadly to all JavaScript/JSX components in the repo.

Applied to files:

  • packages/bruno-app/src/components/Preferences/index.js
  • packages/bruno-app/src/themes/index.js
  • packages/bruno-app/src/components/Preferences/Themes/index.js
  • packages/bruno-app/src/components/Preferences/Themes/StyledWrapper.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Use styled component's theme prop to manage CSS colors and not CSS variables when in the context of a styled component or any React component using the styled component

Applied to files:

  • packages/bruno-app/src/components/Preferences/Themes/index.js
  • packages/bruno-app/src/components/Preferences/Themes/StyledWrapper.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Styled Components are used as wrappers to define both self and children components style; Tailwind classes are used specifically for layout based styles

Applied to files:

  • packages/bruno-app/src/components/Preferences/Themes/StyledWrapper.js
📚 Learning: 2025-12-05T20:31:33.005Z
Learnt from: CR
Repo: usebruno/bruno PR: 0
File: CODING_STANDARDS.md:0-0
Timestamp: 2025-12-05T20:31:33.005Z
Learning: Applies to **/*.{jsx,tsx} : Styled Component CSS might also change layout but Tailwind classes shouldn't define colors

Applied to files:

  • packages/bruno-app/src/components/Preferences/Themes/StyledWrapper.js
🧬 Code graph analysis (1)
packages/bruno-app/src/components/Preferences/Themes/index.js (1)
packages/bruno-app/src/themes/index.js (1)
  • themes (15-29)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: SSL Tests - Linux
  • GitHub Check: SSL Tests - macOS
  • GitHub Check: SSL Tests - Windows
  • GitHub Check: Playwright E2E Tests
  • GitHub Check: Unit Tests
🔇 Additional comments (10)
packages/bruno-app/src/components/Preferences/index.js (2)

4-4: LGTM: Icon imports are properly utilized.

All seven icon imports are used in the tab elements below, providing consistent visual indicators across the preferences navigation.


63-88: LGTM: Consistent icon integration across all tabs.

The icon additions are uniform (size={16}, strokeWidth={1.5}) and enhance the visual hierarchy of the tab navigation. Good attention to consistency.

packages/bruno-app/src/components/Preferences/Themes/index.js (4)

2-5: LGTM: New imports support dynamic theming.

The imports correctly bring in rgba for color manipulation and theme mode icons for the new UI controls.


51-55: LGTM: Well-structured theme mode configuration.

The themeModes array cleanly maps keys to labels and icons. This makes the rendering logic straightforward.


84-102: LGTM: Theme mode selector implementation is solid.

The dynamic strokeWidth (isSelected ? 2.5 : 1.5) provides excellent visual feedback for the selected state. The button structure and event handling are correct.


9-13: All themes have the required properties; this concern is unfounded.

All 13 themes in the codebase (dark, light, dark-monochrome, dark-pastel, light-monochrome, light-pastel, catppuccin-frappe, catppuccin-macchiato, catppuccin-mocha, catppuccin-latte, nord, vscode-light, vscode-dark) consistently define background.base, sidebar.bg, and brand. The fallback mechanism also ensures that even if an invalid themeId is passed, the code safely defaults to either 'dark' or 'light' theme, both of which have all required properties.

Likely an incorrect or invalid review comment.

packages/bruno-app/src/components/Preferences/Themes/StyledWrapper.js (3)

5-5: LGTM: Explicit padding improves readability.


28-28: LGTM: Increased min-width accommodates longer theme names.

The change from 120px to 165px ensures theme variant cards display names like "Light Monochrome" without truncation.


77-77: LGTM: Reduced margin tightens visual spacing.

packages/bruno-app/src/themes/index.js (1)

35-65: LGTM: Theme name simplification improves UX.

Removing the "Bruno" prefix from built-in themes while preserving third-party branding (Catppuccin, Nord, VS Code) is appropriate. The names are more concise for UI display. Verified no hard-coded references to old theme names exist elsewhere in the codebase.

@bijin-bruno
bijin-bruno force-pushed the feat/improve-pref-modal-theme branch from 4f492a6 to 038fdbb Compare December 29, 2025 21:52
@bijin-bruno
bijin-bruno merged commit 41b37c7 into main Dec 29, 2025
@coderabbitai coderabbitai Bot mentioned this pull request Jan 6, 2026
4 of 6 tasks
@coderabbitai coderabbitai Bot mentioned this pull request Jan 30, 2026
4 of 6 tasks
@coderabbitai coderabbitai Bot mentioned this pull request Mar 22, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Jun 17, 2026
4 tasks
maxenceleblanc pushed a commit to maxenceleblanc/curly_cats2 that referenced this pull request Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant