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
MudListItem: SecondaryText Feature #8921
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #8921 +/- ##
==========================================
+ Coverage 89.82% 90.48% +0.65%
==========================================
Files 412 419 +7
Lines 11878 12197 +319
Branches 2364 2381 +17
==========================================
+ Hits 10670 11036 +366
+ Misses 681 627 -54
- Partials 527 534 +7 ☔ View full report in Codecov by Sentry. |
@if (!string.IsNullOrEmpty(SecondaryText)) | ||
{ | ||
<br /> | ||
<MudText Class="mud-list-item-secondary-text" Typo="Typo.subtitle2">@SecondaryText</MudText> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I normally use mt-n or pt-n instead of br/>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not about margin or padding. Need to be sure secondary text placed on new line. In some situations text and secondary text show in one line. And there is no guarantee that MudText never be changed.
@henon test done. |
Thanks! |
@henon I was reminded that mud is missing a basic implementation of |
@Alerinos I struggle to imagine how it should look like compared to MudList. Can you share examples from other toolkits that have what you mean? |
@henon |
That is so simple that it is probably not worth adding this. Can't you just directly use |
@henon I'm just in migration, MudList requires T parameter, shouldn't we allow nullable? |
Nullable types are allowed, for instance |
@henon |
I know, I would prefer that too, but Blazor doesn't allow it |
@henon Can't we set a default T, or make it null? public partial class MudList<T> : MudComponentBase, IDisposable : this(default(T)) Alternatively, it is possible to do “overloading” and create two classes, one with T and one without. In this case, we will handle everything. |
Is this even legal C# ?
We tried that too, doesn't work. This is a technical limitation of Blazor that only Microsoft can fix. |
Description
Added SecondaryText parameter to MudListItem.
How Has This Been Tested?
Already using with MudListItemExtended.
20240508_143403.mp4
Type of Changes
Checklist
dev
).