We can improve list of options in the UI in a couple of ways for improved UX:
Alphabetize them
This MR sorts the following lists in select dropdowns and the lists of little clickable "chips" or "pills". It does not change the order of selected items, such as query sorts, which would of course change the actual behavior.
- Entity types
- Fields
- Filters
- Includes
- Sorts
Prevent the same sort field from being added multiple times
It doesn't make sense to select the same sort field more than once, for example, sorting by title twice. This MR disables a sort field once it's been added and re-enables it if it's removed.
Comments
Comment #3
traviscarden commentedComment #4
ankitv18 commentedComment #5
traviscarden commentedYa know what? As long as we're touching this code, let's make one more related enhancement and disable "Sort" fields once added to prevent adding the same one more than once.
Comment #6
balsamaHmm, when I use this MR, UUID appears in the list of sort options, which is not valid.
Comment #7
traviscarden commentedThanks, @balsama. That was actually to be expected insofar as the fix for that issue* just hadn't been committed yet at the time this MR was created. I've rebased. It should work and the problem should be gone now.
* #3545512: Errors when sorting
Comment #8
balsamaOh geez. Right. Looks good now. Thanks.
Comment #10
traviscarden commented