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

MudStack: Add Wrap Property #8290

Merged
merged 6 commits into from Mar 6, 2024
Merged

Conversation

skyslide22
Copy link
Contributor

@skyslide22 skyslide22 commented Mar 5, 2024

Added the optional flex-wrap: wrap|nowrap|wrap-reverse to the <Stack /> component.

Docs section added.

image
image

Copy link

codecov bot commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.62%. Comparing base (26e6ec2) to head (772e6a3).
Report is 2 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #8290      +/-   ##
==========================================
+ Coverage   88.54%   88.62%   +0.08%     
==========================================
  Files         400      405       +5     
  Lines       12090    12154      +64     
  Branches     2427     2428       +1     
==========================================
+ Hits        10705    10772      +67     
+ Misses        855      853       -2     
+ Partials      530      529       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@skyslide22 skyslide22 marked this pull request as ready for review March 5, 2024 16:45
@ScarletKuro ScarletKuro added the enhancement New feature or request label Mar 5, 2024
@ScarletKuro
Copy link
Member

Hi. Thanks for PR.
I think it would be still required to add a simple bUnit test to check if the style is applied with the corresponding enum.

@henon
Copy link
Collaborator

henon commented Mar 6, 2024

Curious, what does WrapReverse do?

@skyslide22
Copy link
Contributor Author

Curious, what does WrapReverse do?

MDN says this:
Behaves the same as wrap but cross-start and cross-end are permuted.
https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap#wrap-reverse

@ScarletKuro
Copy link
Member

I also think it would make sense to add the xml doc for the enum values and copy the description from here:
https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap#values

and add some description to the enum c;lass as well.

Copy link
Member

@ScarletKuro ScarletKuro left a comment

Choose a reason for hiding this comment

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

LGTM from my side.

@henon henon changed the title Stack: Add Wrap Property MudStack: Add Wrap Property Mar 6, 2024
@henon henon merged commit 09ef7e6 into MudBlazor:dev Mar 6, 2024
3 checks passed
@henon
Copy link
Collaborator

henon commented Mar 6, 2024

Thanks @skyslide22 !

@mckaragoz
Copy link
Member

mckaragoz commented Mar 6, 2024

It can be also done with simple Class="flex-wrap"

@skyslide22
Copy link
Contributor Author

I had some issues with setting Class="" & Style="" in a MVC project where the blazor components get rerendered after OnAfterInitialized and the state is not preserved for some reason, so the class and styles are removed after first/second render.

@ScarletKuro
Copy link
Member

I had some issues with setting Class="" & Style="" in a MVC project where the blazor components get rerendered after OnAfterInitialized and the state is not preserved for some reason, so the class and styles are removed after first/second render.

Do you have the code? It can be either a bug on our side or mistake on your side.

danielchalmers pushed a commit to danielchalmers/MudBlazor that referenced this pull request Mar 13, 2024
* Stack: add wrap property

* Add/Remove indentation & newlines

* Add unit tests for stack wrap functionality

* rm empty spaces after ;

* rm unecessary using statement

* Add descriptions to Wrap enum values

---------

Co-authored-by: n.wallura@live-icom.com <n.wallura@live-icom.com>
danielchalmers pushed a commit to danielchalmers/MudBlazor that referenced this pull request Mar 13, 2024
* Stack: add wrap property

* Add/Remove indentation & newlines

* Add unit tests for stack wrap functionality

* rm empty spaces after ;

* rm unecessary using statement

* Add descriptions to Wrap enum values

---------

Co-authored-by: n.wallura@live-icom.com <n.wallura@live-icom.com>
danielchalmers pushed a commit to danielchalmers/MudBlazor that referenced this pull request Mar 13, 2024
* Stack: add wrap property

* Add/Remove indentation & newlines

* Add unit tests for stack wrap functionality

* rm empty spaces after ;

* rm unecessary using statement

* Add descriptions to Wrap enum values

---------

Co-authored-by: n.wallura@live-icom.com <n.wallura@live-icom.com>
biegehydra pushed a commit to biegehydra/MudBlazor that referenced this pull request Apr 26, 2024
* Stack: add wrap property

* Add/Remove indentation & newlines

* Add unit tests for stack wrap functionality

* rm empty spaces after ;

* rm unecessary using statement

* Add descriptions to Wrap enum values

---------

Co-authored-by: n.wallura@live-icom.com <n.wallura@live-icom.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants