- Issue created by @wim leers
- 🇫🇮Finland lauriii Finland
It must be possible to provide components with optional image fields without a default value, hence empty examples must be considered a valid schema for optional images.
\Drupal\experience_builder\ComponentMetadataRequirementsChecker::check() only checks for the presence of an examples[0], but it does not verify that it actually complies with the JSON Schema!
But in this case
examples[0]
doesn't exist: https://git.drupalcode.org/project/demo_design_system/-/blob/1.0.x/stars... 🤔 - First commit to issue fork.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Crediting @mherchel for #3507543, which is a duplicate. See my response at #3507543-3: Single broken component can break XB list of all components → .
- Merge request !688#3507641 Allow non-required images to render without examples → (Merged) created by longwave
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
📌 Clarify default 'resolved' vs 'source' value logic in GeneratedFieldExplicitInputUxComponentSourceBase::getClientSideInfo() Active is in! That'll make this MR much simpler! :D
- 🇬🇧United Kingdom longwave UK
This actually solves #2 and not the original problem described, so tagging for issue summary update.
This works locally with the
image-no-example
and SDDS components no longer crash for me, but some of the other SDDS components are acting strangely for me locally so this needs some more testing before it's ready to go in. - 🇬🇧United Kingdom longwave UK
Unassigning for now, will pick up again next week.
- 🇬🇧United Kingdom longwave UK
Since I moved the check to earlier then it seems the filtering is no longer needed, only the explicit
continue
, plus the fix to allow missing examples.Updated the IS and migrated the original issue to 📌 ComponentMetadataRequirementsChecker::check() should validate that the example(s) actually match the JSON schema Active
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
This looks GREAT!
But I'd like to see slightly more test coverage. So that we never have to revisit 🐛 Adding the Image component results in a state considered invalid Active nor anything "image prop shape"-related. 🤞
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
wim leers → changed the visibility of the branch 3502902-simpler to hidden.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
FYI: added the (trivial) comprehensive test coverage I wanted: https://git.drupalcode.org/project/experience_builder/-/merge_requests/6... — good to go now!
Why? As I wrote in #16: I don't ever want to revisit this again! 😅 →
-
wim leers →
committed 6bccf220 on 0.x authored by
longwave →
Issue #3507641 by longwave, wim leers, lauriii: Allow components...
-
wim leers →
committed 6bccf220 on 0.x authored by
longwave →
Automatically closed - issue fixed for 2 weeks with no activity.