use DraggableListBuilder

Created on 4 March 2024, 10 months ago
Updated 17 June 2024, 6 months ago

Problem/Motivation

Using DraggableListBuilder would improve UX for setting weights of environments.

However, there are several blockers:

- ✨ use weight form element for environment weights Active
- the render array returned by EnvironmentIndicatorListBuilder needs converting because of πŸ› DraggableListBuilder / DraggableListBuilderTrait need to document that buildRow() behaves completely differently from the parent class Active .

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Needs review

Version

4.0

Component

User interface

Created by

πŸ‡¬πŸ‡§United Kingdom joachim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @joachim
  • πŸ‡¬πŸ‡§United Kingdom joachim
  • πŸ‡¬πŸ‡§United Kingdom joachim

    > - the render array returned by EnvironmentIndicatorListBuilder looks like it's nonstandard, as switching it to inherit from DraggableListBuilder causes a lot of errors.

    Correction -- the problem is that DraggableListBuilder doesn't handle rows the same as its parent class.

  • πŸ‡¬πŸ‡§United Kingdom joachim

    Done, but needs πŸ› weight property should be declared as an int in config schema Needs review to be committed first.

  • Status changed to Needs review 10 months ago
  • πŸ‡ͺπŸ‡ΈSpain isholgueras

    Hi joachim, πŸ› weight property should be declared as an int in config schema Needs review was released in 4.0.18.

    Can this be tested or there is some work left to do?

  • πŸ‡¬πŸ‡§United Kingdom joachim

    I've rebased the MR, it's ready to review.

  • First commit to issue fork.
  • πŸ‡ΊπŸ‡ΈUnited States trackleft2 Tucson, AZ πŸ‡ΊπŸ‡Έ

    I reviewed this merge request and found the following issues.
    - the $row['label'] property appears to only allow #plain_text, so we can't put markup in there.
    - list builder behaves differently for each of the following circumstances
    - 1 environment indicator in config, weight column should not be present, drag handle should not be present.
    - 0 environment indicators in config, there should be a link to create a new environment indicator
    - 2 or more environment indicators in config, weight column should now be present, drag handle should now be present.

    The preview column will show a visual representation of the selected options in the preview column. The preview shows the Name of the environment indicator with the text color and background color applied.

    I've updated the code in the merge request so that all of the above works.

  • Pipeline finished with Success
    about 2 months ago
    Total: 141s
    #321821
Production build 0.71.5 2024