MudText: Ability to control which HTML tag is used#8916
Conversation
Resolves MudBlazor#8898 by adding HtmlTag. Resolves MudBlazor#5535 by removing the `Inline` tag and making consumers use our more flexible and explicit CSS utility classes: https://mudblazor.com/utilities/display. E.g. `<MudText Typo="Typo.caption" Class="d-inline">`. This simplifies the library by removing an underused property. WARNING: If the removal of `Inline` is accepted I still need to go back and adjust the few texts in the docs that use it. Adds comprehrensive documentation to the component and plenty to the docs. Adds comprehensive tests as there were none before. I could have used `MudElement` but that seemed too DRY. This gives us more flexibility and keeps the code simple as it is a fundamental component on the same level. Spaghetti be gone.
|
If the removal of I could have used @meenzen FYI |
I don't see what is the problem with <MudElement HtmlTag="@GetTagName(Typo)" Class="@Classname" Style="@Stylename" UserAttributes="@UserAttributes">
@ChildContent
</MudElement>We always wanted to avoid using RenderBuilder throughout the library so we added |
|
OK to the removal of |
|
@henon I think ready. Surprise! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #8916 +/- ##
==========================================
+ Coverage 89.82% 90.25% +0.42%
==========================================
Files 412 424 +12
Lines 11878 12280 +402
Branches 2364 2410 +46
==========================================
+ Hits 10670 11083 +413
+ Misses 681 667 -14
- Partials 527 530 +3 ☔ View full report in Codecov by Sentry. |
|
Thanks Daniel! Added to v7.0.0 Migration Guide #8447 |
|
The Inline parameter was re-added in #9065 |
Description
Rewrites the MudText component and adds a new property that lets you control which type of element is created to aid in accessibility and SEO. See the original discussion in #8865.
Resolves MudText: Ability to control which HTML tag is used #8898 by adding HtmlTag.
Resolves MudText: Render as block element when Inline is false #5535 by removing the
Inlinetag<MudText Typo="Typo.caption" Class="d-inline">.Adds comprehensive documentation to the component and plenty to the docs.
Adds comprehensive tests as there were none before.
How Has This Been Tested?
unit, visually
Type of Changes
Checklist
dev).