Skip to content
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(menu): resolve overflow issue with n-menu root-indent (#5616) #5618

Merged
merged 3 commits into from Jan 23, 2024

Conversation

kirklin
Copy link
Contributor

@kirklin kirklin commented Jan 22, 2024

Description of Changes

Adjusted the paddingLeftRef calculation logic to ensure proper left margin in different scenarios, addressing the issue of content overflow when setting a smaller root-indent in n-menu.

Fixed the calculation of the ::before pseudo-element's left position, adjusting its default value to match the design expectation and preventing content overflow.

Related Issue

Fixes #5616

Copy link

vercel bot commented Jan 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
naive-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2024 10:58am

@kirklin kirklin changed the title fix(menu): resolve overflow issue with n-menu root-indent(#5616) fix(menu): resolve overflow issue with n-menu root-indent (#5616) Jan 22, 2024
@codecov-commenter
Copy link

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (fce7b64) 61.07% compared to head (c173a40) 61.07%.

Files Patch % Lines
src/menu/src/use-menu-child.ts 50.00% 1 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5618      +/-   ##
==========================================
- Coverage   61.07%   61.07%   -0.01%     
==========================================
  Files        1107     1107              
  Lines       23619    23621       +2     
  Branches     6187     6188       +1     
==========================================
+ Hits        14426    14427       +1     
  Misses       7598     7598              
- Partials     1595     1596       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@07akioni 07akioni merged commit 558c4b4 into tusen-ai:main Jan 23, 2024
3 of 4 checks passed
@07akioni
Copy link
Collaborator

I think it's acceptable to keep current behavior, since if we change it, most menu's appearance would change. So I will revert link PR.

@07akioni
Copy link
Collaborator

07akioni commented Feb 22, 2024

Also, if someone would like to change overlay's position, a padding starts from edge would it easier to be customized.

07akioni added a commit that referenced this pull request Feb 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

n-menu 控件 root-indent 设置较小时候菜单的选中效果下内容会溢出
3 participants