Closed (fixed)
Project:
Experience Builder
Version:
1.x-dev
Component:
Internal HTTP API
Priority:
Major
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
4 Mar 2025 at 10:17 UTC
Updated:
28 Aug 2025 at 14:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #4
acbramley commentedI would say this isn't so Novice, the tests are quite complicated. I had to:
1. Swap to standard profile
2. Modify cache tags in existing tests to match
3. Enable some new modules
4. Port over helper functions
Locally these tests are throwing a bunch of warnings but I'm testing out the ddev XB setup so it might be related to that.
Comment #5
acbramley commentedNot too sure what's causing those unrelated test failures!
Comment #6
wim leersComment #7
wim leersHm … me neither, but this seems like yet another case of https://www.drupal.org/project/gitlab_templates being wrong and running contrib module's test suites differently for non-maintainer-pushed commits than for maintainer-pushed commits 😬 (I wish I was kidding!)
Also: you're right, I misjudged, this is not a trivial move. 🙈 Thanks for removing the tag.
But … this issue is novice-like in the sense that you were able to do this without deep XB knowledge! 😄 What do you think would be a more appropriate tag? 😊
Comment #8
wim leersRepurposing per #3530907-7: Optimize DynamicPropSource candidate suggestion logic: improves performance of /xb/api/v0/config/component by 80%.
Comment #9
wim leersSuggested API route:
So:
/xb/api/v0/info/candidate_dynamic_prop_sources/entity:node:articleetc.Comment #10
larowlanRemoval happened to unblock #3532130: `/xb/api/v0/config/component` crashes when `article` node type does not exist due to hardcoded assumption in `GeneratedFieldExplicitInputUxComponentSourceBase::getClientSideInfo()`, this is now purely about adding an API
New title
Comment #11
wim leersPerfect, thanks!
This will be a blocker for the Content Templates UI: #3455629: [PP-1] [META] 7. Content Templates — aka "default layouts" — affects the tree+props data model.
Comment #12
wim leersComment #14
isholgueras commentedComment #15
isholgueras commentedRebase done and tests moved fixed, but a
$this->drupalLogout()from a previous tests is failing because Mink can't find "op" button.https://git.drupalcode.org/project/experience_builder/-/jobs/5801240#L976
After inspecting the HTML right there, the user is logged in and there is a link for logout.
I also added a
$this->drupalLogin($this->httpApiUser)and it also fails.Comment #16
isholgueras commentedComment #18
isholgueras commentedComment #22
isholgueras commentedAfter talking to @wim, I've realized that #10 is adding a new task, so it's not ready.
The current MR1379 is only moving the test
Comment #23
wim leersMR 1379 doesn't address the full issue scope, but I understand how that came to be.
That doesn't mean MR 1379 is wrong — we still need it, but it's only the original side of the coin, since #10 the coin gained another sight (metaphor falling apart — it's been a long day 😅.
Comment #24
wim leersComment #25
wim leersComment #27
wim leersHaving worked on many of the pieces powering
FieldForComponentSuggesterand the historical creation (#3455975: HTTP API: update /xb-component/{component_id} to list possible prop sources for current entity context) of the test we're refactoring away here, it seemed only reasonable that it was up to me to perform the git+d.o archeology work to bring clarity to the rationale behind what is being tested, and clean it up.It can be improved further, but it is now sufficiently clear and commented for others to be able to iterate on it further. Merged @isholgueras' MR with my refinements. 👍
Next up: what this issue was rescoped to in #10. I'll get an outline of an MR going.
Comment #29
wim leersPushed up a rough outline: https://git.drupalcode.org/issue/experience_builder-3510896/-/commit/bca....
We'll need to tackle #3523446: Rename `FieldForComponentSuggester` to `PropSourceSuggester` and #3503038: Enable candidate `DynamicPropSource` suggestions for code components: refactor `GeneratedFieldExplicitInputUxComponentSourceBase` and `FieldForComponentSuggester` to need only SDC's ComponentMetadata, not SDC plugin instances too, but there's no need to get blocked on that — it's better to get something rough going to unblock #3518248: [PP-1] Content templates, part 4 (boss battle): create a UI for editing templates :)
Comment #31
wim leers🏓 Initial review posted :)
Comment #32
isholgueras commentedComment #33
wim leersThis needs input from #3518248: [PP-1] Content templates, part 4 (boss battle): create a UI for editing templates and especially #3538861: Spike: UI for content templates, to determine what the ideal API response shape would be for the client side.
Comment #34
lauriiiContent Templates is still a priority for stable, but we're tracking it separately.
Comment #35
wim leersAlmost there: https://git.drupalcode.org/project/experience_builder/-/merge_requests/1... — please confirm, @hooroomoo.
Comment #36
tedbowChanging parent to content template UI
Comment #38
wim leersPerfect, I have everything I need now to finish this up :)
Comment #39
wim leersI won’t have time to finish this MR today — there’s still a bunch of loose ends to clean up, but it works.
@hooroomoo, please test, and confirm that this is what you want/need! 🙏 😇
You'll get something like:

Comment #40
wim leersThanks to @hooroomoo's test of this together with their PoC, I can now land this with confidence 🥳
Out of scope:
is an example value. Which makes no sense, because it should be something like
But … this is using the
ClientErrorResponsealready in HEAD, which clearly is wrong for many (not all, but many) routes 😅 It's somewhat right for validation errors for data sent in various API request bodies, but it's wrong for (most?) other cases.Created #3541366: OpenAPI spec's `ClientErrorResponse` and `AuthenticationErrorResponse` are incorrect for most API routes for this.
Comment #41
wim leersThe very last obstacle is supremely silly:
… but that all is there and it DOES comply! 🙃
Just removing the comment, don't want this to be held up by that — created supported request upstream: #3541384: False `Drupal.Commenting.DocCommentStar.StarMissing` report?.
Comment #43
wim leers