- Issue created by @wim leers
- Merge request !819Draft: Resolve #3503038 Refactor for SDC component metadata instead of plugin instances β (Open) created by longwave
- Status changed to Needs work
4 months ago 1:50pm 22 April 2025 - π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
I don't think this needs to be a stable blocker; XB at release won't yet allow additional
ComponentSourceInterface
implementations. Which means this would be an entirely internal refactor? - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
The fact we had to pretend this exists in the fallback plugin makes me feel it is a stable blocker.
I know @mohit_aghera has a pinto component source plugin that is also grappling with this. - π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Adding back tag until the conversation above is resolved (we can always remove it again, just want to make sure it's not lost)
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
I think this is less urgent.
- π¦πΊAustralia larowlan π¦πΊπ.au GMT+10
Tagging for colleagues as this is a bug bear for the Pinto work Mohit has been doing
- First commit to issue fork.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Thanks, @mohit_aghera, for pushing this forward! π₯³π
- Status changed to Active
12 days ago 9:06pm 8 August 2025 - πΊπΈUnited States effulgentsia
I read #10, but I don't think this is a stable blocker. We'd be happy to merge this once it's ready though, so by untagging it I have no desire to slow this issue down.
For XB, the definition of stable is different than core's. We'll be adding @internal to almost everything and relaxing that in 1.x minor releases. The main goal of an XB stable release is to unblock a Drupal CMS 2.0 stable release, allowing people/agencies to build and deploy real sites with that. But XB 1.0.0 won't yet have a proper PHP API surface for contrib projects to perform more advanced integrations than what DCMS 2 exercises, except to the extent that issues like this one just happen to get done ahead of a 1.0.0 release.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
This is going to block π± [META] Content templates Active , and π Move `PropSourceEndpointTest` into new `XbConfigEntityHttpApiTest::testComponent()` Active made it very apparent π
Quoting
\Drupal\Tests\experience_builder\Functional\ApiUiContentTemplateControllersTest::testSuggestionsClientErrors()
:* ["node/article/js.xb_test_code_components_with_link_prop", 400, "Code components are not supported yet."] * ["node/article/js.xb_test_code_components_with_no_props", 400, "Code components are not supported yet."]
So, starting point:
diff --git a/src/Controller/ApiUiContentTemplateControllers.php b/src/Controller/ApiUiContentTemplateControllers.php index 85bcf22f9..3f3909582 100644 --- a/src/Controller/ApiUiContentTemplateControllers.php +++ b/src/Controller/ApiUiContentTemplateControllers.php @@ -112,11 +112,6 @@ final class ApiUiContentTemplateControllers extends ApiControllerBase { throw new BadRequestHttpException('Only components that define their inputs using JSON Schema and use fields to populate their inputs are currently supported.'); } - // @todo Add support for suggestions for code components in https://www.drupal.org/i/3503038 - if (!$source instanceof SingleDirectoryComponent) { - throw new BadRequestHttpException('Code components are not supported yet.'); - } - if ($this->entityTypeManager->getDefinition($content_entity_type_id, FALSE) === NULL) { throw new NotFoundHttpException(sprintf("The `%s` content entity type does not exist.", $content_entity_type_id)); }