-
Notifications
You must be signed in to change notification settings - Fork 300
fix(dropdown,actionMenu): [dropdown,action-menu] Adapt to Dropdown an… #1967
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
fix(dropdown,actionMenu): [dropdown,action-menu] Adapt to Dropdown an… #1967
Conversation
Warning Rate limit exceeded@MomoPoppy has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 11 minutes and 0 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThe recent changes enhance the user interface and interactivity of various components, particularly action menus and dropdowns. Key adjustments include spacing modifications, dynamic visibility toggles, and improved styling for hover states. These refinements aim to provide a more cohesive user experience, allowing for better customization and visual clarity across the application. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Dropdown
participant MenuItem
User->>Dropdown: Hover over dropdown
Dropdown->>MenuItem: Highlight item with hover effect
User->>MenuItem: Click on item
MenuItem->>Dropdown: Trigger action based on selection
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 (
|
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 (27)
- examples/sites/demos/pc/app/action-menu/icon-composition-api.vue (3 hunks)
- examples/sites/demos/pc/app/action-menu/icon.vue (4 hunks)
- examples/sites/demos/pc/app/action-menu/spacing-composition-api.vue (1 hunks)
- examples/sites/demos/pc/app/action-menu/spacing.spec.ts (1 hunks)
- examples/sites/demos/pc/app/action-menu/spacing.vue (1 hunks)
- examples/sites/demos/pc/app/dropdown/show-icon-composition-api.vue (2 hunks)
- examples/sites/demos/pc/app/dropdown/show-icon.vue (2 hunks)
- examples/sites/demos/pc/app/dropdown/visible-arrow-composition-api.vue (1 hunks)
- examples/sites/demos/pc/app/dropdown/visible-arrow.vue (1 hunks)
- packages/design/smb/src/action-menu/index.ts (1 hunks)
- packages/renderless/src/action-menu/index.ts (1 hunks)
- packages/renderless/src/action-menu/vue.ts (2 hunks)
- packages/theme/src/action-menu/index.less (1 hunks)
- packages/theme/src/action-menu/smb-theme.js (1 hunks)
- packages/theme/src/action-menu/vars.less (2 hunks)
- packages/theme/src/dropdown-item/aurora-theme.js (1 hunks)
- packages/theme/src/dropdown-item/smb-theme.js (2 hunks)
- packages/theme/src/dropdown-menu/aurora-theme.js (1 hunks)
- packages/theme/src/dropdown-menu/index.less (3 hunks)
- packages/theme/src/dropdown-menu/vars.less (1 hunks)
- packages/theme/src/dropdown/aurora-theme.js (1 hunks)
- packages/theme/src/dropdown/index.less (1 hunks)
- packages/theme/src/dropdown/smb-theme.js (1 hunks)
- packages/theme/src/dropdown/vars.less (1 hunks)
- packages/vue/src/action-menu/src/pc.vue (1 hunks)
- packages/vue/src/dropdown-item/src/index.ts (1 hunks)
- packages/vue/src/dropdown-item/src/pc.vue (2 hunks)
Files skipped from review due to trivial changes (2)
- examples/sites/demos/pc/app/action-menu/spacing-composition-api.vue
- examples/sites/demos/pc/app/action-menu/spacing.vue
Additional comments not posted (33)
packages/design/smb/src/action-menu/index.ts (1)
2-4
: LGTM! The addition of spacing enhances layout flexibility.The introduction of the
spacing
property in theprops
object allows for better control over the component's layout.packages/theme/src/dropdown-menu/aurora-theme.js (1)
9-10
: LGTM! New properties enhance dropdown arrow styling.The addition of
'ti-dropdown-menu-arrow-margin-top'
and'ti-dropdown-menu-arrow-margin-bottom'
improves the layout flexibility for dropdown arrows.examples/sites/demos/pc/app/action-menu/spacing.spec.ts (1)
13-14
: LGTM! Test updates align with new spacing defaults.The margin expectations for the
tenPXSpacing
element have been updated to reflect the new default spacing value of8px
.packages/theme/src/dropdown-item/aurora-theme.js (1)
3-3
: LGTM! Font size change promotes consistency.The use of
var(--ti-common-font-size-base)
for'ti-dropdown-item-font-size'
enhances flexibility and consistency in font sizing across the application.packages/theme/src/dropdown/aurora-theme.js (1)
13-13
: LGTM! New property enhances suffix icon styling.The addition of
'ti-dropdown-suffix-icon-margin-vertical'
provides more control over the vertical spacing of suffix icons in dropdown components.examples/sites/demos/pc/app/dropdown/visible-arrow-composition-api.vue (1)
2-24
: Enhancement approved: Dynamic arrow visibility.The changes effectively enhance the dropdown component by allowing dynamic control over the arrow's visibility using a toggle switch. This improves user interactivity and customization.
packages/theme/src/action-menu/smb-theme.js (1)
6-12
: Styling adjustments approved: Lighter action menu design.The changes to font weight and icon dimensions contribute to a more compact and visually appealing action menu design. This aligns with the SMB Theme objectives.
examples/sites/demos/pc/app/dropdown/visible-arrow.vue (1)
2-32
: Enhancement approved: Dynamic arrow visibility in dropdown.The modifications allow users to toggle the arrow visibility dynamically, enhancing interactivity and user experience. The implementation is well-structured.
packages/theme/src/dropdown/smb-theme.js (1)
18-19
: Styling enhancement approved: Improved dropdown layout control.The introduction of line height and icon margin properties enhances the dropdown's styling flexibility, aligning with the SMB Theme objectives.
packages/theme/src/dropdown-item/smb-theme.js (1)
Line range hint
11-24
: Styling refinement approved: Enhanced dropdown item interaction.The updates to hover states and icon colors improve the dropdown item's visual styling and interaction feedback, aligning with the SMB Theme objectives.
examples/sites/demos/pc/app/dropdown/show-icon-composition-api.vue (2)
17-17
: Ensure consistent usage of theonly-icon
class.The introduction of the
only-icon
class is a good enhancement for scenarios where only an icon is needed. Ensure that this class is consistently used across similar components for uniformity.
50-59
: CSS styles foronly-icon
class are well-defined.The CSS styles for the
only-icon
class ensure that the SVG icon maintains a consistent fill color. This is a good practice for maintaining visual consistency.examples/sites/demos/pc/app/dropdown/show-icon.vue (2)
17-17
: Class name change toonly-icon
improves clarity.Changing the class name to
only-icon
clearly indicates the intended use of the dropdown to display only an icon. Ensure that this change is reflected in related documentation or usage guides.
57-66
: CSS styles foronly-icon
class are appropriate.The CSS styles for the
only-icon
class ensure that the SVG icon maintains a consistent fill color, enhancing visual consistency.packages/renderless/src/action-menu/vue.ts (2)
35-35
: Addition ofdesignConfig
parameter enhances flexibility.The introduction of the
designConfig
parameter allows the function to accommodate design-related configurations, improving its flexibility and adaptability.
55-55
: EnsuredesignConfig
is correctly passed tocomputedSpacing
.The
designConfig
parameter is now part of thecomputedSpacing
function call. Verify thatdesignConfig
is correctly initialized and passed in all relevant contexts.examples/sites/demos/pc/app/action-menu/icon-composition-api.vue (2)
9-9
: Spacing adjustment to8px
improves layout.The change in spacing to
8px
for thetiny-action-menu
component may affect the visual layout. Ensure that this change aligns with the overall design guidelines.
25-30
: Icon change toIconPreChecked
for "远程登陆" is appropriate.The change in the icon for "远程登陆" to
IconPreChecked
may reflect a shift in design or functionality. Verify that this change is consistent with the intended design semantics.packages/vue/src/dropdown-item/src/index.ts (1)
88-90
: Neweffect
property enhances customization.The addition of the
effect
property with a default value of'light'
allows for greater customization of the dropdown item's visual effect. Ensure that this property is documented and utilized where necessary.examples/sites/demos/pc/app/action-menu/icon.vue (3)
9-9
: Verify spacing consistency with SMB Theme.The spacing has been changed from
12px
to8px
. Ensure this aligns with the SMB Theme's design guidelines.
Line range hint
20-31
: Icon update approved.The icon has been updated from
iconWebPlus
toIconPreChecked
, which enhances the visual consistency.
79-104
: New styles approved. Verify consistency.The new styles improve the visual presentation of the action menu. Ensure they are consistent with the overall theme and do not conflict with existing styles.
packages/renderless/src/action-menu/index.ts (1)
29-37
: Enhancement tocomputedSpacing
approved. VerifydesignConfig
usage.The addition of
designConfig
allows for more flexible spacing configuration. Ensure thatdesignConfig
is properly defined and used across the application.packages/theme/src/dropdown-menu/vars.less (1)
43-45
: CSS variable update approved.The use of a common spacing variable for arrow margins improves consistency and maintainability.
packages/theme/src/action-menu/vars.less (2)
39-39
: Hover icon color variable addition approved.The new variable for hover icon color enhances visual consistency.
49-49
: SVG margin top variable update approved.The update to use a common spacing variable improves flexibility and maintainability.
packages/theme/src/dropdown/vars.less (1)
71-71
: Dropdown suffix icon margin variable addition approved.The new variable allows for more precise control over icon spacing, enhancing layout consistency.
packages/vue/src/dropdown-item/src/pc.vue (2)
16-16
: Ensureeffect
property is documented and tested.The addition of the
effect
property allows for dynamic tooltip effects. Make sure this new property is documented and tested to ensure it behaves as expected.
99-100
: Verify the integration of theeffect
property.Adding
effect
to the props enhances configurability. Verify that this property is correctly integrated and used throughout the component.packages/vue/src/action-menu/src/pc.vue (1)
25-29
: Conditional rendering logic looks good.The conditional rendering of the
<span>
element improves the component's responsiveness. Ensure this logic is tested to confirm it behaves as expected in various scenarios.packages/theme/src/action-menu/index.less (1)
79-85
: Improved specificity in CSS selectors.The nested selectors improve specificity and maintainability. Verify that these changes do not introduce any visual regressions or conflicts with other styles.
packages/theme/src/dropdown/index.less (1)
179-184
: New CSS class.tiny-dropdown__suffix-inner
added.The addition of this class improves the layout of suffix elements. Verify that it aligns with the overall design and does not cause any layout issues.
packages/theme/src/dropdown-menu/index.less (1)
63-65
: Ensure browser compatibility for:has()
pseudo-class.The use of
:has()
enhances styling based on content. Verify that this pseudo-class is supported in the target browsers to avoid potential issues.Also applies to: 84-86
…d Actimenu SMB Theme
…d Actimenu SMB Theme
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
Documentation