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

Consider renaming DataGridColumn.Direction to "SortDirection" #2505

Closed
CaiusJard opened this issue Jun 21, 2021 · 3 comments
Closed

Consider renaming DataGridColumn.Direction to "SortDirection" #2505

CaiusJard opened this issue Jun 21, 2021 · 3 comments
Labels
Type: Feature ⚙ Request or idea for a new feature.
Milestone

Comments

@CaiusJard
Copy link

CaiusJard commented Jun 21, 2021

While trying to set a grid so that a column was sorted by default I reasoned that the property would be on a column somewhere, but typing "Sort" in to see what intellisense would suggest brought only "Sortable" and "SortDirectionTemplate".

The property Direction is what I required, but I think it would be helpful to [Obsolete] this for a few releases and provide a mirrored property named SortDirection that does the same thing, before eventually removing Direction entirely.

It would establish consistency of naming with the property type (enum Blazorise.SortDirection) and other how other properties are named (e.g. public Blazorise.TextAlignment TextAlignment uses a property named the same as the enum) and also related props like SortDirectionTemplate. It would also result in putting sorting related properties together in Intellisense

I realize it's a breaking change, but looks like a simple enough one that the Obsolete mechanism can easily handle it

@stsrki
Copy link
Collaborator

stsrki commented Jun 21, 2021

Seems like a good idea. I'm currently working on DataGrid API so it should not be a problem.

@David-Moreira Any thoughts?

@stsrki stsrki added the Type: Feature ⚙ Request or idea for a new feature. label Jun 21, 2021
@stsrki stsrki added this to the 0.9.4 milestone Jun 21, 2021
This was referenced Jun 21, 2021
@stsrki stsrki closed this as completed Jun 21, 2021
@David-Moreira
Copy link
Contributor

Op said it all. Whenever you can have the functionality name as prefix or part of the name, great!
Datagrid has a freaking lot parameters so it helps with searching them by name and quickly correctly associate it with what it does. I remember this also happened to me when searching for some parameter, I don't recall if it was direction.

In my opinion, we should not bother with obsolete on a simple parameter...

@stsrki
Copy link
Collaborator

stsrki commented Jun 21, 2021

I have made a new parameter and marked old as Obsolete. Also in the release notes, I have added a migration to a new parameter, just in case.

@stsrki stsrki moved this to ✔ Done in Development Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature ⚙ Request or idea for a new feature.
Projects
Archived in project
Development

No branches or pull requests

3 participants