Find bug(s) that explain unmatched field type props

Created on 13 March 2025, 20 days ago

Overview

πŸ“Œ Provide visibility into which (core) field type props can be mapped into Content Type Templates vs not Active added FieldTypeSupportTest surfaced that a few field type props are not being matched, when it's not clear why they're not matched:

    'comment' => [
…
        // @todo Figure out why XB won't match the `test_string` prop
        'last_comment_name' => TRUE,
    ],
…
    'password' => [
      // @todo Figure out why XB won't match the `test_string` prop
      'value' => TRUE,
      // @todo Figure out why XB won't match the `test_string` prop
      'existing' => TRUE,
    ],

Proposed resolution

TBD.

User interface changes

πŸ› Bug report
Status

Active

Version

0.0

Component

Shape matching

Created by

πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

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

Merge Requests

Comments & Activities

  • Issue created by @wim leers
  • First commit to issue fork.
  • Merge request !808#3512854 Bump up field prop support β†’ (Open) created by larowlan
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    String data needs the StringSemantics constraint in order to match against formats etc, so added those to password item props.

    The comment_last_name field is computed, so marked that as unsupported (core bug).

    Also updated the comments for path fields because the whole field item list is computed.

  • Pipeline finished with Failed
    13 days ago
    Total: 1756s
    #453653
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    There's some test fails here because I didn't update the tests to include the 'Article author's password' as a source.

    I'm thinking this is a red flag that we shouldn't support password fields ever.

    Thoughts?

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    I'm thinking this is a red flag that we shouldn't support password fields ever.

    +1 β€” I don't see why, either.

    I think we should consider special-casing this field type, to ensure it doesn't get listed in \Drupal\Tests\experience_builder\Kernel\EcosystemSupport\FieldTypeSupportTest::SUPPORTED anymore, because we should explicitly not support it.

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Removed support for password with an explicit test

  • Pipeline finished with Success
    6 days ago
    Total: 4265s
    #459310
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    green now

  • πŸ‡ΊπŸ‡ΈUnited States effulgentsia

    The comment_last_name field is computed, so marked that as unsupported (core bug).

    What's the core bug? Is "core" referring to Drupal core, or some other meaning of "core"?

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    What's the core bug? Is "core" referring to Drupal core, or some other meaning of "core"?

    I guess the first question is - should we be able to map dynamic prop sources in XB to computed fields in Drupal.

    If the answer is yes, then I think we need a core issue to flag those comment fields as computed - but we also need an override in XB to add the string semantics (aka the format key from JSON schema) to that we can ascertain what sort of value they hold.

    Can you clarify if the expectation is that you can setup dynamic prop sources against computed fields?

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10
  • πŸ‡ΊπŸ‡ΈUnited States effulgentsia

    Yes, once we implement dynamic prop sources at all, it should be possible to "link" (the terminology that the UI will use for this) component props to computed fields as well as to computed properties of field items.

    I think we need a core issue to flag those comment fields as computed

    Oh, is the core bug that it's a computed field but not declared as such (isComputed() returns false)?

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Yes that's correct

  • πŸ‡ΊπŸ‡ΈUnited States effulgentsia

    Ok, so that makes sense that that's a core bug, but why does that matter to XB's shape matching? What are we doing that varies by what isComputed() returns?

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Now there's the answer in #13 there is no distinction now (I think).

    This needs to go back to needs work as we should be able to remove a lot more of the FALSE items in this list with custom field overrides.

Production build 0.71.5 2024