Problem/Motivation

The webform module declares all custom elements using the 'webform_*' namespace but allows elements to be referenced via the YAML source without the 'webform_' prefix. The goal was to make it easier to enter an element's #type. For example, the 'Select other' element can be defined using just '#type': select_other instead of '#type': webform_select_other. The problem is that this 'magic' prefix handling logic is starting to cause conflicts with other modules that declare form and render elements like the address.module and link.module.

Proposed resolution

Store all elements with their full prefix, but in the YAML source editor display the shorthand type for elements that have no conflicts with other contrib modules.

Remaining tasks

  • Remove magic typing
  • Write update hook
  • Export config
  • Write test

User interface changes

API changes

Data model changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jrockowitz created an issue. See original summary.

  • jrockowitz committed c4a0cc9 on 2848042-type-rework
    Issue #2848042 by jrockowitz: Rework #type shorthand prefix handling.
    
jrockowitz’s picture

Status: Active » Needs review
FileSize
406.42 KB

Status: Needs review » Needs work

The last submitted patch, 3: rework_type_shorthand-2848042-2.patch, failed testing.

  • jrockowitz committed c28d167 on 2848042-type-rework
    Issue #2848042 by jrockowitz: Rework #type shorthand prefix handling....

  • jrockowitz committed 902b59b on 2848042-type-rework
    Issue #2848042 by jrockowitz: Rework #type shorthand prefix handling....
jrockowitz’s picture

Status: Needs work » Needs review
FileSize
407.83 KB

  • jrockowitz committed d5b80d5 on 8.x-5.x
    Issue #2848042 by jrockowitz: Rework #type shorthand prefix handling
    
jrockowitz’s picture

Status: Needs review » Fixed

  • jrockowitz committed 16ddccd on 8.x-5.x
    Issue #2848042 by jrockowitz: Rework #type shorthand prefix handling.
    

  • jrockowitz committed f6845d7 on 8.x-5.x
    Issue #2848042 by jrockowitz: Rework #type shorthand prefix handling
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.