Respect order of field groups

Created on 11 November 2024, about 1 month ago

Problem/Motivation

When using field_group module it would be nice to render the bulk edit fields in the same order they appear on the entity form, even if they are nested in a field group. Currently only the weight of the field is considered.

Steps to reproduce

Add a field group with weight 0 and place a field with weight 10 inside the group. Have other fields with weight between 1 and 9. Ideally the field in the group appears first.

Proposed resolution

If the field group module is enabled, and there are field groups on the form display, then order the fields the same as they would appear on the entity form. Make sure this supports nested field groups as well.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

3.0

Component

Code

Created by

🇦🇺Australia mstrelan

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

Merge Requests

Comments & Activities

  • Issue created by @mstrelan
  • Merge request !39Draft: Respect order of field groups → (Open) created by mstrelan
  • 🇦🇺Australia mstrelan

    Added a failing test

  • Pipeline finished with Failed
    about 1 month ago
    Total: 196s
    #334899
  • Pipeline finished with Failed
    about 1 month ago
    Total: 175s
    #335009
  • Pipeline finished with Failed
    about 1 month ago
    Total: 258s
    #336944
  • Pipeline finished with Failed
    about 1 month ago
    Total: 203s
    #336947
  • 🇦🇺Australia mstrelan

    This is working for the fields in the _field_selector container. For the usual field widgets, it is setting weights correctly, but these are not being rendered in the right order. I'm unsure why that is.

  • 🇦🇺Australia mstrelan

    EntityFormDisplay::processForm seems to be the culprit. Setting to Needs Review for feedback.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 217s
    #336995
  • First commit to issue fork.
  • Pipeline finished with Failed
    11 days ago
    Total: 178s
    #366201
  • Pipeline finished with Failed
    6 days ago
    Total: 147s
    #370595
Production build 0.71.5 2024