Conversation
99966e5 to
76c3b41
Compare
|
I just noticed that this doesn't work well together with our search form. I'm working on a solution |
MizukiTemma
left a comment
There was a problem hiding this comment.
Looks good 😸
I have just a small suggestion to add " ▲▼" to columns that can be used for sorting but not yet clicked, to singnalise users.
|
I think arrows are also good - just to make sure: there is either an up arrow (ascending), a down arrow (descending) or no arrow (unsorted)? @hauf-toni |
We could show it as not active (grey color) until clicked, then as active (black). |
Screen.Recording.2025-12-19.at.16.58.46.movHere's what I planned: Initially, all columns look the same. If a sortable column header is clicked, an arrow will appear next to the title. The sort can be reversed by clicking the same column again. The sort for that column is reset by double-clicking the column header. |
Just to make sure - what you are showing in the video is obviously what works already but then there's a reset for the search that does not work yet? Can you explain to me the difference between sort and search in this case? @jonbulz |
Sorry, I meant sort both times. What works is to sort by a column by clicking on the header, and then reversing the sort by clicking again. The only way to reset the sort in the current implementation is to refresh the whole page. That's what I meant. |
|
What is the current state? Should I review or is this blocked by #4009? |
Pardon my late reply, I just wanted to add that from a usability perspective I would not recommend to hide the functionality. As the sorting is not visible before clicking the first time the the user needs insider knowledge to access it. I would strongly recommend (with my ui/ux hat on, not the PO hat 🧢 ) that we adjust it to be visible before it clicked, eg by displaying the arrow as disabled first. |
|
I'd love to give you the opportunity to test this yourself @hauf-toni because I think it's hard to capture the user experience in a video. However, changing the icons and the way they are displayed is not a big code change. We could either:
|
We could have a look today during our meeting :) |
|
In our discussion today, we decided to abolish multi-column sorting and reset the sort by clicking the header and cycling through: |
Review SummaryWhat it does
Key observations
Note: There's an ongoing design discussion in comments about the arrow styling. Waiting for design input. |
|
@jarlhengstmengel I fixed the pipeline. That required a few small code changes, so if you get around to it, I'd happily accept another review 😊 If not, I'll count your approval as still valid. |
|
@jonbulz sorry for the late response, still looks good to me! |
|
And thanks for adding the ADR :) |
24d9424 to
313f301
Compare
d5b54a4 to
dde5de9
Compare
fix type annotations update translations styling in list view table header to prevent line break change search_input query from POST to GET switch search in POIs to GET sort by only a single column at a time restore translations revert changes to translations update translations remove default ordering from abstract base model fix unordered list object warning when no sort parameter is supplied add ADR for server-side sorting add release note for contact sorting fix translations
dde5de9 to
47cbf78
Compare
|
Tested on cms-test. Didn't notice any issues. |
|
@jonbulz when was the decision taken not to sort by related POI? I'm sorry to only be asking now - I just noticed while testing and then saw that related POIs are not mentioned above in the description and I cannot remember when and why the decision was taken. |
|
@osmers it's a related field and thus not in the same table in the database. To enable sorting by related fields might need a separate PR that I would have to look into |
@osmers actually, #4194 now introduces sorting by related fields. If you think this it is important enough you could open a ticket to include sorting by related POI. should be a simple change now :) |

Short description
Add server-side sorting (for contacts) in list views. Clicking a table header in the list view will toggle the sorting by that column. Clicking the header again will reverse the sort.
Multiple columns can be used for sorting simultaneously.In the discussion, we agreed that sorting is only enabled for a single column at a time. If a different sortable table header is clicked, the sort switches to that column. Sorting can be disabled by clicking on the tabel header a third time. Sorting is enabled for the following columns in the Contacts list view:
Proposed changes
table_fieldsin list view (only for contacts thus far)_sortable_table_headertemplate to generate table header from table fieldssort_tagsto make table header with sort label clickableFilterSortMixinto handle sort fields correctlySide effects
table_fieldsmatches the rows of the list view, otherwise there could be table header/column mismatchesFaithfulness to issue description and design
There are no intended deviations from the issue and design.
How to test
Go to Contact list view, test sorting by clicking on column headers. Test that sorting works together with searching.
Thus far, sorting is only enabled for Contacts. Other list views should not be affected by the changes of this PR. Check that other list views are not broken and the default ordering is not affected.
Resolved issues
Fixes: #3347
Fixes: #3880
Pull Request Review Guidelines