Get Semi-coupled Select form elements to work with the State API

Created on 27 May 2025, 27 days ago

Overview

Will populate after 📌 Confirm Semi-coupled form elements can work with State API visibility Active determines scope

Proposed resolution

User interface changes

📌 Task
Status

Postponed

Version

0.0

Component

Page builder

Created by

🇺🇸United States bnjmnm Ann Arbor, MI

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

Merge Requests

Comments & Activities

  • Issue created by @bnjmnm
  • 🇺🇸United States bnjmnm Ann Arbor, MI
  • Merge request !1076#3526772 "States API + select" → (Merged) created by bnjmnm
  • 🇺🇸United States bnjmnm Ann Arbor, MI
  • 🇺🇸United States bnjmnm Ann Arbor, MI

    Despite adding a bunch of additional testing the end result is fewer LOC! +341 −345

  • 🇺🇸United States bnjmnm Ann Arbor, MI

    Radix / 0.x

    Native / this MR

  • 🇺🇸United States bnjmnm Ann Arbor, MI
  • First commit to issue fork.
  • 🇺🇸United States hooroomoo

    The select element is cut off in Firefox

  • 🇺🇸United States hooroomoo

    I noticed a regression on Firefox, the select element (initial unselected state) renders to the width of the longest option in the select. I noticed it with the select element from the test module, then tested it out by adding another property that was a long string in simple/heading/heading.component.yml

    Also on Firefox, if an option is selected that is wider than the width of the settings panel, it gets cut off. This also happens in 0.x though so it's not a regression, but if it ends up being a simple fix, maybe it can be addressed in this issue since the MR deals with the select already? But if we want to hold off on it until the formal designs are implemented, that's fine with me too.

    But I do think the regression I mentioned at the beginning is worth addressing here.

  • 🇺🇸United States bnjmnm Ann Arbor, MI

    Re #10its not yet possible to get selects to wrap on long options in FF, but it looks much better now. The Chevron being there makes it more apparent it's a deliberate truncation.

    When FF supports the select style pseudos, this will look even better

  • Pipeline finished with Skipped
    21 days ago
    #512547
  • 🇺🇸United States hooroomoo

    Yup its much better thanks, reviewed and approved.

  • Pipeline finished with Skipped
    21 days ago
    #512555
    • bnjmnm committed ddf6493b on 0.x
      Issue #3526772 by bnjmnm, hooroomoo: Get Semi-coupled Select form...
  • 🇺🇸United States bnjmnm Ann Arbor, MI

    Ty @hooroomoo for the review

  • 🇮🇱Israel heyyo Jerusalem

    This latest change broke the possibility to select 'None' value from any select.
    We got not this validation error: data must be equal to one of the allowed values

  • 🇫🇮Finland lauriii Finland

    It seems like @mayur-sose raised similar concerns internally on this.

  • 🇪🇸Spain penyaskito Seville 💃, Spain 🇪🇸, UTC+2 🇪🇺

    Spend some time looking at this with @bnjmnm.

    We have two options:

    a) Adding _none to the json schema, and then unset the _none on submission because we definitely don't want that stored.
    b) Doing this client-side (on DrupalSelect or InputBehaviors).

    In the drupal widget world, this happens on #element_validate, where we unset the value if _none and not required.
    As we aren't triggering that on props widgets (and that's fine AFAIK), I think is less hacky to replicate that client-side. Ideally this would be contained in DrupalSelect, so looks like the less hacky of the alternatives while both look like similar efforts.

  • Merge request !1107#3526772 support _none in select → (Merged) created by bnjmnm
  • 🇺🇸United States bnjmnm Ann Arbor, MI

    Added a handle-none-option MR with test that should address #15

  • Pipeline finished with Success
    17 days ago
    Total: 955s
    #516036
  • 🇫🇮Finland lauriii Finland

    Another regression from this issue is that the caret is spinning after making a selection 😅

  • Pipeline finished with Success
    14 days ago
    Total: 856s
    #518015
  • Pipeline finished with Canceled
    14 days ago
    Total: 1678s
    #518029
  • Pipeline finished with Success
    14 days ago
    Total: 2369s
    #518039
  • 🇺🇸United States bnjmnm Ann Arbor, MI
  • Pipeline finished with Skipped
    10 days ago
    #521960
    • bnjmnm committed 7b9ac624 on 0.x
      Issue #3526772 by bnjmnm, hooroomoo: Get Semi-coupled Select form...
  • 🇺🇸United States bnjmnm Ann Arbor, MI

    FB is addressed as far as I can tell so I'm merging to get _none working properly again. If there's lingering bits happy to address in a followup.

Production build 0.71.5 2024