-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Fix. Quickgrid PropertyColumn Align property doesn't work with Align.Right #62707
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
Fix. Quickgrid PropertyColumn Align property doesn't work with Align.Right #62707
Conversation
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.
Pull Request Overview
This pull request fixes a bug where the QuickGrid PropertyColumn's Align property doesn't work correctly with right alignment (Align.Right). The fix refactors CSS styles to properly support column alignment and adds missing styles for consistent column options positioning.
- Reorganizes existing CSS rules for better logical grouping
- Adds support for
col-justify-start
styles for left alignment consistency - Introduces explicit
col-justify-right
andcol-justify-left
styles for direct alignment control - Adds RTL (right-to-left) support for the new
col-justify-start
styles
src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/QuickGrid.razor.css
Show resolved
Hide resolved
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 tried it in a sample project and the Align.Right property is working now 👍
src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/QuickGrid.razor.css
Outdated
Show resolved
Hide resolved
src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/QuickGrid.razor.css
Show resolved
Hide resolved
} | ||
|
||
td.col-justify-start { | ||
text-align: left; |
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.
Shouldn't this use start
?
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.
We use in .col-justify-end { text-align: right }. So I just did this class by the same pattern as an existing class.
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.
hmm. Maybe I'm not fully understanding how this works. But the start
and end
classes are typically used/defined for usage with logical properties, with the idea, that they automatically adapt to right to left languages like arabic, hebrew and so on
Fix. Quickgrid PropertyColumn Align property doesn't work with Align.Right
Description
This pull request refactors and fixes the column alignment and justification styles in the
QuickGrid.razor.css
file.Changes:
.col-justify-start .col-options
andtd.col-justify-start
to support left-aligned column options and text.td.col-justify-right
andtd.col-justify-left
styles for explicit right and left text alignment.Reasoning for change:
In
aspnetcore/src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/QuickGrid.razor.cs
Line 424 in 8bb2b20
Blazor assigns css classes based on the Align parameter that user has set. However, in the
aspnetcore/src/Components/QuickGrid/Microsoft.AspNetCore.Components.QuickGrid/src/QuickGrid.razor.css
Line 75 in 8bb2b20
there were no implementation for 3 out of existing 5 parameter options. This PR fixes implements missing options.
Fixes #50029