[MGNLUI-3215] Page & component chooser field (available pages & components): Allow the customer to define a comparator-class to have an impact on the displayed order. Created: 27/Oct/14  Updated: 06/Aug/15  Resolved: 04/Feb/15

Status: Closed
Project: Magnolia UI
Component/s: page editor, pages app
Affects Version/s: 5.2.10, 5.3.4
Fix Version/s: 5.3.8

Type: Improvement Priority: Neutral
Reporter: Christian Ringele Assignee: Espen Jervidalo
Resolution: Fixed Votes: 0
Labels: support
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
dependency
is depended upon by MGNLUI-3347 CLONE - Add comparator class for sort... Closed
is depended upon by PAGES-5 Add comparator class for sorting avai... Closed
relation
is related to MAGNOLIA-6062 Remove default sorting for available ... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Date of First Response:

 Description   

Problem:
The page template one can choose in the pages app, and the components one can choose in the pages editor are sorted alphabetically.

This is in many situations quite annoying:
When the most often used pages and component have a "low" letter (t-z), they appear at the very bottom, or in case of page templates you need to click on "next" to get to the second tab pane -> you loos possibility to do all via keys, mouse click is a must.

For example the "Section" page is always in the second pane.

Source of problem:
/modules/pages/fieldTypes/templateSelect defined info.magnolia.pages.app.field.TemplateSelectorFieldFactory
Which delegates to a internal used comparator class.

Solution:
Allow to define/configure your own/custom comparator class on a select field.
(Probably on any field that operates on more than just one value this would make sense)

I think this is a often use case for select fields.
Having an impact on the order of the values without the need to "duplicate" the originals Factory class just for injecting a different comparator.



 Comments   
Comment by Stefan Baur [ 17/Dec/14 ]

Hi
Will this go into 5.3.7?
thx,
Stefan

Comment by Christian Ringele [ 13/Jan/15 ]

Hi Stefan,

I just coordinated with the dev team, yes it will be part of the 5.3.8 release.

Regards,
Christian

Comment by Stefan Baur [ 02/Feb/15 ]

cool! thx!

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