[MGNLUI-3862] Reordering fields doesn't work with DelegatingMultiValueTransformers Created: 25/Apr/16  Updated: 14/May/20  Resolved: 14/Dec/16

Status: Closed
Project: Magnolia UI
Component/s: forms
Affects Version/s: 5.4.5
Fix Version/s: 5.5.1

Type: Improvement Priority: Neutral
Reporter: Mikaël Geljić Assignee: Ngoc Nguyenthanh
Resolution: Fixed Votes: 2
Labels: support, transformer
Remaining Estimate: 0d
Time Spent: 3d 1.5h
Original Estimate: 5d

Issue Links:
Cloners
is cloned by MGNLUI-4123 Reordering fields doesn't work with d... Closed
Relates
causality
relation
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:
Sprint: Saigon 74
Story Points: 8

 Description   

Reordering fields doesn't work with delegating transformer implementations for the MultiValue field.

The MultiField component only implements the reordering itself, instead of delegating it to a common API for all multivalue transformers.

In worst case, if this cannot be done, then the reordering arrows should be hidden at least.

Updated in 2016-12-15
The final fix hides the up/down buttons if transfomerClass is DelegatingMultiValueFieldTransformer or its subclasses.



 Comments   
Comment by Mikaël Geljić [ 18/Nov/16 ]

The masterplan in the coming months is to retire transformers in some way. Meanwhile, if this can be addressed in a reasonable amount of time, let's go for it. If it's pita, we may hide those buttons.

Comment by Ngoc Nguyenthanh [ 30/Nov/16 ]

Document say:

It is not possible to change the order of the fields by using the Delegating*Transformer classes. These classes only delegate to other independent transformer classes which do not know about each other. The new order of the fields would not be kept after saving the change.

Proposal
  • Hide Up & Down buttons in case of MultiField can not sort.
  • In order to achieve that add a method to determine ability of sorting in Transformer interface
    default boolean isCanSort() {
        return true;
    }
  • Returns false in case of these transformers
DelegatingCompositeFieldTransformer
DelegatingMultiValueFieldTransformer
DelegatingMultiValueSubnodeTransformer
  • Exceptional case is SegmentationMultiField. Because it's overriding MultiField and use MultiValueTransformer instead.
Comment by Michaël van der Mark [ 13/Jan/17 ]

We also encounter this issue for our clients who cannot reorder the fields? We can reorder the fields in the dialog but at the moment we save changes nothing happend. And the fields are back in the order in which they were before.

Is it now possible to reorder the fields and save them?

Comment by Mikaël Geljić [ 25/Jan/17 ]

Hi Michaël, this is currently not possible with the delegating transformers. In spite of that tradeoff, we disabled the reorder functionality in that case—this is at least less confusing for users.
Most likely, the way forward for us to solve this is to re-implement the multi-field, for which we have a draft already, but no concrete schedule at the time of writing.

Cheers,

Comment by Michaël van der Mark [ 30/Jan/17 ]

Do I need to create a new ticket to get this known issue solved?

Comment by Thomas Duffey [ 26/Jul/19 ]

What's the deal here with SegmentationMultiField? We need that one sortable, seems like it is not.

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