Overview

This module currently implements #3440578: [PP-2] JSON-based data storage proposal for component-based page building as proposed by @effulgentsia. This is achieved using:

  1. src/PropExpressions, to consistently refer to SDC component props and Drupal field types' props
  2. src/PropSource, to consistently describe how an SDC component prop source should be populated (and hence it uses src/PropExpressions), and allows evaluating those sources to retrieve the actual values to be passed as SDC component props
  3. src/Plugin/DataType/ComponentPropsValues stores src/PropSources
  4. src/Plugin/FieldType/ComponentTreeItem, which is "the XB field type", and it uses src/Plugin/DataType/{ComponentPropsValues,ComponentTreeStructure,ComponentTreeHydrated}

A diagram describing this was added in #3454677: Diagram tying the product requirements + decisions together and can be viewed at https://git.drupalcode.org/project/experience_builder/-/blob/0.x/docs/di...

Out of scope for this: src/SdcPropJsonSchemaType and src/SdcPropToFieldTypePropMatcher — up to #3450496: Clarify the "shape matching" bits: namespaces, `CODEOWNERS` and as issue queue component to first bring more clarity there, and ideally also document it as part of that issue.

Proposed resolution

  1. ✅ Describe the current data model in some detail, in a new docs/*.md file, with each of the above concepts explained: their purpose, the rationale behind them, and at a high level what parts of their intended scope already exist today vs still need to be created.
  2. ✅ Capture the current data model as an ADR (see #3454669: Record Architecture Decisions — to scale to many people + many timezones), knowing full well that it could still change based on what we learn while working on this, as well as the ongoing discussion over at #3440578: [PP-2] JSON-based data storage proposal for component-based page building. The ADR should be able to refer back to the docs written in the first step.

… because until those two documents exist, it's going to remain very difficult for people to join building Experience Builder, as well as for people to provide constructive criticism.

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

Now that #3461499: Support complex SDC prop shapes: introduce (Storable)PropShape to compute field type storage settings is in, doing this is even more important.

And now that #3460856: Create validation constraint for ComponentTreeStructure is in, I can do this with more detail, and with more confidence.

wim leers’s picture

Assigned: wim leers » Unassigned
Issue summary: View changes
Status: Active » Needs review
Related issues: +#3454094: Milestone 0.1.0: Experience Builder Demo

ADR draft is ready.

Docs next.

I'm assuming this data model will remain largely unchanged between today and DrupalCon Barcelona (in ~1.5 month). For Barcelona, we'll tag 0.1.0, per #3454094: Milestone 0.1.0: Experience Builder Demo.

wim leers’s picture

Didn't push this forward today, but #3450308: Create an Open API spec for the current mock HTTP responses instead. Which also is documentation-related 👍

siramsay’s picture

I just added the comment above, unsure why my GitLab profile doesn't match up with this one. Saving this comment fixed that.

Anyhow, I read/reviewed it and I understand it clearly. A few capitalizations missing at the beginning of list items, but unsure how strict you are on that.

wim leers’s picture

Assigned: Unassigned » wim leers
Status: Needs review » Needs work

Related: #3450308: Create an Open API spec for the current mock HTTP responses landed. That helps with understanding the big picture, but then the client-server communication part. This issue is solely concerned with server aspects.

@siramsay Thanks for the review! 😄

wim leers’s picture

Assigned: wim leers » Unassigned
Issue summary: View changes
Status: Needs work » Needs review

Redy for review!

wim leers’s picture

Assigned: Unassigned » effulgentsia

Addressed all of @longwave's feedback.

Would like to get @effulgentsia and @f.mazeikis to sign off on this too. It's the EOD for @f.mazeikis. So assigning to @effulgentsia. @effulgentsia, please assign to @f.mazeikis after you've reviewed it 😊

effulgentsia’s picture

Assigned: effulgentsia » f.mazeikis

I think this all looks great at capturing the current state of things. There's a few unresolved threads from @longwave, but I think those are proposing changes that can be discussed/explored in separate issues and I don't think should hold up merging these docs in.

Passing the review baton to @f.mazeikis :)

wim leers’s picture

#11: huh, I did respond to everything an hour after he posted that, but GitLab didn't show those to me! 🤪 Addressed all things I missed last night 😊👍

Off to @f.mazeikis now!

P.S.: it'd be great to get @tedbow to chime in too, but he's out the rest of the week. I think it'd be better to land this sooner rather than later. I'll be out in a few hours too. Please land this even in my absence. We'll keep evolving the docs/data-model.md doc (for example when #3468269: `ComponentTreeStructure` data type: simplify the stored structure lands), but having this first ADR captures our intent for everyone to find in a compact representation.

f.mazeikis’s picture

Assigned: f.mazeikis » tedbow

Reviewed, re-read and approved. Nice amount of details in there, the Terminology section alone is worth it's weight in gold. I see @wim-leers is already responding to @longwave threads, so we just need @tedbow to have a look.

tedbow made their first commit to this issue’s fork.

tedbow’s picture

Assigned: tedbow » Unassigned
Status: Needs review » Reviewed & tested by the community

This looks good. I accepted my own suggestion in the MR

wim leers’s picture

With:

  • +1 from @effulgentsia in #11, whose abstract proposal was implemented over the past few months, and documented here
  • +1 from @f.mazeikis in #14, who has helped achieve this implementation
  • +1 from @tedbow in #16, who has helped achieve this implementation
  • many questions from @longwave answered, where in private he wrote so far it has largely made sense, just trying to wrap my brain around the implementation section :) — which I won't take as agreement/+1, but "yes, this documentation has helped me make sense of why things are the way they currently are", which is the purpose of this issue

I've already opened several follow-ups based on @longwave's feedback (#3468269 + #3468272), and I'm sure that when he gets more involved over time, that he'll make implementation changes which we'll then update these docs for 😊

  • Wim Leers committed 5c9122cd on 0.x
    Issue #3461490 by Wim Leers, tedbow, siramsay, longwave, effulgentsia, f...
wim leers’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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