Hide the 'Add existing [label]' form / button if there are none

Created on 10 January 2024, 10 months ago
Updated 24 August 2024, 3 months ago

Problem/Motivation

✨ Hide the "Add existing [label]" button if there are none to reference Needs work is adding a nice feature upstream where if there are no existing entities to reference, hide the 'Add existing [label]' button.

For the same to work here, we need to change this widget's plugin code, too.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

RTBC

Version

1.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States dww

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

Comments & Activities

  • Issue created by @dww
  • Status changed to Needs review 10 months ago
  • πŸ‡ΊπŸ‡ΈUnited States dww

    This doesn't depend on the other issue at all, we could commit this here any time.

    I don't love having to add the extra layer of indentation, but the code you inherited was already a bit of a mess, so it's not so easy to do it otherwise without a larger code refactoring.

    • mlncn β†’ committed a2cb11e4 on 1.0.x
      Issue #3413666 by dww, mlncn: Hide the 'Add existing [label]' form /...
  • πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA

    The patch did not apply, but i think i brought this in faithfully except the ief_items and ief_add_existing_widget properties which did not exist in this module and do not yet exist in Inline Entity Form either. Talking about these lines that existed in the patch both as if already there and only getting indented in for the conditional:

              '#ief_items' => $items,
              '#ief_add_existing_widget' => $this->getSetting('add_existing_widget'),
    
  • πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA

    OK i see those are from ✨ Support the 'add_existing_widget' setting from #2683125 Needs review as i thought and should have already checked. Still willing to adopt everything that is stuck getting into IEF and then, i hope, getting everything into IEF (in particular ✨ Prioritize 'add existing' in nested entity creation UX to prevent duplication. Needs work ) and obsoleting this module entirely!

  • Status changed to RTBC 3 months ago
  • πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA
Production build 0.71.5 2024