Overview

Currently, the /xb-components HTTP API response returns a list of XB Components (represented by Component config entities).

Over time, the list of key-value pairs in there has grown organically. They have been documented in /openapi.yml.

But … #3475584: Add support for Blocks as Components is changing that: soon there will be multiple types of XB Components.

Proposed resolution

  1. Prepare /xb-components' controller to not hardcode an assumption on SDCs, hence paving the path for #3475584: Add support for Blocks as Components. Specifically: metadata, field_data and dynamic_prop_source_candidates may not exist for other component types. (They may need renaming but that is out of scope.
  2. Update the XB UI's client side accordingly

User interface changes

None.

Command icon 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

wim leers created an issue. See original summary.

wim leers’s picture

Assigned: Unassigned » bnjmnm
Status: Active » Needs review
wim leers’s picture

Title: Refactor XB internals to not assume /xb-components returns only SDC-powered XB Components » Refactor XB internals to not assume /xb-components HTTP API returns only SDC-powered XB Components
Issue summary: View changes
Related issues: +#3482393: HTTP API: update /xb-components to specify each `Component`'s `source`
bnjmnm’s picture

Assigned: bnjmnm » tedbow

This is kind of a weird one to approve as there's no great way to test it without literally adding support for non SDC but that is what THIS issue is blocking. Worst case this is a little incomplete but does no harm, so lets let it in to help the other issues move forward.

This still needs src signoff - I'm going to assign to @tedbow who I know is around for the next two days, but anyone in that group could take care of this.

tedbow’s picture

Status: Needs review » Reviewed & tested by the community

Yep this looks fine

  • tedbow committed 3a250546 on 0.x authored by wim leers
    Issue #3482529 by wim leers: Refactor XB internals to not assume /xb-...
tedbow’s picture

Assigned: tedbow » Unassigned
Status: Reviewed & tested by the community » Fixed
wim leers’s picture

Nice to see this landed! 🤩

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.