-
Notifications
You must be signed in to change notification settings - Fork 59
Refactor Expression Editor floating button styles for theming #925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… prop usage and update button titles for clarity in ChipExpressionEditor.
|
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 You can disable this status message by setting the ✨ 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the Expression Editor's floating button styles to improve theming consistency by removing conditional styling based on active state. The changes simplify the button appearance to use consistent theme colors across light and dark modes.
Key Changes
- Removed
isActiveprop-based conditional styling fromFloatingToggleButtonstyled component - Enhanced expand/minimize functionality to show the button in both expanded and collapsed states with appropriate icons
- Updated button titles for better clarity ("Helper Panel" suffix added)
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
styles.tsx |
Simplified FloatingToggleButton styles by removing isActive prop dependency and conditional theming; now uses consistent theme colors |
FloatingToggleButton.tsx |
Removed isActive prop from being passed to styled component while preserving it in aria-pressed for accessibility |
ChipExpressionEditor.tsx |
Enhanced expand/minimize button to display in both states with MinimizeIcon for expanded mode and ExpandIcon for collapsed mode; improved button titles |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| outline: none; | ||
| padding: 0; | ||
| box-shadow: ${props => props.isActive ? `0 0 0 1px ${ThemeColors.PRIMARY}` : '0 1px 2px rgba(0, 0, 0, 0.15)'}; | ||
| box-shadow: ${'0 1px 2px rgba(0, 0, 0, 0.15)'}; |
Copilot
AI
Nov 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary template literal wrapping for the box-shadow value. This can be simplified to:
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);| box-shadow: ${'0 1px 2px rgba(0, 0, 0, 0.15)'}; | |
| box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15); |
Purpose
Refactors the styling of the floating button within the Expression Editor to ensure correct and consistent appearance across different themes (e.g., light and dark modes).
Changes
Fixed: wso2/product-ballerina-integrator#1870