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 item style #43656

Merged
merged 1 commit into from Jul 19, 2023
Merged

fix: menu item style #43656

merged 1 commit into from Jul 19, 2023

Conversation

MadCcc
Copy link
Member

@MadCcc MadCcc commented Jul 19, 2023

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

close #43649

💡 Background and solution

  1. 横向 Menu 暗黑模式选中态 hover 时底色消失
  2. 纵向 Menu 暗黑模式 active 底色会变(v4 不会)
  3. 纵向 Menu submen 选中时父项 hover 时文字变成黑色(应该保持蓝色)

📝 Changelog

Language Changelog
🇺🇸 English Fix Menu style issue when hover items.
🇨🇳 Chinese 修复 Menu 组件悬浮态样式问题。

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

🚀 Summary

🤖 Generated by Copilot at d2be43e

Added a new style variable itemActiveBg to customize the background color of active menu and submenu items. Fixed some style issues with menu hover and active states in different themes.

🔍 Walkthrough

🤖 Generated by Copilot at d2be43e

  • Fix the active menu item background color issue by changing the itemActiveBg variable from colorFillContent to controlItemBgActive in components/menu/style/index.tsx (link) and adding it to the return value of the getThemeStyle function in components/menu/style/theme.tsx (link)
  • Use the new itemActiveBg variable for the background color of the active menu item and submenu item in the getThemeStyle function in components/menu/style/theme.tsx (link, link)
  • Modify the selector for the menu item hover style to exclude the submenu title in the getThemeStyle function in components/menu/style/theme.tsx (link)
  • Add the hover style for the horizontal menu item in the getThemeStyle function in components/menu/style/theme.tsx (link)

@stackblitz
Copy link

stackblitz bot commented Jul 19, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 19, 2023

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
./dist/antd.min.js 381.75 KB (+18 B 🔺)
./dist/antd-with-locales.min.js 441.36 KB (+17 B 🔺)

@argos-ci
Copy link

argos-ci bot commented Jul 19, 2023

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No change detected - Jul 19, 2023, 10:15 AM

@codecov
Copy link

codecov bot commented Jul 19, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (5eb9f5d) 100.00% compared to head (d2be43e) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #43656   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          657       657           
  Lines        11064     11066    +2     
  Branches      2999      3000    +1     
=========================================
+ Hits         11064     11066    +2     
Impacted Files Coverage Δ
components/menu/style/theme.tsx 100.00% <ø> (ø)

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@MadCcc MadCcc merged commit 473130f into master Jul 19, 2023
95 checks passed
@MadCcc MadCcc deleted the fix/menu-hover branch July 19, 2023 10:52
@zombieJ zombieJ mentioned this pull request Jul 20, 2023
16 tasks
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.

Is this a menu bug ?
2 participants