Closed (fixed)
Project:
Experience Builder
Version:
0.x-dev
Component:
Documentation
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
17 Jun 2024 at 10:59 UTC
Updated:
31 Mar 2025 at 13:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
wim leersComment #3
wim leersIdeally, @lauriii's answer would reference the diagram in #3446083: Document supported component modeling approaches.
Comment #4
lauriiiI've always viewed elements as a type of component. The reason they must be separate from components is because most of the time, you'd want your content creators using components instead of elements. When that's the case, it needs to be possible to disable elements from the page builder.
I created a Figma design to show case the different concepts and their relationship:
Especially for elements, it seems that this is something you'd probably control in code instead of UI. It doesn't seem necessary to be able to control the available elements on a site level. It could be that elements is just one category.
I'm not sure what are you referring to by locking in this context? The internals of the component should not be editable when the component is being used. When the component is being used, it's only possible to modify props of the component, and insert components to the slots of the component. There could be a way to set up a component with a slot that has a default value, which allows editing the contents of the slot.
This is the current hypothesis for ideal UX. This is something we need to work to confirm with UX.
This is somewhat correct. They are indeed “copy by value” instead of “copy by reference” . However, patterns would be created using the same building blocks that are available for the content creator. This means that if elements are not available for content creator, then patterns that may only use components too. These are usually created to define pre-configured configurations of the components that look good. For example, you could have a pattern that adds 3 card components side by side, because having one card component on its own doesn't look great.
I'll craft a user story to the requirements spreadsheet. I could also file an issue with some more information.
The discussion so far has been that we'd expose fields through a single field block. This avoids the problem of creating a ton of derivatives. It's probably possible to convert the existing uses to something like that without too much disruption. I did a PoC on that last fall: #3365551-18: Add the notion of a 'configured layout builder block' to solve a number of content-editor and performance pain points.
To me, it still seems like we shouldn't have a config entity per component. I personally think that the ideal DX would allow exposing components directly from code, without requiring a step in the UI. There was some concerns around components automatically appearing in the UI and becoming available for content creators. I'm wondering if we should approach that with tagging or categories? This way builder could select either specific components, tags or categories that they want to expose for the content creators. This way you could get rid of the additional step without having arbitrary SDC appearing in the UI.
Comment #5
wim leers👍
Thanks, that's helpful!
How would you know which SDCs are "elements" vs not?
The need for opting in is something we've said in every discussion 😅
What if there's a prop that you don't want content creators to be able to modify?
WFM — I wasn't part of those discussions.
Please don't repeat that without proposing a solution. You said the same at #3444424-7: [META] Configuration management: define needed config entity types, and @catch articulated well in #3444424-8: [META] Configuration management: define needed config entity types why that can't work.
If your proposed solution is tagging/categories, then it's still the same fundamental problem: the site builder must assign a tag/category prior it to becoming available. Unless you're saying that only users with elevated permissions can access the untagged/uncategorized components. For example, when would it make sense to use
umami:disclaimer?Furthermore, it's also a requirement that dragging any component onto the canvas must immediately result in a reasonable visual preview. SDCs may offer examples for
props, but aren't required to. Some SDCs would even have nothing visible unless a default value is provided (sure, the UX work may affect this, but we can't keep waiting for that). On top of that, numerous people in the community have raised the need to configure which field type/widget (assuming the data model in #3440578: [PP-2] JSON-based data storage proposal for component-based page building) should be used when assigning a value to a prop … which is also information that an SDC does not contain.So in order to guarantee a good editing experience:
I asked @f.mazeikis to work on that because it's literally in the critical path to being able to use arbitrary SDCs in the XB PoC UI, and is hence in the critical path #3454094: Milestone 0.1.0: Experience Builder Demo. As you can see, there's many reasons for this config entity to exist.
If this config entity is something you disagree with, we urgently need more clarity on the product requirements, because I currently don't see any other way to meet the requirements — it seems that there's a conflict then. The only way around it I see is generating such a config entity automatically for every discovered SDC and:
(And then we haven't even mentioned #3454519: [META] Support component types other than SDC, block, and code components!)
Comment #6
lauriiiI would imagine in that scenario you would wrap the component with another component which sets a static value for the prop, and exposes rest of the props for the content creators. Then they would choose to only expose the wrapper component for the content creators.
Should we move the discussion to #3444424: [META] Configuration management: define needed config entity types or maybe even open a dedicated issue for this? I'd be happy to open that if you think it's a good idea.
Comment #7
wim leersRE: "I would imagine […]" — this implies the creation of a new SDC? This sounds like a complex UX.
RE: separate issue: let's continue in #3444424: [META] Configuration management: define needed config entity types 🙏 You shifted the conversation to questioning the config entity here, I just tied the concepts in the requirements to what already exists, to allow me to flesh out child issues for #3444424: [META] Configuration management: define needed config entity types 😅
The config entity question also is critical for #3446083-10: Document supported component modeling approaches.
So, please cite statements from me from both this issue and #3446083 while you respond in #3444424 to ensure that the conversation about "the config entity" is centralized in a single location 🙏
Comment #8
ctrladelI'd be interested to understand more about the motivation here. Field formatters as we know them in Drupal(ones that output html) go against the concept of components only being passed structured values that they then place in their html.
This warrants more discussion. IMO components composed of other components should definitely be able to compose their forms by passing thru props and customizing what props are available on the authoring form otherwise we end up in the same situation various Drupal approaches and Acquia Site Studio have where every usage of a component in another component requires redefining fields on the parent form so they can be mapped from the parent to the child.
Back to the main question for this issue component vs element vs pattern. +1 to @laurii's take that elements are just a type of simple component. Expanding on the similar but different concepts touched on in the issue description for how components will be created/placed on a page. I've seen 3 main types of components that authors want to place:
Comment #9
lauriiiI'm on the same page with you – conceptually they don't make a lot of sense in a component based system. The reason we'd be bringing in the field blocks is because it helps us avoid having to move all existing formatters to components. This is critical especially for sites using LB currently.
I was referring to something else in my comment. I was mainly trying to explain the key characteristic of a component which is that you can only interact with it through props and slots, unlike with patterns where you can actually start changing the internals of the pattern once you've placed it. I agree we should try to design the system so that we can avoid this problem.
I agree with the 3 main types of components you listed here. I'm referring to the reusable components as "Global blocks" in this content type breakdown. It's definitely not the best term. 😅
Me neither! I think our design team is calling them just "sections" right now since that seems to be a term that is used broadly within the industry. That's a little unfortunate given that Layout Builder is using that term for something slightly different.
Comment #10
wim leers#8:
Agreed. It's not clear to me either, the product requirements do not have sufficient detail on this front.
I see two reasons:
"Simple" is subjective though. Is that sufficient? Are you thinking of an objective measure?
+1, this is essentially the "New Year's Hero" I mentioned in #3440578-61: [PP-2] JSON-based data storage proposal for component-based page building. In that world, do "Custom Blocks" still make sense? Wouldn't most sites create reusable components instead, because they have more visual flexibility?
Blocks in general are powered by plugins which means they can have logic. So I think in that world:
block_contentplugin) become less relevant — and perhaps for UX reasons XB might want to disable them on new sitesI'm really curious about @lauriii's vision for that aspect, as well as how the UX/wireframes will be handling that.
Love that name! We could even literally make that UX visually look like blueprints, which I think would not only convey it clearly, but it'd also be a really cool experience!
#9:
\Drupal\layout_builder\Sectionappears to confirm this — essentially it's a row of components in the layout.)Comment #11
wim leers@lauriii Can you please bring more clarity to this issue and how it ties into #3459229: Allow saving component compositions as sections (frontend only)? 🙏
Comment #12
lauriiiHere's the currently proposed IA which may help get a sense of what the difference is: https://www.figma.com/board/odeJtdvynsTvUIUUpIqO8n/Proposed-component-IA.... How that connects to here is that:
Based on that, we can answer that "sections" are essentially the same as what we are calling "patterns" here.
Comment #13
wim leersWow, apparently I already wrote a month ago (July 17 today, June 18 in #10, just before I went on vacation) that "sections" is a very confusing term. I've seen it becoming adopted more and more widely, which is where my question in #11 came from.
I think "section" is being used very differently in the proposed XB IA than what most people expect. For example, see the way that Wikipedia uses it:
To make it even more confusing, #3456084: Add initial implementation of primary menu introduced the term "section templates", which AFAICT is what #12 is referring to as "sections". What is the difference? 😅
(The Figma link in #12 does not explain this.)
The goal for this issue should not be to keep it open and keep it going, but to add a
docs/end user concepts.mdfile so we can then close this issue.Comment #14
wim leersComment #15
lauriiiIt is not conceptually that different from Layout Builder; sections are parts of a page. However, what's different from Layout Builder is how users create sections. In Experience Builder, sections can be created out of components, or they can be created using section templates. Section templates are just pre-configured components that constitute a section on a page.
FWIW, the current terminology is our hypothesis on what we believe makes sense based on competitive analysis. Acquia UX is in progress of researching if the proposed terminology and categorization makes sense for our target user: #3459088: Every XB `Component` config entity should have a `category` property.
Comment #16
wim leers(This came up yesterday because @hooroomoo is working on #3460952: Implement add button for top level item (section), linking that too.)
I think #15 is saying that we cannot/should not document this yet until that UX research is complete. Conveying that.
Comment #17
wim leers#15:
Comment #18
wim leers#3463300: Implement the concept of sections within the client seems to be confirmed by @lauriii to be the way to interpret "patterns".
What's still missing then, is documentation. Is #3479643: Introduce a `Pattern` config entity sufficiently precise for us to capture that as documentation in
docs/*.md, @lauriii?Comment #19
reneelund commented@laurii Is this a part of the work that I am focused on?
Comment #20
reneelund commentedComment #21
reneelund commentedComment #22
wim leers#3459088: Every XB `Component` config entity should have a `category` property is in.
Comment #24
wim leersWe (finally) have clarity on what an "element" is: #3498419-28: Assign each Component to a logical "UI library" during normalization. It's encoded as PHP logic in
Component::computeUiLibrary().This was solved by @effulgentsia's comprehensive proposal at #3498419-20: Assign each Component to a logical "UI library" during normalization, based on conversation with @lauriii, and by me attempting to interpret, automate and allow for future evolution in #3498419-26: Assign each Component to a logical "UI library" during normalization, which @lauriii confirmed in #3498419-27: Assign each Component to a logical "UI library" during normalization.
Documentation was added in that issue.
All components (
Componentconfig entities) then, are assigned one of the following 4 "logical UI libraries":elementsextension_componentsdynamic_componentsprimary_componentsSee #3498419: Assign each Component to a logical "UI library" during normalization for details.
Sections (
Patternconfig entities) are reusable compositions of component trees. The term "section" that usability testing has surfaced has been found to be very confusing by many people now, and #3509143: Sections reuse note is incorrect / misleading already clarified at least the UI text for it, but it's quite possible it'll need to be renamed in the UI.Comment #25
wim leersDesign did not solve this, as described in #24.
Comment #26
nagwani commentedComment #27
nagwani commented