Overview

#3516602: SDC `enum` props should have human-readable labels: use `meta:enum` added support for meta:enum human-readable labels for enum props in SDCs. But #3515074: Shape matching MUST work with the resolved equivalents of $refs AND must be compatible with core's upcoming $ref resolving in SDCs accidentally relaxed this requirement.

#3586958: Relative image paths are incorrectly allowed as example image prop values in SDCs and code component example values then refactored this code to make the bug more obvious, and this was caught in post-commit review.

Proposed resolution

Enforce that meta:enum must exist for all enum props.

Add explicit test coverage so we do not regress again.

User interface changes

None

Issue fork canvas-3588972

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

longwave created an issue. See original summary.

penyaskito’s picture

I don't really think is needed. The schema will fill these and discard any extra values. See https://git.drupalcode.org/project/drupal/-/merge_requests/12326/diffs

Confirming is good so leaving open.

longwave’s picture

Wim explicitly asked for this over in #3586958: Relative image paths are incorrectly allowed as example image prop values in SDCs and code component example values. But if that's the case why do the tests fail when we move the check to the correct place? (it was accidentally skipped before)

longwave’s picture

Assigned: Unassigned » wim leers
Status: Active » Postponed (maintainer needs more info)

Back to Wim to get some consensus here, otherwise we're just going round in circles.

wim leers’s picture

Assigned: wim leers » Unassigned
Status: Postponed (maintainer needs more info) » Closed (works as designed)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.