Overview
Following the logic from https://www.drupal.org/node/2997122
Proposed resolution
Move all methods from SdcController and create separate invokable method.
Similar to these
Drupal\experience_builder\Controller\ExperienceBuilderController: {}
Drupal\experience_builder\Controller\ComponentStatusController: {}
(added in #3469684: Surface the REASON for an SDC not being made available in XB (i.e. not meeting criteria) and #3469856: The component preview should have a background: include theme's global asset libraries for component preview, in those MRs you can see what it took to take an existing controller and make it use this pattern).
⚠️ With two exceptions! #3452581: [META] XB Permissions identified that there are two unused routes. Those of coursedon't need to be lifted, they can just be removed. They are the routes with the paths /xb-render-component/{component_id} and /xb-component/{component_id}.
User interface changes
None
Issue fork experience_builder-3477164
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
wim leers👍
(Added some extra context to the issue summary.)
Comment #4
wim leers+1
Just one last nit, then this first MR can land. I retitled the MR to convey that it's only addressing a subset of the scope.
Comment #5
wim leers#3452581: [META] XB Permissions identified that there are two unused routes. Those of coursedon't need to be lifted, they can just be removed. They are the routes with the paths
/xb-render-component/{component_id}and/xb-component/{component_id}.So the next MR on this issue should just remove those 2 routes.
Comment #8
traviscarden commentedI think this was only waiting on my weigh-in. Approved. 🙂 I don't know who should merge it.
Comment #10
wim leersThanks, @traviscarden! Merged https://git.drupalcode.org/project/experience_builder/-/merge_requests/342, now back to for the remaining MRs that are needed.
Comment #11
wim leersComment #13
deepakkm commentedMR !343 is now ready for review.
Comment #15
wim leersSome tiny nits, then this will be done! 😄
Comment #16
wim leersI'd have landed this first, but it wasn't ready. #3455942: HTTP API: update /xb-components to use Component config entity's default values has landed now, so this will need to be rebased.
Comment #17
deepakkm commentedComment #18
deepakkm commentedComment #19
wim leersThis MR is failing tests. Hence it's not ready for review.
Turns out
0.xCI pipelines are failing too, due to disruptive upstream changes in Drupal core. Created issue to get0.xpassing tests again, after which this will be able to land: #3478720: [upstream] Test expectations must be updated to match Drupal 10.4.0/11.1.0 changed behavior of (Dynamic) Page Cache response headers.Comment #20
wim leers#3478720: [upstream] Test expectations must be updated to match Drupal 10.4.0/11.1.0 changed behavior of (Dynamic) Page Cache response headers landed.
Running this CI pipeline again, should now be green…
Comment #22
wim leersSo much cleaner and clearer! 🥳