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(module:menu): Overlay bug fix & menu renering optimization #1949

Merged
merged 8 commits into from
Sep 16, 2021

Conversation

anddrzejb
Copy link
Member

@anddrzejb anddrzejb commented Sep 16, 2021

🤔 This is a ...

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

Fixes #1644

💡 Background and solution

  1. Overlay was crashing when menu (as part of layout) was expanding with at least 1 submenu open. Solution - no need to render the submenu as overlay when layout menu is expanding. Extra - check on Overlay to prevent crash, with message to debugger.

  2. Missing chevron in submenus. Currently:
    image
    Expected:
    image

  3. Parent menu should be selected during initalization if any of its children is selected. Currently:
    image
    Expected:
    image

  4. Match css classes with antD.

  5. Add tests for basic menu.

  6. Optimize other tests & typescript scripts.

📝 Changelog

Language Changelog
🇺🇸 English
🇨🇳 Chinese

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

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

@github-actions
Copy link

github-actions bot commented Sep 16, 2021

@codecov
Copy link

codecov bot commented Sep 16, 2021

Codecov Report

Merging #1949 (e207d06) into master (da1f573) will increase coverage by 3.35%.
The diff coverage is 55.88%.

❗ Current head e207d06 differs from pull request most recent head 795198f. Consider uploading reports for the commit 795198f to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1949      +/-   ##
==========================================
+ Coverage   23.92%   27.27%   +3.35%     
==========================================
  Files         487      510      +23     
  Lines       31920    24346    -7574     
  Branches        0      229     +229     
==========================================
- Hits         7636     6641     -995     
+ Misses      24284    17669    -6615     
- Partials        0       36      +36     
Impacted Files Coverage Δ
...core/JsInterop/modules/components/overlayHelper.ts 0.00% <0.00%> (ø)
components/menu/internal/SubMenuTrigger.razor.cs 100.00% <ø> (+100.00%) ⬆️
components/core/Component/Overlay/Overlay.razor.cs 65.89% <50.00%> (+6.94%) ⬆️
components/menu/SubMenu.razor 70.83% <50.00%> (+70.83%) ⬆️
components/menu/MenuItem.razor 100.00% <100.00%> (+100.00%) ⬆️
components/menu/MenuItem.razor.cs 79.10% <100.00%> (+79.10%) ⬆️
components/menu/SubMenu.razor.cs 72.63% <100.00%> (+72.63%) ⬆️
components/core/Helpers/MemberPath/PathNode.cs 46.15% <0.00%> (-8.85%) ⬇️
components/core/Reflection/TypeDefined.cs 77.77% <0.00%> (-7.94%) ⬇️
components/input/InputGroup.razor.cs 87.50% <0.00%> (-6.95%) ⬇️
... and 431 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update da1f573...795198f. Read the comment docs.

@anddrzejb anddrzejb changed the title Overlay bug fix fix(module:menu): Overlay bug fix & menu renering optimization Sep 16, 2021
Copy link
Member

@ElderJames ElderJames left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@ElderJames ElderJames merged commit f4df366 into ant-design-blazor:master Sep 16, 2021
@anddrzejb anddrzejb deleted the overlayBugFix branch September 16, 2021 17:13
ElderJames pushed a commit that referenced this pull request Oct 16, 2021
* fix(module:overlay): submenu causing crash

* fix(module:overlay): submenu causing crash

* fix(module:menu): show missing chevron

mark top menu as selected on init
do not render non-active overlay submenus

* tests: common js mock extracted

nullable enabled for test project

* tests: menu

* fix(module:menu): incorrect behavior in layout
anranruye pushed a commit to anranruye/ant-design-blazor that referenced this pull request Nov 14, 2021
…design-blazor#1949)

* fix(module:overlay): submenu causing crash

* fix(module:overlay): submenu causing crash

* fix(module:menu): show missing chevron

mark top menu as selected on init
do not render non-active overlay submenus

* tests: common js mock extracted

nullable enabled for test project

* tests: menu

* fix(module:menu): incorrect behavior in layout
ElderJames pushed a commit that referenced this pull request Apr 23, 2022
* fix(module:overlay): submenu causing crash

* fix(module:overlay): submenu causing crash

* fix(module:menu): show missing chevron

mark top menu as selected on init
do not render non-active overlay submenus

* tests: common js mock extracted

nullable enabled for test project

* tests: menu

* fix(module:menu): incorrect behavior in layout
ElderJames pushed a commit that referenced this pull request Apr 30, 2022
* fix(module:overlay): submenu causing crash

* fix(module:overlay): submenu causing crash

* fix(module:menu): show missing chevron

mark top menu as selected on init
do not render non-active overlay submenus

* tests: common js mock extracted

nullable enabled for test project

* tests: menu

* fix(module:menu): incorrect behavior in layout
ElderJames pushed a commit that referenced this pull request Sep 6, 2022
* fix(module:overlay): submenu causing crash

* fix(module:overlay): submenu causing crash

* fix(module:menu): show missing chevron

mark top menu as selected on init
do not render non-active overlay submenus

* tests: common js mock extracted

nullable enabled for test project

* tests: menu

* fix(module:menu): incorrect behavior in layout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants