-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
MudStack: Add parameter StretchItems to have certain children fill space #8545
MudStack: Add parameter StretchItems to have certain children fill space #8545
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #8545 +/- ##
==========================================
- Coverage 89.51% 89.48% -0.03%
==========================================
Files 410 410
Lines 11831 11832 +1
Branches 2355 2355
==========================================
- Hits 10590 10588 -2
- Misses 713 715 +2
- Partials 528 529 +1 ☔ View full report in Codecov by Sentry. |
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.
Great work - LGTM
I like the functionality, it is very useful, reminds me of Also, we should consider LTR vs RTL. Naming suggestion: [Parameter]
public StretchItems StretchItems { get; set; }
public enum StretchItems {
None,
Start,
End,
StartAndEnd,
Middle,
All,
} Usage: <MudStack StretchItems="StretchItems.End">
...
</MudStack> It might be good to add a |
Yeah, I think this is very common functionality in the Xamarin, Flutter, MAUI, WPF etc. |
Taking this further, perhaps
|
Oh sorry, you didn't make the changes yet. Make sure to use the |
|
This is a tricky one because RTL does not mean the same in |
…ns in MudStack, added xml comments.
Whatever it is now feels natural in both LTR and RTL when reversed, and when not, so I'd leave it as is. I have changed parameter name to |
This feature provides the flexibility to specify which children should expand to fill additional space. | ||
</Description> | ||
</SectionHeader> | ||
<SectionContent Block FullWidth Code="StackStretchChildrenExample" ShowCode="false" DarkenBackground> | ||
<StackStretchChildrenExample /> | ||
<SectionContent Block FullWidth Code="StackStretchItemsExample" ShowCode="false" DarkenBackground> |
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.
Please use Code="@nameof(StackStretchItemsExample)"
and you may also add nameofs in the other sections
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.
Sure, sorted.
Perfect, looks good. If you will add the nameofs real quick I'll merge this today. |
I have made a mistake here, it's |
In theory there could be other uses of stretching, i.e. for images where you would need Stretch.Uniform, Stretch.X, Stretch.Y etc, so yes, it is the safest bet to rename the enum to |
Thanks @BieleckiLtd |
…ace (MudBlazor#8545) Co-authored-by: Pawel Bielecki <Pawel.Bielecki2@leoni.com>
…ace (MudBlazor#8545) Co-authored-by: Pawel Bielecki <Pawel.Bielecki2@leoni.com>
If the original PR #6010 was rejected due to conflicts, this update brings the previous code up to date with the current dev branch. If the rejection was for a different reason, please close this PR. Thank you.
Description
Closes #4960
2022-12-19_00-36-23.mp4
How Has This Been Tested?
unit + visually
Types of changes
Checklist:
dev
).