Overview

Changes like https://git.drupalcode.org/project/canvas/-/merge_requests/663#note_710706 on #3576578: Inform SDC/code component developers of nonsensical `type: array` prop restrictions: `maxItems <2` and https://git.drupalcode.org/project/canvas/-/merge_requests/706/diffs#6a8... on #3572553: Save Multi-Value Prop Configuration for Code Components are distracting/frustrating. They should not be necessary.

Proposed resolution

  1. Split canvas_test_sdc_invalid off from canvas_test_sdc, make it contain all test SDCs that are invalid. Update https://git.drupalcode.org/project/canvas/-/merge_requests/663#note_710706 and \Drupal\Tests\canvas\Kernel\Plugin\Canvas\ComponentSource\SingleDirectoryComponentTest::testDiscovery() accordingly. That means:
    • $this->findIneligibleComponents(SingleDirectoryComponent::SOURCE_PLUGIN_ID, 'canvas_test_sdc') should match the empty array.
    • Every SDC that is currently being found as ineligible must be moved to the canvas_test_sdc_invalid module.
  2. Similarly update \Drupal\Tests\canvas\Kernel\Plugin\Canvas\ComponentSource\SingleDirectoryComponentTest::testRenderComponentLive to no longer test the rendering of

    User interface changes

    None.

Comments

wim leers created an issue. See original summary.

wim leers’s picture

Issue summary: View changes

Will finish this tomorrow.

wim leers’s picture

Issue summary: View changes
wim leers’s picture

Title: DX: reorganize test components: `canvas_test_sdc` etc. » DX: reorganize test components: `canvas_test_sdc` should have its (intentionally invalid) SDCs moved to `canvas_test_sdc_invalid`
Assigned: wim leers » Unassigned
Issue summary: View changes
Status: Postponed (maintainer needs more info) » Active
Issue tags: -Needs issue summary update +Novice, +Chicago2026

Seems like a great Novice task — doubly so for DrupalCon this week! 😊

wim leers’s picture

Assigned: Unassigned » wim leers
Issue tags: -Novice, -Chicago2026 +technical debt

Let's see if I can tackle this with AI in the coming weeks.