Display issue when using Claro and adding to multiple groups

Created on 27 February 2024, 9 months ago
Updated 13 August 2024, 3 months ago

Problem/Motivation

When using the field widget to add an entity to multiple groups there is an issue with how the form is displayed after being added to the first group.

When the form loads - it displays correctly:

When the first group is added, the form renders strangely. The button is stretched the full height and the width of the dropdown is compacted with no spacing between the button and the dropdown.

Steps to reproduce

  1. Add the field widget to a form, allow multiple
  2. Add the entity to a group

Proposed resolution

This issue is the CSS coming from Claro - but I don't know if its technically a bug for claro or entitygroupfield? It could be resolved by adding some additional rules to the existing admin CSS to target the form when it is rendered in the field actions wrapper - but I don't know what impact that would have on other admin theme.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Needs review

Version

1.0

Component

Widgets

Created by

🇳🇿New Zealand ericgsmith

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

Merge Requests

Comments & Activities

  • Issue created by @ericgsmith
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update 9 months ago
    4 pass
  • Status changed to Needs review 9 months ago
  • 🇳🇿New Zealand ericgsmith

    Not an expert on flex / the front end - but claro was setting the field actions and form wrapper as display flex - when the form is rendered without first adding to the group the wrappers are just normal divs.

    There is likely a more elegant way to style this when using flex - but given not all admin themes will be doing this, it seems safer to just set these back to block within the scope of the widget?

    Not sure, it works on claro but I haven't tests on any other admin themes.

  • Pipeline finished with Success
    9 months ago
    Total: 228s
    #105313
  • First commit to issue fork.
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update 6 months ago
    4 pass
  • 🇮🇳India naveenvalecha New Delhi

    Thanks for the PR
    I have tested it on a customer project. It works with the claro. I have replaced the css selector with genric one.

  • Pipeline finished with Success
    6 months ago
    Total: 239s
    #191543
  • First commit to issue fork.
  • 🇺🇸United States carsoncho Kansas City, MO

    This was mostly working, but we're using autocomplete widget so I've modified the selector to also target the autocomplete widget as well. Additionally, I added an align-self to fix the group listing title to also be centered.

  • Pipeline finished with Success
    3 months ago
    Total: 179s
    #253063
Production build 0.71.5 2024