Overview
Sections are pre-configured compositions of components (i.e. a tree of components with some pre-defined content). How sections are different from components is that content creators are able to de-compose them, unlike components where content creators can only interact with the properties and slots provided by the component.
Proposed resolution
For the purposes of the demo, it would be sufficient to implement this on the client side only. In other words, the UI would be storing a hard-coded list of sections, created using the demo components for the purposes of the demo. We can use hard-coded images for the purposes of the demo, before we have implemented #3462636: Preview component when selecting in left sidebar.
User interface changes
- Design
-

- Implementation

| Comment | File | Size | Author |
|---|---|---|---|
| #23 | XB-sections-client-hardcoded.gif | 603.1 KB | wim leers |
| sections-panel.png | 283.29 KB | lauriii |
Issue fork experience_builder-3463300
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
wim leersIMHO that'd be a waste of time, because those images would be more of a pain to generate than implementing #3462636-2: Preview component when selecting in left sidebar?
Comment #3
wim leersMore importantly:
I am still very worried that "a section" is ambiguously defined, #3455036 exists to clarify that (and has been open for a month now). See #3455036-13: Clarify "components" vs "elements" vs "patterns", where I explained that we need this to be documented first, so that all these UI implementation issues can refer to that to get clarifications/answers without needing to talk to you.
Comment #4
lauriii#2: I agree we should not implement a backend API for this because we know it would be replaced by the auto-generated images. This would be only in the scope of the client implementation. FWIW, I created this issue with @jessebaker and he didn't raise concerns over this approach. Maybe he can explicitly confirm if he thinks it's okay to keep both of these issues to be actionable in parallel.
#3: Can you point out what are the remaining questions in regards to sections? To me it seems that it's pretty clear what sections are in comparison to components and elements. My perception is that what's remaining in relation to sections is making sure that section as a term makes sense. If naming is all that's remaining to be clarified, I'm not sure we should make it a blocker to this.
Comment #5
wim leers#4 RE: #3: Let's continue this discussion in the issue that exists for specifically this purpose: #3455036-17: Clarify "components" vs "elements" vs "patterns".
Comment #6
wim leersAs described in #2, #3462636: Preview component when selecting in left sidebar landed, so that's one fewer blocker 👍
But … the closely related #3460952: Implement add button for top level item (section) landed already. How does that affect this issue's scope? Tagging , because AFAICT there's nothing blocking this anymore? 🤔 Assigning to front-end lead @jessebaker to get clarity on that.
Comment #8
jessebaker commentedComment #11
jessebaker commentedComment #12
balintbrewsI posted a todo list in the MR description based on my assessment of the remaining work.
Comment #13
balintbrewsFrom the list of remaining work:
I now consider this item done — or at least something that doesn't require more action in this MR. I realized that the test failure also frequently happens in
0.x, so it is not being introduced by this MR. We're better off opening a separate issue to address it. The preview thumbnails were fixed in #3471102: Unable to scroll component list by rendering them in a portal. I carried out the same change here in3471102, since this MR refactors the component where this was previously added.I also marked error handling tasks as done (and with strikethrough) after realizing that it is work all the methods could use in those files, and it doesn't make sense to just do it for the couple of new ones this MR adds. We should target them all at once at one point.
Comment #14
balintbrewsThis is now ready for a review. @jessebaker had already done all the heavy lifting, so I approved the MR, and I really would like @bnjmnm's review before we merge.
Comment #15
balintbrewsComment #16
lauriiiAssigning for @jessebaker to continue
Comment #17
wim leersThe back-end side LGTM now :)
AFAICT
is not yet addressed.
That's fine: it's a nice-to-have. Can we extract a follow-up issue for that, and have a less experienced team member take that on? 🙏
Comment #19
jessebaker commentedAll fixed! Hooray!
Follow up to address that last nice to have is created here: #3472089: Improve/Refactor replaceUUIDsAndUpdateModel() and insertMultipleNodes().
Comment #20
wim leersThanks!
Comment #21
kristen polI see the "Fake Section 2" section listed now.
Comment #22
lauriii@kristen pol I responded in #3454125-88: Implement temporary design system for the DrupalCon Barcelona demo 😊
Comment #23
wim leersA screenshot was missing.
Comment #24
wim leersTIL https://www.drupal.org/project/section_library exists thanks to a Slack discussion from June 27: https://drupal.slack.com/archives/C072JMEPUS1/p1719448219171819?thread_t...