Overview
Module and theme components are displayed in separate lists in the design. For this reason, the client side needs to be able to be able to distinguish:
- module-provided Components
- theme-provided Components
- JavaScript Components
- Blocks
- Elements
Proposed resolution
This could be done either by:
providing different endpoints for the different component sources- it could be a single endpoint where the components are
categorized(that's a confusing word choice, because of #3459088: Every XB `Component` config entity should have a `category` property, which is independent of this!) based on their source provider's type.
User interface changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | XB Categories.png | 71.48 KB | lauriii |
Issue fork experience_builder-3482393
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 #2
lauriiiComment #3
wim leers#3482529: Refactor XB internals to not assume /xb-components HTTP API returns only SDC-powered XB Components introduces some additional structure that will make this much clearer to land.
Comment #4
wim leersComment #6
wim leersReady! 😊
Comment #7
wim leersTrivial update for
/openapi.yml, tagging.Comment #8
wim leers#3482529: Refactor XB internals to not assume /xb-components HTTP API returns only SDC-powered XB Components landed!
Comment #9
wim leers#3475584: Add support for Blocks as Components is in, rebased.
Comment #10
lauriiiDiscussed this with @longwave and @jessebaker. We believe the
extension_typekey is too narrow and doesn't account for other needs we have for these. Essentially what we need is information on what is the source of the "component". Potential sources are: Blocks, Theme Components, Module Components, Elements, and JavaScript components. Each of these sources then have categories within itself. Here's a visualization of that:Comment #11
longwaveAs per the diagram repurposing this issue to add
source.categorywill be added in #3459088: Every XB `Component` config entity should have a `category` property which is postponed on the core issue #3474533: ComponentPluginManager must implement CategorizingPluginManagerInterfaceComment #13
longwavesourceimplementation in MR!419.Comment #14
wim leersRTBC as far as I'm concerned, with one exception:
docs/components.mdshould be updated to capture #10, and … why not embed exactly that diagram in that document while we're at it? 😇Comment #16
longwaveAdded the categories requirement and Mermaid version of #10 to
components.md.Comment #17
wim leersComment #18
wim leersNeeds approval from @traviscarden.
Comment #19
traviscarden commentedLooks good!
Comment #21
traviscarden commentedOops. You asked me to go ahead and merge. Done. 🙂