Allow Field Group Elements to be grouped

Created on 12 June 2024, 11 months ago
Updated 14 August 2024, 9 months ago

Problem/Motivation

I'm using the Gin admin them and would like to add a details group to the content righthand sidebar in a node edit screen. To do this, I must set the #group attribute on the details form element to 'advanced' and this will place it in the right location.

The FormAddGroupElement action does not provide this option.

Proposed resolution

Add a group configuration option and add it to the group element.

Feature request
Status

Fixed

Version

2.1

Component

Code

Created by

🇳🇿New Zealand Josh Waihi

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

Merge Requests

Comments & Activities

  • Pipeline finished with Success
    11 months ago
    Total: 248s
    #196619
  • Issue created by @Josh Waihi
  • Merge request !427#3454057: Add group option to Group element. → (Closed) created by Josh Waihi
  • Merge request !428#3454057: Add group option to Group element. → (Closed) created by Josh Waihi
  • Pipeline finished with Success
    11 months ago
    Total: 444s
    #196739
  • Pipeline finished with Success
    11 months ago
    Total: 441s
    #196740
  • Pipeline finished with Success
    11 months ago
    #196948
  • Status changed to Needs work 11 months ago
  • 🇩🇪Germany jurgenhaas Gottmadingen

    Thanks @Josh Waihi for your contribution. I've left some comments in the MR.

    As this is a new feature that can only be added to the 2.x branch, please update the MR accordingly.

    Also, this needs an update hook to initialize the new group value for existing ECA models; otherwise this is logging warning about undefined array keys.

  • 🇩🇪Germany jurgenhaas Gottmadingen
  • Pipeline finished with Running
    11 months ago
    #197236
  • Pipeline finished with Failed
    11 months ago
    Total: 175s
    #197253
  • Pipeline finished with Failed
    11 months ago
    Total: 240s
    #197254
  • Pipeline finished with Success
    11 months ago
    Total: 499s
    #197252
  • Pipeline finished with Success
    11 months ago
    Total: 530s
    #197264
  • Pipeline finished with Success
    11 months ago
    Total: 273s
    #197625
  • 🇳🇿New Zealand Josh Waihi

    I don't know how to approach the update hook here. Is this something you can add or give me some guidance on how to write it?

  • Pipeline finished with Success
    11 months ago
    Total: 444s
    #197664
  • 🇳🇿New Zealand Josh Waihi

    TIL when the target branch is changed in an issue, it also changes the diff/patch (which I was using in my composer patches for a project). So attaching a static patch for 1.1.x for reference (accepting it won't be added).

  • 🇩🇪Germany jurgenhaas Gottmadingen

    Thanks a lot @Josh Waihi, I've added two more comments in the MR.

    I don't know how to approach the update hook here. Is this something you can add or give me some guidance on how to write it?

    An example can be eca_update_8001() which loads all existing ECA entities. You could loop over all action plugins and if the FormAddGroupElement plugin is being used but doesn't have the group property in the configuration, add that as an empty string and save the config entity.

    Having said that, it just comes to mind that we have the not widely known Drush command drush eca:update which goes through all ECA entities and updates them if necessary. Would you mind testing this, if it updates a model properly?

    TIL when the target branch is changed in an issue, it also changes the diff/patch (which I was using in my composer patches for a project). So attaching a static patch for 1.1.x for reference (accepting it won't be added).

    Patches should never be used from d.o, it is always strongly recommended to download them and apply them from a source that is fully under your control. There have been recent discussions, that the migration to GitLab may mean that all patch files will be gone. While that will break a lot of deployments, it is still under consideration due to that strong recommendation, that had always been in place.

  • Pipeline finished with Canceled
    11 months ago
    #199324
  • Pipeline finished with Running
    11 months ago
    #199325
  • Pipeline finished with Success
    11 months ago
    Total: 187s
    #205488
  • Pipeline finished with Success
    11 months ago
    Total: 338s
    #206223
  • Pipeline finished with Canceled
    10 months ago
    Total: 93s
    #220294
  • 🇳🇿New Zealand Josh Waihi

    I tried testing drush eca:update:

    1. I updated my model config in YAML and removed the "group" configuration setting.
    2. Then used drush config:import to persist that configuration into the database
    3. Then I ran drush eca:update expecting it to update configuration in the database
    4. Then I ran drush config:export expecting it to recreate the "group" configuration setting with an empty value

    However, config:export did not introduce any changes indicating eca:update did not work as expected.

  • Pipeline finished with Success
    10 months ago
    Total: 539s
    #220296
  • Status changed to Needs review 10 months ago
  • 🇳🇿New Zealand Josh Waihi

    Update hook added. Ready for another review.

  • Pipeline finished with Failed
    10 months ago
    Total: 444s
    #220307
  • Status changed to Needs work 10 months ago
  • 🇩🇪Germany jurgenhaas Gottmadingen

    I tried testing drush eca:update

    That drush command is not involved in any of the update hooks. That's for a different purpose.

    What you need to test is to run drush updatedb and you should see, that it will execute the eca_form_update_8003 update hook. For that to work, you don't need to manually edit any yaml file, that should all be done by that hook.

    Also, please fix the pipeline error before setting to "Needs review".

  • Pipeline finished with Success
    10 months ago
    Total: 527s
    #221506
  • Status changed to RTBC 10 months ago
  • 🇳🇿New Zealand Josh Waihi

    For that to work, you don't need to manually edit any yaml file, that should all be done by that hook.

    I needed to revert my config so I could test a state where the hook would actually change the config.

    Pipeline fixes done.

  • Status changed to Needs review 10 months ago
  • 🇳🇿New Zealand Josh Waihi

    Whoops, wrong status

  • Status changed to Needs work 10 months ago
  • 🇩🇪Germany jurgenhaas Gottmadingen
  • Pipeline finished with Canceled
    10 months ago
    Total: 74s
    #224140
  • Status changed to Needs review 10 months ago
  • Pipeline finished with Success
    10 months ago
    Total: 414s
    #224141
  • Status changed to RTBC 10 months ago
  • 🇩🇪Germany jurgenhaas Gottmadingen

    Thanks a lot @Josh Waihi for your patient work on this. I've reviewed it and will merge in a minute.

  • Pipeline finished with Skipped
    10 months ago
    #232178
  • Pipeline finished with Skipped
    10 months ago
    #232179
    • jurgenhaas committed 7eb1d1f0 on 2.1.x
      Issue #3454057 by Josh Waihi, jurgenhaas: Allow Field Group Elements to...
  • Status changed to Fixed 10 months ago
  • 🇩🇪Germany jurgenhaas Gottmadingen
  • Pipeline finished with Canceled
    9 months ago
    #237817
  • Pipeline finished with Success
    9 months ago
    Total: 1919s
    #237818
  • 🇳🇿New Zealand Josh Waihi

    w00t! Thanks!

  • 🇳🇿New Zealand Josh Waihi

    @jurgenhaas, can this also be merged into 2.0.x?

  • Pipeline finished with Canceled
    9 months ago
    Total: 293s
    #239362
  • Pipeline finished with Canceled
    9 months ago
    Total: 901s
    #239367
  • Pipeline finished with Failed
    9 months ago
    Total: 2087s
    #239392
  • 🇩🇪Germany jurgenhaas Gottmadingen

    @Josh Waihi unfortunately not, as this is a new feature. The 2.0.x branch is for bug fixing only. But you can easily apply the diff of this commit to your composer project so that it automatically applies that change until 2.1.0 will be released.

  • Pipeline finished with Success
    9 months ago
    Total: 2115s
    #240614
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Pipeline finished with Success
    7 months ago
    Total: 185s
    #294475
  • Pipeline finished with Success
    7 months ago
    Total: 209s
    #296355
  • Pipeline finished with Success
    7 months ago
    Total: 332s
    #296370
  • Pipeline finished with Success
    7 months ago
    Total: 322s
    #302134
  • Pipeline finished with Failed
    5 months ago
    Total: 846s
    #350342
  • Pipeline finished with Failed
    5 months ago
    Total: 1158s
    #350566
  • Pipeline finished with Success
    5 months ago
    Total: 545s
    #350583
  • Pipeline finished with Success
    5 months ago
    Total: 562s
    #350638
  • Pipeline finished with Failed
    5 months ago
    Total: 861s
    #350634
  • Pipeline finished with Failed
    5 months ago
    Total: 937s
    #350701
  • Pipeline finished with Failed
    5 months ago
    Total: 809s
    #350731
  • Pipeline finished with Failed
    5 months ago
    Total: 637s
    #350779
  • Pipeline finished with Success
    5 months ago
    Total: 688s
    #350799
  • Pipeline finished with Success
    5 months ago
    Total: 1950s
    #350858
  • Pipeline finished with Success
    5 months ago
    Total: 739s
    #350923
  • Pipeline finished with Success
    5 months ago
    Total: 711s
    #351731
  • Pipeline finished with Failed
    5 months ago
    Total: 857s
    #353408
  • Pipeline finished with Canceled
    5 months ago
    Total: 147s
    #353502
  • Pipeline finished with Failed
    5 months ago
    Total: 816s
    #353507
  • Pipeline finished with Failed
    5 months ago
    Total: 915s
    #354562
  • Pipeline finished with Failed
    5 months ago
    Total: 804s
    #354600
  • Pipeline finished with Failed
    5 months ago
    Total: 816s
    #354618
  • Pipeline finished with Failed
    5 months ago
    Total: 793s
    #367607
  • Pipeline finished with Failed
    5 months ago
    Total: 818s
    #370629
  • Pipeline finished with Failed
    5 months ago
    Total: 889s
    #370634
  • Pipeline finished with Failed
    5 months ago
    Total: 878s
    #370688
  • Pipeline finished with Failed
    5 months ago
    Total: 678s
    #370706
  • Pipeline finished with Failed
    5 months ago
    Total: 853s
    #370721
  • Pipeline finished with Canceled
    5 months ago
    Total: 172s
    #371913
  • Pipeline finished with Canceled
    5 months ago
    Total: 31s
    #371919
  • Pipeline finished with Failed
    5 months ago
    Total: 710s
    #371920
  • Pipeline finished with Canceled
    4 months ago
    Total: 453s
    #392401
  • Pipeline finished with Canceled
    4 months ago
    Total: 212s
    #392407
  • Pipeline finished with Canceled
    4 months ago
    Total: 148s
    #392411
  • Pipeline finished with Canceled
    4 months ago
    Total: 111s
    #392413
  • Pipeline finished with Canceled
    4 months ago
    Total: 699s
    #392415
  • Pipeline finished with Canceled
    4 months ago
    Total: 179s
    #392429
  • Pipeline finished with Success
    4 months ago
    Total: 842s
    #392431
  • Pipeline finished with Success
    4 months ago
    Total: 958s
    #392457
  • Pipeline finished with Failed
    4 months ago
    Total: 1086s
    #392566
  • Pipeline finished with Failed
    4 months ago
    Total: 224s
    #404522
  • Pipeline finished with Success
    4 months ago
    Total: 205s
    #404527
  • Pipeline finished with Success
    3 months ago
    Total: 244s
    #405419
  • Pipeline finished with Success
    3 months ago
    Total: 242s
    #405422
  • Pipeline finished with Success
    3 months ago
    Total: 254s
    #405428
Production build 0.71.5 2024