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

Improve sorting experience for users #9674

Closed
michalsgit opened this issue Jun 8, 2021 · 14 comments · Fixed by #10336
Closed

Improve sorting experience for users #9674

michalsgit opened this issue Jun 8, 2021 · 14 comments · Fixed by #10336
Assignees
Labels
grid: sorting 🧰 feature-request ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.

Comments

@michalsgit
Copy link

Is your feature request related to a problem? Please describe.

Users can be frustrated to change sorting in grid when is allowed sorting by multiple columns.
Let's suppose there is a grid with 3 columns: col1, col2,col3. It is sorted by col2(asc) and then by col3(asc).
User wants to sort it just by column col1
Right now user must find already sorted column and then click 5 times to achieve the expected sorting.

Describe the solution you'd like

By clicking on sort icon, the current column should be sorted and other sorting criteria should be clear out.
Ctrl+click should allow to add sorting of the current column in addition to existing sorted columns.

@sddania
Copy link

sddania commented Jun 16, 2021

imho, should be implemented a sorting mode like the selection mode ('single', 'multiple')

@Eralmidia
Copy link

I agree with @sddania. The current way this works (allowing multi sorting) is definitely a feature worth having. Allowing ctrl + click most likely isn't clear for many users.

@github-actions
Copy link

There has been no recent activity and this issue has been marked inactive.

@github-actions github-actions bot added the status: inactive Used to stale issues and pull requests label Sep 26, 2021
@github-actions github-actions bot closed this as completed Oct 3, 2021
@zdrawku zdrawku removed the status: inactive Used to stale issues and pull requests label Oct 7, 2021
@zdrawku zdrawku assigned hanastasov and unassigned zdrawku Oct 7, 2021
@zdrawku zdrawku reopened this Oct 7, 2021
@StefanIvanov
Copy link
Contributor

@sddania @Eralmidia the current sorting behavior allows to react on the event of sorting being triggered and decide whether to dismiss the current sort state i.e. have a single sort or to keep it and add a new column to it i.e. multi column sort. Have you checked the following example? https://www.infragistics.com/products/ignite-ui-angular/angular/components/grid/sorting

@sddania
Copy link

sddania commented Oct 18, 2021

I have implemented this workaround, but in order to improving the developer experience we suggest you to implements another sorting behavior and let it be selectable by an input parameter (as I suggested before).

@Eralmidia
Copy link

Eralmidia commented Oct 18, 2021

@StefanIvanov Yes, that's a reasonable implementation. It is kinda like issue with the single select combo discussed at #9832, in that I feel this is sort of basic functionality which should have been simply a mode input (like for instance the changes you made to selection, in order to support single or multiple row/cell selection). But in our case, we already have a grid service as a layer on top of the igx grids to add additional functionality, so we can simply add the support into this service in order to achieve this.

@StefanIvanov
Copy link
Contributor

Thank you both for the clarifications, I wanted to make sure you are aware of the sample we made as an application scenario because we had this discussion when we implemented the multi sort and decided to show it like this for now instead of adding new modes and properties. Let us discuss this internally and @radomirchev will get back to you with a decision and timing when to expect that decision.

@kdinev
Copy link
Member

kdinev commented Oct 18, 2021

@StefanIvanov If we want to be consistent with the igGrid sorting behavior, then we should probably expose two modes. The jQuery grid does have single and multi modes, while the igx-grid has only multi by default. I think we should keep the default, in order to not make breaking changes, but to somehow enable a single behavior (not necessarily through a mode option). Ctrl+click is not a good option for us, as this would not work on mobile.

@radomirchev
Copy link
Contributor

@Eralmidia @sddania sorting specification has been updated with your request. Please, review it and if it is ok we are to include the issue in our Roadmap for 2021

@Eralmidia
Copy link

Looks good to me 👍

@sddania
Copy link

sddania commented Oct 19, 2021

imho the sortingOptions input parameter is over-engineered. It makes sense that there might be other options to have to set for sorting, but now I can't think of anything.
Is better to expose directly a sortingMode enum in order to set it directly sortingMode="single" on the grid component.

@Eralmidia
Copy link

@sddania That was my first thought as well, but just because we can't think of anything right now, doesn't mean there won't be more options? And changing it at a later point would be a breaking change. The solution in the spec is more future proof. I guess one option could be that the input could be string | SortingOptions (or whatever the model is called), but I'm guessing the guys at Infragistics would find that a bit unnecessary? 😛

@hanastasov hanastasov added 🛠️ status: in-development Issues and PRs with active development on them and removed 🆕 status: new labels Oct 20, 2021
@katherinedragieva katherinedragieva added ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. and removed 🛠️ status: in-development Issues and PRs with active development on them labels Oct 21, 2021
@zdrawku zdrawku removed the ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. label Oct 25, 2021
@zdrawku zdrawku added the 🛠️ status: in-development Issues and PRs with active development on them label Oct 25, 2021
@github-actions
Copy link

There has been no recent activity and this issue has been marked inactive.

@github-actions github-actions bot added the status: inactive Used to stale issues and pull requests label Dec 25, 2021
@hanastasov hanastasov removed the status: inactive Used to stale issues and pull requests label Dec 29, 2021
@hanastasov
Copy link
Contributor

hanastasov commented Feb 24, 2022

Hi @michalsgit and @Eralmidia. This feature is one of the most wanted from our customers, and this is why we prioritize it now not for next, but for the sprint after the next one. Implementation will follow our Sorting Specification (see the Options section) and will also decouple grouping from sorting.

Edit: By "this feature" I meant the sorting modes option - enabling the developer to choose between single and multiple sorting mode. I have logged a separate task for this - #11269 where all relevant information from this issue has been copied.

@ddincheva ddincheva added status: resolved and removed 🛠️ status: in-development Issues and PRs with active development on them labels Apr 12, 2022
@kdinev kdinev added ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged. and removed status: resolved labels May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grid: sorting 🧰 feature-request ✅ status: resolved Applies to issues that have pending PRs resolving them, or PRs that have already merged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants