[MGNLUI-3814] Allow configuration of defaultOrder in grids: descending or ascending Created: 16/Mar/16  Updated: 22/Jun/21  Resolved: 09/Mar/21

Status: Closed
Project: Magnolia UI
Component/s: content app
Affects Version/s: None
Fix Version/s: 6.2.7

Type: Improvement Priority: Major
Reporter: Simon Aebli Assignee: Milan Divilek
Resolution: Fixed Votes: 2
Labels: VN-Testing, support, ux-improvement-selected
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split to MGNLUI-6537 Reset sorting in grid by context menu Closed
Relates
causality
is causing MGNLUI-6725 Provide sort by node name in jcrDatas... Closed
documentation
to be documented by MGNLUI-6617 DOC: Update sorting properties in Dat... Closed
duplicate
is duplicated by MAGNOLIA-7989 Default order within Apps can not be ... Closed
relation
is related to MGNLUI-5994 Deprecate sortable in favor of sortBy... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Release notes required:
Yes
Documentation update required:
Yes
Date of First Response:
Epic Link: UI framework implementation
Sprint: UI FW 23
Story Points: 3

 Description   

At the moment, we can define a default order for the subapps. Unfortunately, we can only specify the property name and not if the column should be ordered descending, which comes helpful e.g. for an app maintaining latest news.

Customers can define sortable properties in the JcrDatasource with `sortByProperties`. Just not which direction.

Notes:

Maybe add a sortOrder configuration to BaseDatasourceDefinition which allows for ASC/DESC values.

https://docs.magnolia-cms.com/product-docs/Apps/App-configuration/Data-source-definition/JCR-data-source.html

We would replace sortByProperties list with a map like

firstProperty : asc;
secondProperty : desc;
...

We'll still support the list for compatibility as deprecated.

The below was split into MGNLUI-6537

We currently cannot sort by more than one property in UI by clicking columns. The sorting of the previous one is ignored when a second one is clicked. Something to consider (ticket?)
Also resetting to the state that is configured in the app would only be available only by reloading page (have a different way to reset this?)



 Comments   
Comment by Christopher Zimmermann [ 17/Mar/16 ]

renamed after discussing with partner.

Comment by Antti Hietala [ 15/Feb/17 ]

Use cases:

  • As an editor, I want to see newest assets first.
  • As a managing editor, I want to see what pages my team has edited today.
  • As a salesperson, I want to see newest contacts first.
  • As an event coordinator, I want to see latest events first.
  • As a publisher, I want to see pages whose publishing status is Modified first.
  • etc...

These uses cases are not possible today because

  • date sort is ascending by default.
  • publication status is not sortable. To reproduce, go to list view in Pages and sort by Status column.
Comment by Richard Gange [ 05/May/20 ]

mgeljic Can this ticket be closed since we have this configuration from BaseDatasourceDefinition? Seems like I can sort on property names when using JcrDatasourceDefinition.

cc viet.nguyen

Comment by Mikaël Geljić [ 06/May/20 ]

sorting direction is still relevant for superseding JCR datasource config

Comment by Richard Gange [ 04/Jan/21 ]

The content connector configuration has been replaced by the datasource configuration.

See https://docs.magnolia-cms.com/product-docs/Apps/App-configuration/Data-source-definition.html

Comment by Christopher Zimmermann [ 04/Jan/21 ]

Does the datasource configuration or app configuration support supplying a default sort DIRECTION (ascending, decending?) If not the ticket shoud remain open.

I don't see anything like that specified here: https://docs.magnolia-cms.com/product-docs/Apps/App-configuration/Data-source-definition/JCR-data-source.html

Comment by Christopher Zimmermann [ 25/Jan/21 ]

Reopening this ticket, as the comments and links are still relevant and useful in understanding value of ticket.

Generated at Mon Feb 12 09:10:20 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.