Closed (fixed)
Project:
Drupal Canvas
Version:
1.x-dev
Component:
Config management
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
19 Jan 2026 at 11:57 UTC
Updated:
17 Apr 2026 at 13:51 UTC
Jump to comment: Most recent
Comments
Comment #4
tedbowComment #5
wim leersA great start! But I think the config schema is not yet correct. I think e.g. "array of URI strings" will fail to work currently.
Comment #6
isholgueras commentedI think this is ready for review.
Comment #7
tedbow@isholgueras see if this makes sense https://git.drupalcode.org/project/canvas/-/merge_requests/645#note_709202
Otherwise I think it looks good
Comment #8
tedbowComment #9
wim leersWill review tomorrow AM. Let's land #3576578: Inform SDC/code component developers of nonsensical `type: array` prop restrictions: `maxItems <2` meanwhile.
Comment #10
wim leersReflecting the complexity of this issue.
Comment #11
tedbowI have postponed #3572553: Save Multi-Value Prop Configuration for Code Components on this issue
Comment #12
wim leersReflecting I'm pushing this forward, at @tedbow's request.
Comment #13
wim leersTurns out @tedbow and I battled with this previously, in #3509037: JavaScriptComponent config entities' `examples` and `enum` do not respect the prop's type. Almost exactly a year ago, even!
With the addition of wrapping any of the existing supported "prop types" (as we call them in the UI), the complexity grew significantly.
By the power of
\Drupal\Core\Config\TypedConfigManager::getDefinitionWithReplacements(), this became a LOT better: 86484e51443a90818c0da6109c528f9f1681eb6e. We no longer need Canvas to work around #3577335: Config schema fails to expand dynamic non-top-level types, and we're using Config Schema As Intended™. (It follows the lead provided in #2392057-28: Config schema fails to expand dynamic top-level types.) Crediting @tim.plunkett because it's his test coverage that enabled me to step through and understand this!However, we did end up trading one core bug (a new one) for another one (pre-existing): #3400181: Follow-up for #2663410: calling TypedConfigManager::getDefinition() causes cache pollution — this one is far more likely to get fixed, because there are literally
@todos in core tests pointing to it and work-arounds for it!CI is green: https://git.drupalcode.org/project/canvas/-/pipelines/761039 — but … the work-arounds in 3 places are inadequate: they only help PHPUnit tests, not CLI/E2E tests.
This is enough to make tests pass:
That should be the last bit 🤞
Comment #14
tedbowWow @wimleers amazing work. I have not had chance to look through this but thank you so much!
Comment #15
wim leersVeeeery Nice to wake up to a green E2E test suite! 😮💨
Down to a single trivial failure and needing to merge in upstream. Already approved, now it’s up to Nacho & Ted to review my changes — but I think they’ll recognize the majority as being unchanged!
@Ted: you’re welcome! I knew this was hard-blocking y’all, so I tried to make it happen ASAP. This was one tough puzzle, but that’s why it nerd-sniped me 🤓😶🌫️😶🌫️
Comment #16
tedbowphpunit fail, but looks like a simple array key order problem. Working on it
Comment #17
tedbowAssuming tests now pass just a problem with array key order in test expectation, so back to RTBC
Comment #18
tedbowI think this looks good. there is one standing question from @ isholgueras https://git.drupalcode.org/project/canvas/-/merge_requests/645#note_713991 but I think to be practical we can follow-up with @wimleers on Monday.
Comment #19
wim leersAlready responded :)
P.S.: you can confirm what I wrote visually instead of with a debugger using https://www.drupal.org/project/config_inspector
Comment #21
tedbowThanks everyone!!!!
Comment #24
wim leers#3581581: Follow-up for #3568264: add explicit test coverage proving code components can have multi-value `enum` prop shapes improved this MR's test coverage.