Repository navigation
feat: update theme selector in preferences modal - #6550
Conversation
|
Caution Review failedThe pull request is closed. WalkthroughReworks 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
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
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
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 |
f37189e to
4f492a6
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
packages/bruno-app/src/components/Preferences/Themes/StyledWrapper.jspackages/bruno-app/src/components/Preferences/Themes/index.jspackages/bruno-app/src/components/Preferences/index.jspackages/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()notfunc ()
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.jspackages/bruno-app/src/themes/index.jspackages/bruno-app/src/components/Preferences/Themes/index.jspackages/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.jspackages/bruno-app/src/themes/index.jspackages/bruno-app/src/components/Preferences/Themes/index.jspackages/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.jspackages/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, andbrand. The fallback mechanism also ensures that even if an invalidthemeIdis 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.
4f492a6 to
038fdbb
Compare
Description
Update theme selector UX in preferences modal
Contribution Checklist:
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
Style
✏️ Tip: You can customize this high-level summary in your review settings.