-
Notifications
You must be signed in to change notification settings - Fork 300
feat(color-select-panel): [color-select-panel]modify smb-theme #1837
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
WalkthroughThe changes enhance the color select panel's usability and aesthetics, implementing a more compact design and streamlined styles. Key updates include style modifications in LESS files, the introduction of new CSS variables for better customization, and improvements to the Vue component structure. These adjustments not only refine visual elements but also support a cohesive theming approach across the application, adding new features and simplifying the configuration. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant ColorSelectPanel
participant Button
participant Input
User->>ColorSelectPanel: Open color select panel
ColorSelectPanel->>Input: Render input fields
ColorSelectPanel->>Button: Render buttons with size="small"
User->>Button: Click a color option
Button->>ColorSelectPanel: Update selected color
ColorSelectPanel->>User: Display selected color
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
[e2e-test-warn] The title of the Pull request should look like "fix(vue-renderless): [action-menu, alert] fix xxx bug". Please make sure you've read our contributing guide |
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (7)
- packages/theme/src/color-select-panel/index.less (5 hunks)
- packages/theme/src/color-select-panel/smb-theme.js (1 hunks)
- packages/theme/src/color-select-panel/vars.less (1 hunks)
- packages/theme/src/theme.config.js (1 hunks)
- packages/theme/src/theme/infinity-theme/component-vars.js (1 hunks)
- packages/theme/src/vars.less (1 hunks)
- packages/vue/src/color-select-panel/src/pc.vue (1 hunks)
Additional comments not posted (39)
packages/theme/src/color-select-panel/smb-theme.js (6)
2-2
: LGTM!The variable
ti-color-select-panel-border-radius-xs
is correctly defined and uses a common border radius variable.
3-3
: LGTM!The variable
ti-color-select-panel-border-radius-sm
is correctly defined and uses a common border radius variable.
4-4
: LGTM!The variable
ti-color-select-panel-tools-line-height
is correctly defined and uses a common size height variable.
5-5
: LGTM!The variable
ti-color-select-panel-btn-margin
is correctly defined and uses a fixed margin value.
6-6
: LGTM!The variable
ti-color-select-panel-collapse-color
is correctly defined and uses a common color variable.
7-7
: LGTM!The variable
ti-color-select-panel-btn-border-hover-color
is correctly defined and uses a common color variable.packages/theme/src/color-select-panel/vars.less (6)
27-27
: LGTM!The variable
--ti-color-select-panel-bg-color
is correctly defined and uses a common color variable.
29-29
: LGTM!The variable
--ti-color-select-panel-btn-border-color
is correctly defined and uses a common color variable.
31-31
: LGTM!The variable
--ti-color-select-panel-btn-border-hover-color
is correctly defined and uses a common color variable.
33-33
: LGTM!The variable
--ti-color-select-panel-tools-line-height
is correctly defined and uses a common size height variable.
35-35
: LGTM!The variable
--ti-color-select-panel-btn-margin
is correctly defined and uses a fixed margin value.
37-37
: LGTM!The variable
--ti-color-select-panel-collapse-color
is correctly defined and uses a common color variable.packages/theme/src/vars.less (3)
69-69
: LGTM!The import statement for
skeleton-item/vars.less
has been correctly modified to include a semicolon, aligning with standard syntax practices.
70-70
: LGTM!The import statement for
color-picker/vars.less
is correctly defined.
71-71
: LGTM!The import statement for
color-select-panel/vars.less
is correctly defined.packages/theme/src/theme.config.js (1)
86-87
: Entries added correctly.The new entries 'color-select-panel' and 'color-picker' follow the existing pattern and are correctly added to the export.
packages/vue/src/color-select-panel/src/pc.vue (8)
6-6
: Addingsize="small"
totiny-input
The addition of
size="small"
totiny-input
improves the visual presentation by making the input field more compact.
8-11
: Addingsize="small"
totiny-button
The addition of
size="small"
totiny-button
improves the visual presentation by making the buttons more compact.
18-18
: Refining conditional rendering for history sectionThe use of a
div
for conditional rendering based onstate.stack.length
enhances the semantic structure of the HTML.
21-22
: Addingkey
tov-for
directiveIncluding the
key
in thev-for
directive improves performance and ensures correct rendering of list items.
29-29
: Refining conditional rendering for empty history sectionThe use of a
div
for conditional rendering whenstate.stack.length
is zero enhances the semantic structure of the HTML.
36-36
: Refining conditional rendering for predefined color sectionThe use of a
div
for conditional rendering based onstate.predefineStack.length
enhances the semantic structure of the HTML.
39-40
: Addingkey
tov-for
directiveIncluding the
key
in thev-for
directive improves performance and ensures correct rendering of list items.
47-47
: Refining conditional rendering for empty predefined color sectionThe use of a
div
for conditional rendering whenstate.predefineStack.length
is zero enhances the semantic structure of the HTML.packages/theme/src/color-select-panel/index.less (13)
10-10
: Reducing max-width to 264pxThe reduction of the max-width from 300px to 264px makes the panel more compact and visually appealing.
12-12
: Simplifying background color variableThe simplification of the background color variable to
--ti-color-select-panel-bg-color
improves readability and maintainability.
19-19
: Adding line-height to tools sectionThe addition of
line-height
to the tools section improves the layout consistency.
25-25
: Adding margin to button groupThe addition of
margin
to the button group improves the spacing and layout consistency.
27-33
: Styling tiny-buttonThe added styles for
tiny-button
enhance the visual presentation and interactivity of the buttons.
41-42
: Adjusting dimensions of color select areaThe adjustments to the width and height of the color select area make it more compact and visually appealing.
72-72
: Adjusting width of hue selectThe reduction of the width of the hue select makes the component more compact and visually appealing.
90-91
: Adjusting dimensions of alpha sliderThe adjustments to the width and height of the alpha slider make it more compact and visually appealing.
97-97
: Adding border-radius to alpha sliderThe addition of
border-radius
to the alpha slider enhances the visual presentation.
112-113
: Removing border from collapseThe removal of the border from the collapse component creates a cleaner interface.
115-124
: Styling collapse item headerThe added styles for the collapse item header enhance the visual presentation and interactivity.
Line range hint
126-142
:
Styling collapse item contentThe added styles for the collapse item content enhance the visual presentation and layout consistency.
146-151
: Styling collapse item wrap and arrowThe added styles for the collapse item wrap and the removal of the arrow create a cleaner interface.
packages/theme/src/theme/infinity-theme/component-vars.js (2)
381-381
: Addition of new property for button margins.The new property
'ti-color-select-panel-btn-margin': '8px'
enhances customization options for button margins in the color select panel.
380-380
: Addition of trailing comma for consistency.The trailing comma added after the last property maintains consistency and simplifies future additions.
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.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- packages/theme/src/theme.config.js (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- packages/theme/src/theme.config.js
f788099
to
6637fbe
Compare
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
New Features
Improvements
Bug Fixes