XB week 15: docs & DX

published on September 9, 2024

Monday August 19, 2024 definitely was a milestone:

  1. I had the satisfaction of being able to remove the TwoTerribleTextareasWidget that I introduced two months ago, because the Experience Builder (XB) UI now is sufficiently developed to be able to place a component and populate its props using static prop sources — by now this terrible hack was now doing more harm than good, so: good riddance! :D
  2. a huge sigh of relief was heard emanating from Ghent, Belgium because finally comprehensive docs for the XB data model were published, and ADR #2 was published to capture the initial back-end decisions, but is expected to be superseded
    (an ADR or Architecture Decision Record can be a way to unambiguously capture current choices, knowing it will be superseded).

Those docs define all XB terminology (such as “static prop sources” in that first bullet above), which enables more precise communication. Contributing to XB becomes simpler thanks to those docs 1, as does observing from a distance — with reviews to ensure accuracy & clarity from Simon “siramsay” Ramsay, Dave “longwave” Long, Ted “tedbow” Bowman, Feliksas “f.mazeikis” Mazeikis and of course, crucially, Alex “effulgentsia” Bronstein, whose proposed abstract data model it is that XB makes concrete.

While we’ll continue to iterate fast, it now is a hard requirement that every MR updates affected docs. That’s why several updates already have been committed.

Docs to come for other aspects!

For a huge DX leap forward for both those working on XB itself as well as those working on the Starshot Demo Design System (spearheaded by Kristen Pol): Felix’ MR to auto-create/update Component config entities for all discovered Single-Directory Components (SDCs) landedif they meet the minimum criteria.
For example, each SDC prop must have a title defined, because otherwise XB would be forced to expose machine names, like I mentioned at the start of last week’s update. So: XB requires SDCs to have rich enough metadata to be able to generate a good UX.
That also allowed Omkar “omkar-pd” Deshpande to remove the awkward-but-necessary-at-the-time add/edit form we’d added months ago. When installing the demo_design_system theme, you’ll see something like:

The 'components' listing, all auto-generated based on discovered SDCs meeting criteria.
The ‘components’ listing, all auto-generated based on discovered SDCs meeting criteria.
Issue #3464025, image by me.

Ted and Dave unblocked the front-end team with a new HTTP API in #3463988, to allow editing not only the static values (unstructured data) for the selected component, but also the fields (structured data) of the entity whose component tree is being edited. Evidently, without a way to retrieve that from the server, the XB UI could not possibly render that.

The preview in the XB UI has been loading component CSS/JS for a while, but thanks to Dave & Ted it now also loads the default theme’s global CSS/JS.

More accurate previews, including for example the Olivero font stack, background and footer showing up.
Issue #3468106, image by Dave.

Small(ish) but noteworthy

Week 15 was August 19–25, 2024.


  1. Yes, that’s the third time I’m linking to docs/data-model.md. It’s that important! ↩︎