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

Dropdown: Changes RightAligned to EndAligned #5893

Open
wants to merge 2 commits into
base: next-2.0
Choose a base branch
from

Conversation

tesar-tech
Copy link
Collaborator

Description

Closes #3835

Questions/todos:

  • The comments need to be updated as well. Regarding that: Should we consider unifying the source of EndAligned under one interface and then using ///<inheritdoc/>? This approach would help avoid repeating the same XML comment across four places: Dropdown.razor.cs, DropdownList.razor.cs, DropdownJSOptions, and DropdownState. It’s not just about the comments; EndAligned has the same meaning in all these contexts, so centralizing it makes sense.

  • release notes need a record, but I will do it on the end.

  • There’s still one instance of RightAligned left - in BarDropdown. However, this case is genuinely "right-aligned" because, even with dir="rtl", it retains its alignment. In contrast, Dropdown properly respects the start-end directionality. Perhaps it’s worth reconsidering the functionality of BarDropdown to align it with the start-end behavior (in a different task)?

@tesar-tech tesar-tech requested a review from stsrki December 12, 2024 16:28
@stsrki
Copy link
Collaborator

stsrki commented Dec 13, 2024

Description

Closes #3835

Questions/todos:

  • The comments need to be updated as well. Regarding that: Should we consider unifying the source of EndAligned under one interface and then using ///<inheritdoc/>? This approach would help avoid repeating the same XML comment across four places: Dropdown.razor.cs, DropdownList.razor.cs, DropdownJSOptions, and DropdownState. It’s not just about the comments; EndAligned has the same meaning in all these contexts, so centralizing it makes sense.

All these components, options, and states are different types of objects, so I would not like to introduce one common interface for all of them. And if we would to add interface for each specific type then we would be back to the same problem, but with more complexity. Keep it simple. Just add the same comment to all places where it is needed.

  • There’s still one instance of RightAligned left - in BarDropdown. However, this case is genuinely "right-aligned" because, even with dir="rtl", it retains its alignment. In contrast, Dropdown properly respects the start-end directionality. Perhaps it’s worth reconsidering the functionality of BarDropdown to align it with the start-end behavior (in a different task)?

Makes sense. I will open a new ticket for BarDropdown.

@stsrki stsrki changed the title [next-2.0] Changes RightAligned to EndAligned on Dropdown and DropdownList Dropdown: Changes RightAligned to EndAligned Dec 13, 2024
@@ -428,12 +428,12 @@ public bool Visible
/// If true, a dropdown menu will be right aligned.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just update comments to mention the end, instead of right side.

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.

2 participants