Skip to content

Conversation

@EvandroMoSou
Copy link
Contributor

@EvandroMoSou EvandroMoSou commented Mar 12, 2025

Pull Request

📖 Description

FluentStack Reversed and Positioning of items

Sometimes to follow certain UX/UI rules you need to position the buttons in a specific way, so I developed a way to change the positioning of the buttons in the MessageBox.

It adds a new option in FluentStack called Reversed (To reverse the position of objects with pure css).

peek_2

🎫 Issues

I didn't find it

👩‍💻 Reviewer Notes

Things have been added so that old codes will continue to work without needing to be changed.

✅ Checklist

General

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

Component-specific

  • I have added a new component
  • I have added Unit Tests for my new component
  • I have modified an existing component
  • I have validated the Unit Tests for an existing component

⏭ Next Steps

I didn't think of anything

@dvoituron
Copy link
Collaborator

As much as I find the possibility of having a way to define flex-direction: row-reverse; interesting,
I don't think it's a good idea to allow the position of Actions buttons for a dialog box to be modified.
This is part of the FluentUI design and it creates a visual result that is no longer “standard”.

If the developer really wants to offer a rendering that is different from the FluentUI style, they can always do so via a style

fluent-dialog-footer {
  flex-direction: row-reverse;
}

@vnbaaij
Copy link
Collaborator

vnbaaij commented Mar 13, 2025

I agree with Denis. We definitely want this for the Stack but not for the Dialog.

With regards to the implementation, we propose to use an attribute reverse="true/false" on the Stack div and then do the CSS change based on the attribute instead of adding another class. Something like:

.stack-horizontal[reverse='true'] {
...
}

And make the Reverse parameter nullable (and default ==null) so the attribute doe not get rendered when not set.

Would be great if you can adjust your PR to that.

@EvandroMoSou
Copy link
Contributor Author

Done

@dvoituron
Copy link
Collaborator

Can you update the PR description?

@vnbaaij vnbaaij changed the title FluentStack Reversed and Positioning of Action Buttons on MessageBox [Stack] Add Reversed parameter Mar 14, 2025
@vnbaaij vnbaaij self-requested a review March 15, 2025 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants