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): Wrap IconTemplate in corrected span #2006

Merged
merged 3 commits into from
Oct 8, 2021

Conversation

knight1219
Copy link
Contributor

🤔 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?)

🔗 Related issue link

fixes #2005

💡 Background and solution

When using the IconTemplate in the Menu, collapsing the menu will not properly format the icon and text. Wrapping IconTemplate RenderFragment in the proper span now allows the collapse to properly work without custom code from user.

📝 Changelog

Language Changelog
🇺🇸 English fixes IconTemplate when InlineCollapse is used.
🇨🇳 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

* wrap IconTemplate using span created by Icon component so InlineCollapse properly displays IconTemplate

*docs: Added missing docs for IconTemplate
@github-actions
Copy link

github-actions bot commented Oct 8, 2021

@dnfadmin
Copy link

dnfadmin commented Oct 8, 2021

CLA assistant check
All CLA requirements met.

@knight1219 knight1219 mentioned this pull request Oct 8, 2021
15 tasks
@codecov
Copy link

codecov bot commented Oct 8, 2021

Codecov Report

Merging #2006 (3c70b6b) into master (6459e80) will increase coverage by 1.91%.
The diff coverage is 100.00%.

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

@@            Coverage Diff             @@
##           master    #2006      +/-   ##
==========================================
+ Coverage   25.38%   27.29%   +1.91%     
==========================================
  Files         488      511      +23     
  Lines       32098    24481    -7617     
  Branches        0      233     +233     
==========================================
- Hits         8148     6683    -1465     
+ Misses      23950    17762    -6188     
- Partials        0       36      +36     
Impacted Files Coverage Δ
components/menu/MenuItem.razor 100.00% <100.00%> (+13.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%) ⬇️
components/tabs/TabPane.razor 86.66% <0.00%> (-6.20%) ⬇️
...ponents/date-picker/types/DatePickerPlaceholder.cs 22.72% <0.00%> (-4.20%) ⬇️
components/input/TextArea.razor.cs 77.52% <0.00%> (-3.05%) ⬇️
...ponents/core/Component/Overlay/type/TriggerType.cs 81.25% <0.00%> (-2.97%) ⬇️
components/timeline/Timeline.razor.cs 63.21% <0.00%> (-2.24%) ⬇️
...onents/date-picker/internal/DatePickerHeader.razor 45.71% <0.00%> (-1.91%) ⬇️
... and 422 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 6459e80...eb6f302. Read the comment docs.

Copy link
Member

@anddrzejb anddrzejb left a comment

Choose a reason for hiding this comment

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

Something weird happened with change detection - git should detect 3 new lines, but detects much more. Anyway, LGTM.

@ElderJames ElderJames enabled auto-merge (squash) October 8, 2021 15:31
@ElderJames ElderJames merged commit ca3e2e1 into ant-design-blazor:master Oct 8, 2021
ElderJames added a commit that referenced this pull request Oct 16, 2021
* fix(module:menu): Wrap IconTemplate in corrected span
* wrap IconTemplate using span created by Icon component so InlineCollapse properly displays IconTemplate

*docs: Added missing docs for IconTemplate

* Update icontemplate.md

Co-authored-by: James Yeung <shunjiey@hotmail.com>
ElderJames added a commit that referenced this pull request Apr 23, 2022
* fix(module:menu): Wrap IconTemplate in corrected span
* wrap IconTemplate using span created by Icon component so InlineCollapse properly displays IconTemplate

*docs: Added missing docs for IconTemplate

* Update icontemplate.md

Co-authored-by: James Yeung <shunjiey@hotmail.com>
ElderJames added a commit that referenced this pull request Apr 30, 2022
* fix(module:menu): Wrap IconTemplate in corrected span
* wrap IconTemplate using span created by Icon component so InlineCollapse properly displays IconTemplate

*docs: Added missing docs for IconTemplate

* Update icontemplate.md

Co-authored-by: James Yeung <shunjiey@hotmail.com>
ElderJames added a commit that referenced this pull request Sep 6, 2022
* fix(module:menu): Wrap IconTemplate in corrected span
* wrap IconTemplate using span created by Icon component so InlineCollapse properly displays IconTemplate

*docs: Added missing docs for IconTemplate

* Update icontemplate.md

Co-authored-by: James Yeung <shunjiey@hotmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Is the IconTemplate working with the Menu Collapse feature?
4 participants