Closed (fixed)
Project:
Experience Builder
Version:
0.x-dev
Component:
Page builder
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
6 Jan 2025 at 14:53 UTC
Updated:
14 Feb 2025 at 10:54 UTC
Jump to comment: Most recent, Most recent file


Comments
Comment #2
balintbrewsWe'll need a UI component (or set of components) to display the name of the currently focused region in the top bar, and allow exiting from focus via clicking it. This will need to be coordinated with the work in #3489106: Show page information in top bar.
Comment #3
wim leersOnce #3497747: Global regions containing only "dynamically missing blocks" (due to emptiness or access) cause malformed pages is fixed, this issue will probably have to trigger the use of
\Drupal\Core\Plugin\PreviewAwarePluginInterface— because some blocks only render at all in specific contexts — for example: the messages block is only visible at all when there's actual messages.See
\Drupal\layout_builder\EventSubscriber\BlockComponentRenderArray::onBuildRender()(see also how that uses\Drupal\Core\Render\PreviewFallbackInterface), introduced in #3027653: Allow block and layout plugins to determine if they are being previewed and CR at https://www.drupal.org/node/3272267. Note that this will also require core changes, because not all crucial block plugins implement that interface, which is why #3137995: Can't manage Status Messages block in Layout Builder still exists.This also relates to #3491701: [later phase] ApiLayoutController must use the previewed route's controller, and override canonical content entity routes' received entity object, because without that, the preview will not be accurate. Hopefully we can do that at a later time, though.
Comment #4
balintbrewsWim, this is all extremely valuable to be aware of, thank you! I wonder, though, if we could keep this issue smaller and only focus on the UX and UI aspects of focusing the regions. We have all the pieces in place to make that happen in a smaller scope — in favor of progress. What do you think?
Also, what are we missing in terms of design? I linked to the relevant part of the Figma project, and also added a screenshot.
Comment #5
wim leersOkay, I'll extract #3 into a separate issue.
The designs do not provide answers for the highly dynamic
Block-sourcedComponents: it assumes all component instances in the panel are always visible. That's not true for many Block plugins:But I'm fine with this issue focusing on that tighter scope.
Comment #6
balintbrewsOkay, that definitely does need design in the follow-up issue. 🙂 Thanks for agreeing to that.
Comment #7
wim leersI would argue though that one thing is missing from the design: the ability to view and edit the
PageTemplatein the context of a particular route. That's what #3491701: [later phase] ApiLayoutController must use the previewed route's controller, and override canonical content entity routes' received entity object is about.Comment #8
wim leers… but let's be pragmatic and do only what the design currently covers.
Comment #9
wim leersFollow-up for #3 created as requested in #4: #3497990: [later phase] Support Block's PreviewAwarePluginInterface (and similar for other component sources).
Comment #10
wim leersPer #2, this is blocked on #3489106: Show page information in top bar, right @balintbrews?
Comment #11
balintbrewsIt's not blocked, but at one point some coordination may be required. 😊
Comment #13
wim leersWould this issue benefit from automated tests, or would that be disproportionately complex and would this benefit from (documented) manual testing instead?
Comment #14
balintbrewsComment #15
wim leersFYI: this blocks #3499364: Implement HTML comment annotations for Regions, replace HTML wrappers.
Comment #17
effulgentsia commentedUp until now, the XB team has been following a pseudo-scrum/pseudo-kanban process, but we're now shifting into more conventional scrum. We started a new 2-week sprint last Thursday (Jan 16). I'm tagging our current sprint's issues for visibility.
Comment #18
wim leersThis is well on its way, but not yet ready for review. The demo I saw @jessebaker do in private is 🤩, and a demo of the end result should definitely be made available here too! 😄
Comment #19
larowlanIn my manual testing the highlight is slightly off for the header
Also it doesn't look like form state values are getting emptied when the component is changed
You can see here form state for two different components, not just the selected one
Comment #20
larowlan#3501870: Block form state not cleared when component is changed adds test coverage for the form state slice and confirms the clearing of component values is working in HEAD
Comment #22
lauriiiTested this manually and noticed few things:
Comment #23
jessebaker commentedRE: #22
1. Resolved. I've also made it so that double clicking the focused region in the layers will take you back out again so you don't have to move your mouse all the way up to the top nav to move between regions.
2. Looks like the Page nav got merged in after this was ready for review. I've correctly reconciled that - and fixed the size of the Page drop down to match Figma while I was here!
3. The margin/size of the region is taken into account. The issue you are showing in your screenshot is that the breadcrumb block has CSS with negative margins to make it appear outside of the region it is rendered in. I'm not sure I can think of a solution for that?
Comment #24
jessebaker commentedComment #26
hooroomooI just pushed a one line css commit for the cursor.
Before:

After:

Comment #27
lauriii#9 is still unaddressed.
With #22.1, I was referring to this flow where you should be able to hover over a region in the preview and access the focus mode from there:
. It seems that there's already a lot being changed here, so we could potentially move this to a follow-up issue.
Comment #28
jessebaker commentedI'm going to merge this and then create follow ups to address the outstanding issues. The MR is too unwieldy to keep alive due to the size of it! Watch this space for new issues.
Comment #30
jessebaker commentedMerged. 🎉
Follow ups created:
Comment #31
wim leers#30: which of those belong in #3455753: Milestone 0.2.0: Early preview and which are must/should/nice-to-have?
Finally: could you please upload a screencast showcasing this awesomeness so I can blog about it? 🤓🙏
Comment #32
jessebaker commentedComment #33
jessebaker commentedI have ranked the follow ups and added them to #3455753: Milestone 0.2.0: Early preview to be tracked and added a gif of the new functionality to the summary.
Comment #34
effulgentsia commentedComment #35
wim leers🤩