-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
refactor(tree-menu): [tree-menu] refactor tree-menu thems vars #2123
Conversation
WalkthroughThis pull request implements updates to the Changes
Possibly related issues
Possibly related PRs
Suggested labels
Poem
Tip OpenAI O1 model for chat
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (23)
- examples/sites/demos/pc/app/tree-menu/basic-usage-composition-api.vue (1 hunks)
- examples/sites/demos/pc/app/tree-menu/basic-usage.vue (1 hunks)
- examples/sites/demos/pc/app/tree-menu/clearable.spec.ts (1 hunks)
- examples/sites/demos/pc/app/tree-menu/default-expand-all-composition-api.vue (2 hunks)
- examples/sites/demos/pc/app/tree-menu/default-expand-all.vue (2 hunks)
- examples/sites/demos/pc/app/tree-menu/default-expanded-keys-composition-api.vue (2 hunks)
- examples/sites/demos/pc/app/tree-menu/default-expanded-keys-highlight-composition-api.vue (2 hunks)
- examples/sites/demos/pc/app/tree-menu/default-expanded-keys-highlight.vue (2 hunks)
- examples/sites/demos/pc/app/tree-menu/default-expanded-keys.vue (2 hunks)
- examples/sites/demos/pc/app/tree-menu/expand-on-click-node-composition-api.vue (2 hunks)
- examples/sites/demos/pc/app/tree-menu/expand-on-click-node.vue (2 hunks)
- examples/sites/demos/pc/app/tree-menu/props-composition-api.vue (2 hunks)
- examples/sites/demos/pc/app/tree-menu/show-checkbox-composition-api.vue (2 hunks)
- examples/sites/demos/pc/app/tree-menu/show-checkbox.vue (2 hunks)
- examples/sites/demos/pc/app/tree-menu/show-filter-composition-api.vue (2 hunks)
- examples/sites/demos/pc/app/tree-menu/show-filter.vue (2 hunks)
- examples/sites/demos/pc/app/tree-menu/show-number-composition-api.vue (2 hunks)
- examples/sites/demos/pc/app/tree-menu/show-number.vue (2 hunks)
- examples/sites/demos/pc/app/tree-menu/text-ellipsis-composition-api.vue (2 hunks)
- examples/sites/demos/pc/app/tree-menu/text-ellipsis.vue (2 hunks)
- packages/theme/src/tree-menu/index.less (5 hunks)
- packages/theme/src/tree-menu/vars.less (2 hunks)
- packages/vue-locale/src/lang/zh-CN.ts (1 hunks)
Files skipped from review due to trivial changes (15)
- examples/sites/demos/pc/app/tree-menu/basic-usage-composition-api.vue
- examples/sites/demos/pc/app/tree-menu/basic-usage.vue
- examples/sites/demos/pc/app/tree-menu/default-expand-all-composition-api.vue
- examples/sites/demos/pc/app/tree-menu/default-expand-all.vue
- examples/sites/demos/pc/app/tree-menu/default-expanded-keys-composition-api.vue
- examples/sites/demos/pc/app/tree-menu/default-expanded-keys-highlight.vue
- examples/sites/demos/pc/app/tree-menu/default-expanded-keys.vue
- examples/sites/demos/pc/app/tree-menu/expand-on-click-node-composition-api.vue
- examples/sites/demos/pc/app/tree-menu/expand-on-click-node.vue
- examples/sites/demos/pc/app/tree-menu/props-composition-api.vue
- examples/sites/demos/pc/app/tree-menu/show-checkbox-composition-api.vue
- examples/sites/demos/pc/app/tree-menu/show-checkbox.vue
- examples/sites/demos/pc/app/tree-menu/show-filter-composition-api.vue
- examples/sites/demos/pc/app/tree-menu/show-filter.vue
- examples/sites/demos/pc/app/tree-menu/show-number-composition-api.vue
Additional comments not posted (30)
examples/sites/demos/pc/app/tree-menu/clearable.spec.ts (2)
11-11
: LGTM!The code change aligns with the updated placeholder text for the search box.
17-17
: LGTM!The code change aligns with the updated placeholder text for retrieving the input value from the search box.
packages/theme/src/tree-menu/vars.less (6)
15-15
: LGTM!The change reduces the width of the tree menu component as intended. The syntax is correct and the value is valid.
17-17
: LGTM!The change sets the tree menu node height to a fixed value of
30px
as intended. The syntax is correct and the value is valid.
18-19
: LGTM!The change introduces a new variable to set the bottom margin of tree menu nodes as intended. The syntax is correct and the value is valid.
43-43
: LGTM!The change sets the tree menu border top color to a fixed value of
#f0f0f0
as intended. The syntax is correct and the value is valid.
45-45
: LGTM!The change sets the tree menu left padding to a fixed value of
16px
as intended. The syntax is correct and the value is valid.
51-51
: LGTM!The change increases the tree menu top padding by using a larger size variable as intended. The syntax is correct and the value is valid.
examples/sites/demos/pc/app/tree-menu/default-expanded-keys-highlight-composition-api.vue (2)
5-5
: LGTM!Adding a custom class to the component is a good practice for applying specific styles or functionality. The class name
demo-tree-menu
follows the BEM naming convention and is descriptive.
132-133
: LGTM!Increasing the height of the tree menu component can improve the visibility of menu items or accommodate additional content. The change is made within a scoped style block, ensuring that it only affects the specific component instance. Setting the overflow property to
auto
will add a scrollbar if needed, maintaining a consistent component size.examples/sites/demos/pc/app/tree-menu/text-ellipsis-composition-api.vue (4)
4-4
: LGTM!The addition of the
demo-tree-menu
class to the<tiny-tree-menu>
component is a good way to target the component for styling without affecting other instances of the component.
7-7
: Looks good!The
demo-tree-menu
class has been consistently added to both instances of the<tiny-tree-menu>
component, which is great for maintaining a uniform design.
172-172
: Styling looks good!The CSS rule correctly targets the
.tiny-tree
class within thedemo-tree-menu
class using the::v-deep
combinator, which is the recommended way to target child components in Vue.
173-173
: The height change looks good!The height of the
.tiny-tree
component has been increased from 300px to 320px, which may affect how the tree menu accommodates content overflow. Please verify that the visual presentation is as intended.examples/sites/demos/pc/app/tree-menu/show-number.vue (2)
3-3
: LGTM!The addition of the
demo-tree-menu
class to the<tiny-tree-menu>
component is a good practice. The class name follows the BEM naming convention and is descriptive, indicating that it's a demo of the tree menu component.
136-137
: LGTM!The increase in height of the
.tiny-tree
class from300px
to320px
is a minor change that may affect the visual presentation of the tree menu by providing additional space for its contents. The overflow property remains set toauto
, ensuring that any excess content will still be scrollable. The change does not affect the core functionality of the component.examples/sites/demos/pc/app/tree-menu/text-ellipsis.vue (3)
4-4
: LGTM!The addition of the
class
attribute and the usage of theellipsis
attribute are correct and follow best practices.
7-7
: LGTM!The addition of the
class
attribute and the usage of thewrap
attribute are correct and follow best practices.
184-185
: LGTM!Increasing the height of the tree menu can improve the visual presentation and usability. The change is properly scoped to the component.
packages/theme/src/tree-menu/index.less (10)
28-28
: LGTM!Adding a white background color to the tree menu component improves its visual clarity.
49-49
: LGTM!Adjusting the font size of the toggle button's icon to 16px ensures better alignment with the overall design.
130-132
: LGTM!Adding margin, relative positioning, and a max-width to the input prefix class enhances the visual separation and positioning of the input element within the tree menu.
134-141
: LGTM!Adding a pseudo-element to the input prefix class that creates a top border enhances the visual separation of the input element.
146-146
: LGTM!Adding padding-top to the tree prefix class improves the spacing and usability of the tree component.
148-151
: LGTM!Setting a custom scrollbar width and margin for the tree prefix class improves the aesthetics and usability of the tree component.
165-167
: LGTM!Increasing the font size of the expand icon in the tree node prefix class to 16px improves its visibility and alignment with the overall design.
174-174
: LGTM!Adding a bottom margin to the content of the tree node prefix class helps in spacing out the nodes more effectively.
236-237
: LGTM!Adding styles for the current tree node improves the visual feedback for the user by highlighting the currently selected node.
237-245
: LGTM!Adding a pseudo-element to the current tree node that creates a left border enhances the visual indication of the current node. Setting the height of the pseudo-element to 32px provides a consistent visual structure.
packages/vue-locale/src/lang/zh-CN.ts (1)
587-587
: LGTM!The placeholder text change for the tree menu component is an improvement. It provides a clearer and more concise directive to the user, shifting the focus from general filtering to keyword-based searching. This enhances the user experience.
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
<tiny-tree-menu>
component to provide clearer instructions for users.demo-tree-menu
for enhanced visual presentation.Styling Improvements
<tiny-tree-menu>
component from 300px to 320px for better usability.Bug Fixes