Problem/Motivation

#3535999: Render UI with both front and admin theme has been merged and this is the opportunity to test it with other islands than the contextual ones. For example: Logs panel.

It shows 2 issues:

  • The styles bleed! It breaks the main purpose of the declarative shadow DOM. For example, if we load a builder with the search form block, it is initially OK, rendered by the front theme. But after the first HTMX load, the form is rendered with the admin theme
  • The admin theme is not applied at the initial load of the display builder, only on HTMX loads.

Proposal

Let's try to render the display builder pages with admin theme and only some parts in the front theme:

  • We don't render with DeclarativeShadowDomRenderer at the panel level anymore, so we remove the entry from Drupal\display_builder\Attribute\Island
  • Instead, we target more specific part of the markup of each panel to be rendered with the front theme:
    • BuilderPanel: a call to DeclarativeShadowDomRenderer::render() for each source: the blocks and components in the shadow root, the dropzones stay with the admin theme in the slotted area
    • PreviewPanel: all the panel content
    • ComponentLibraryPanel & BlockLibraryPanel: only the preview popup
  • Move PageLayout, EntityView, EntityViewOverride and Views routes to admin theme too.
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

pdureau created an issue. See original summary.

pdureau’s picture

pdureau’s picture

Issue summary: View changes
pdureau’s picture

Issue summary: View changes
mogtofu33’s picture

pdureau’s picture

Status: Active » Needs work
Parent issue: #3561038: [Meta] Multiple fixes for beta1 »
Related issues: -#3535999: Render UI with both front and admin theme

pdureau’s picture

The main issues are fixed:

  • The styles don't bleed anymore, because we removed the placeholder from DeclarativeShadowDomRenderer. Thos placeholders were bubbling until the HTTP response rendering.
  • We can applied DSD at the initial load by adding a DeclarativeShadowDomRenderer::render() call to ProfileViewBuilder and by moving the existing call from DisplayBuilderEventsSubscriber to HtmxTrait::addOutOfBand()

So, Drupal side, we are good.

However, we have 2 JS issues to solve:

  • the link rel="stylesheet" calls are not applied in the DSD
  • the shadowroot is lost after an OOB swap ✅ a workaround has been found
pdureau’s picture

Assigned: pdureau » Unassigned

The proposal has changed: now we render the display builder with admin theme and we display builder & preview panels with front theme (and let's not forger the preview popovers in library).

It was the opportunity of cleaning and fixing a lot of thing in the DeclarativeShadowDomRenderer but it sill don't work:

  • if we render in the slotted area, we have the same bleeding issue than before
  • if we render in the shadow area, some features are not working (like sortablejs drag and drop)

A proposal:

  • We don't render with DeclarativeShadowDomRenderer at the panel level anymore, so we remove the entry from Drupal\display_builder\Attribute\Island
  • Instead, we target more specific part of the markup of each panel to be rendered with the front theme:
    • BuilderPanel: a call to DeclarativeShadowDomRenderer::render() for each source: the blocks and components in the shadow root, the dropzone in the slotted area
    • PreviewPanel: all the panel content
    • ComponentLibraryPanel: each preview popup
    • BlockLibraryPanel: each preview popup

Christian will continue the work. Careful, only PageLayout has been moved to admin theme. We need to move EntityView, EntityViewOverride and Views to admin theme too.

pdureau’s picture

Title: Follow-up: Render UI with admin theme » Render UI with admin theme
Issue tags: -display_builder-1.0.0-beta1 +display_builder-1.0.0-beta2

christian.wiedemann made their first commit to this issue’s fork.

pdureau’s picture

New commit on MR https://git.drupalcode.org/project/display_builder/-/merge_requests/183.

Rebased ✅ The pipeline is green ✅

Loaded with admin theme by default:

  • Page Layout: ✅
  • Entity View: ✅
  • Entity Overrides: ⚠️ not tested,must be OK
  • Views: ✅

Logic moved out the island plugin attributes:

  • BuilderPanel: a call to DeclarativeShadowDomRenderer::render() for each source: the blocks and components in the shadow root, the dropzones in the slotted area > ⚠️ TODO
  • PreviewPanel: all the panel content > ✅
  • ComponentLibraryPanel: each preview popup > ✅ done in ApiPreviewController
  • BlockLibraryPanel: each preview popup > ✅ done in ApiPreviewController

Remaining work:

  • ⚠️ The link rel="stylesheet" calls are applied in the DSD however, there is still a little something wrong: with UI Suite DaisyUI, most of the styles are missing; with UI Suite Bootstrap, most of them are OK but sometimes missing at the root level. Maybe we are not retrieving all the asset libraries in DeclarativeShadowDomRenderer::addThemeLibraries(), maybe there is something to do at the shadow dom level
  • ⚠️ There is still a leftover of tests in DeclarativeShadowDomRenderer::wrapInShadowDom() (div { color: red }), it can be removed.
  • ⚠️ I guess some front code can be removed once we switch to admin theme. Let's clean up! Do you want to do it in this issue or in a dedicated issue?
christian.wiedemann’s picture

Assigned: Unassigned » christian.wiedemann
pdureau’s picture

pdureau’s picture

pdureau’s picture

Just talked with Christian.

We keep the goal to render everything with backend theme, except those 3 parts in frontend theme:

  • BuilderPanel:  only the blocks and components markup (the dropzones stays in backend theme)
  • PreviewPanel: everything
  • ComponentLibraryPanel & BlockLibraryPanel: only the preview popup

And we will keep trying with declarative shadow dom, because we never trigger AJAX/HTMX events from the shadow dom:

  • BuilderPanel:  only blocks and components would be in the shadow root, inert, the interactive dropzones with HTMX triggers stays in the slotted area
  • PreviewPanel: all the panel content is in the shadow dom, no HTMX interactions expected here (it is a "read-only" panel)
  • ComponentLibraryPanel & BlockLibraryPanel: no HTMX interaction here expected in preview pop-ups

But we will replace the renderInContext mechanism from https://git.drupalcode.org/project/display_builder/-/merge_requests/183 by subrequest (inspired from the work in https://git.drupalcode.org/project/display_builder/-/merge_requests/206 ) mostly because renderInContext share caching with the main rendering task, so stuff are not properly loaded and rendered.

So, it will be a work in 2 steps:

  1. Replace the renderInContext mechanism from https://git.drupalcode.org/project/display_builder/-/merge_requests/183 by subrequest
  2. Add the logic to split the HTMX fragment from BuilderPanel response between the shadow root and the slotted area with dropzones.

We are "afraid" the result may be slow because:

  • subrequest is slower than code>renderInContext
  • some code duplication in the shadow doms, especially about the stylesheet links, and we don't know how much browsers can optimize them

But we will evaluate this after having a working proposal.

christian.wiedemann’s picture

I add the subrequest handling to an own branch and updated the shadow dom handler to support it. I used an application handler to seperate the CSS and JS for htmx updates. The display is rendered and updated correct but klicks inside the shadow dom not working anymore and i am not sure why. Probpalby something wrong with the sloted stuff. Let's discuss tommorow

pdureau’s picture

but klicks inside the shadow dom not working anymore and i am not sure why

Inside the Shadow Dom, we are OK if the markup behave like https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attri... attribute (and we are still OK if it is not):

  • Do not have click events fired when clicked on.
  • Cannot be focused and focus events cannot be fired on them.
  • Are not searchable via browser find-in-page features (none of their content is found/matched).
  • Disallow users from selecting text contained within their content — akin to using the CSS property user-select to disable text selection.
  • Cannot have otherwise-editable content edited. This includes, for example, the contents of textual fields, and text elements with contenteditable set on them.
  • Are hidden from assistive technologies as they are excluded from the accessibility tree.

It is not a bug, it is a feature :)

That's why we put the dropzones (the main interactive elements of the builder panel) in the slotted content instead of the shadow dom.

pdureau changed the visibility of the branch 3562060-follow-up-render-ui to hidden.

pdureau changed the visibility of the branch 3562060-render-frontend-sub-requests to hidden.

pdureau changed the visibility of the branch 3562060-follow-up-render-ui to active.

pdureau’s picture

Issue summary: View changes

Not very visible here because we work on a specific branch out of the current MR, but we do great progress.

However, if we need more time to finish and we can't land this in the beta3 coming soon, we can propose a very small issue to reduce the gap: #3575339: Clean leftovers of first Declarative Shadow Dom attempt

pdureau’s picture

pdureau changed the visibility of the branch 3562060-follow-up-render-ui-mariage to hidden.

pdureau changed the visibility of the branch single_dsd_builder_panel to hidden.

pdureau changed the visibility of the branch single_dsd_builder_panel to hidden.

pdureau’s picture

Some news of the current work. We work on 2 branches.

3562060-follow-up-render-ui

MR targeting 1.0.x. : https://git.drupalcode.org/project/display_builder/-/merge_requests/183

With one Declarative Shadow Dom by component or block in BuilderPanel.

Works already pretty well, but some issues:

  • Each DSD is triggering its own single sub request process, which is bad for performance when we have a lot like it is the case here
  • The UI Skins "theme" is visible around each DSD. Can we merge the body attributes into the shadow content attributes?

3562060-follow-up-render-ui-event-bubbler

MR targeting 3562060-follow-up-render-ui: https://git.drupalcode.org/issue/display_builder-3562060/-/merge_requests/2

With a single Declarative Shadow Dom and a single sub-request for all BuilderPanel. So, the 2 performance risks of the other branch are addressed, but:

  • the complexity of the JS has been increased
  • some usability bugs has been introduced (work in progress)
  • playwright tests need to be adapted

For both branches

Topics to discuss:

  • PageLayoutSource plugin can be rendered only in the "context" of the front theme, whcih is missing in DSD
  • How can we prevent the white flash before the WebComponent update?
  • Does DeclarativeShadowDomRenderer must be a render element instead of a service ?
  • Can we drop html--ds-shadow-dom.html.twig  and page--ds-shadow-dom.html.twig ? We need to project ourselves, and Drupal, in a world without ThemeManager::render()
  • we need documentation and a visual graph explaining what is happening here
  • Is #3529095: Adopt navigation module's top bar still relevant?
pdureau’s picture

Talked with Christian. Priority to #3555110: Symmetric translation for now.

pdureau’s picture

100 days later, I have rebased 1.0.x on https://git.drupalcode.org/project/display_builder/-/merge_requests/183
And https://git.drupalcode.org/project/display_builder/-/merge_requests/183 on https://git.drupalcode.org/issue/display_builder-3562060/-/merge_requests/2

And squashed both branches into a single commit each, easier to rebase

The dream would be to have best of both branches:

  • with one Declarative Shadow Dom by component or block in BuilderPanel, so we keep JS simple
  • but with a single sub-request for all BuilderPanel, so we improve performance
pdureau’s picture

Status: Needs work » Postponed

But, this is still not the priority now.

pdureau’s picture

Assigned: christian.wiedemann » pdureau
Status: Postponed » Needs work
StatusFileSize
new82.34 KB

Some news about: https://git.drupalcode.org/project/display_builder/-/merge_requests/183

The proposal with one Declarative Shadow Dom by component or block in BuilderPanel.

It works like that:
schema

Good:

  • ✅ We delegate design implementation to admin theme, it already looks very clean and it is a more predictable environement
  • ✅ The diff is cleaning our CSS (-175 LOC) without adding too much PHP (+ 150 LOC)
  • ⚠️ Each DSD is triggering its own single sub-request process, it was supposed to be bad for performance, but:
    • ✅ each node has a cost of around 1 millisecond (0.001 second) on my humble local environment in dev mode, so we need at least 150 nodes to be noticeable
    • ✅ it seems an optimization is done on Drupal side, reusing the same sub-request
  • ✅ On my local environment, the phpunit & playwright tests are green.

To investigate:

  • ❌ The UI Skins "theme" is visible around each DSD. Can we merge the body attributes into the shadow content attributes?
  • ❌ How can we prevent the white flash before the WebComponent update?
  • ⚠️ Can we drop html--ds-shadow-dom.html.twig  and page--ds-shadow-dom.html.twig ? We need to project ourselves, and Drupal, in a world without ThemeManager::render()
mogtofu33’s picture

Some help from AI to detect the problems and solution in relation to #3576683: [meta] UX refresh.

Structural limitations (not fixable — must be accepted or routed around)

  • :root / html / body selectors match nothing inside a shadow root. This is exactly the reported "UI Skin theme properties visible around each DSD element" problem. The branch works around it by re-emitting html_attributes and body attributes onto two wrapper
    s — which restores attribute-based selectors written as .foo but does not restore :root { --token: … }, html[data-bs-theme="dark"], or body.path-frontpage. Any front theme that defines its design tokens on :root (most of them, including ui_skins output) will not deliver them into the shadow tree. Custom properties inherit through the boundary, so tokens declared on an ancestor in the light DOM do reach in — which is why this partially works today and will keep partially failing in confusing ways.
  • Parent→child CSS relationships across a slot are lost. A parent component's shadow stylesheet cannot select slotted light-DOM children except via ::slotted(), which matches only direct children and cannot be compounded into descendant selectors. So .row > * { padding: … } (Bootstrap gutters), .accordion .accordion-item, .card > .card-body stop applying to nested components. Layout mostly survives — the slot is display: contents, so slotted elements still become flex/grid items of the parent — but spacing and any parent-driven utility styling drift. For a builder whose entire purpose is nesting components into slots, this is the most serious fidelity cost, and it applies to both the per-node and single-DSD variants (the single-DSD variant hoists slot content to the top-level host, so it is still light DOM relative to the component that declared the slot).
  • @media queries evaluate against the outer viewport. Shadow DOM is not a separate viewport. The ViewportSwitcher cannot produce truthful responsive output by resizing a shadow host — breakpoints will not fire. Only an iframe gives real responsive preview.
  • Everything that walks the DOM must become shadow-aware. document.querySelectorAll('[data-node-id]'), elementFromPoint() (returns the host, needs composedPath()), focus traversal, and the Playwright selectors — the upstream branch already carries a large snapshot churn for exactly this reason. axe does pierce shadow roots, so the accessibility suite should hold, but it needs re-verification.
pdureau’s picture

Thanks for the help.

:root / html / body selectors match nothing inside a shadow root.

Indeed, this is one of the already identified remaining issues.

Custom properties inherit through the boundary, so tokens declared on an ancestor in the light DOM do reach in — which is why this partially works today and will keep partially failing in confusing ways.

Interesting, I will investigate.

Parent→child CSS relationships across a slot are lost.(...) For a builder whose entire purpose is nesting components into slots, this is the most serious fidelity cost, and it applies to both the per-node and single-DSD variants (the single-DSD variant hoists slot content to the top-level host, so it is still light DOM relative to the component that declared the slot).

We are already meeting this issue outside of the current ticket scope, because of our "dropzone" markup in-between a parent component slot and its children. DSD is neither fixing nor making it worse for now, and I am hoping it can help us mitigate it.

@media queries evaluate against the outer viewport. Shadow DOM is not a separate viewport. The ViewportSwitcher cannot produce truthful responsive output by resizing a shadow host — breakpoints will not fire. Only an iframe gives real responsive preview.

We are already meeting this issue outside of the current ticket scope, see #3542003: Responsive viewports with iframes. DSD is neither fixing nor making it worse.

Everything that walks the DOM must become shadow-aware. document.querySelectorAll('[data-node-id]'), elementFromPoint() (returns the host, needs composedPath()), focus traversal, and the Playwright selectors

I don't see how it is a problem but I may be missing something. Playwright tests are green without needing adaptions.

mogtofu33’s picture

Parent issue: » #3613192: [meta] UX issues
pdureau’s picture

Rebased.

Styling boundaries

We still have the issues previously discussed.

The UI Skins "theme" is visible around each DSD.

Indeed. Can we merge the body attributes into the shadow content attributes?

:root / html / body selectors match nothing inside a shadow root.

It may be related to shadowRootMode property in DeclarativeShadowDomRenderer which is currently managed like that:

  • "open" when the request is not triggered by HTMX: Exposes the internal shadow root DOM for JavaScript (recommended for most use cases). It allows CSS variables to "pierce" the shadow DOM
  • "closed" when the request is triggered by HTMX: Hides the internal shadow root DOM from JavaScript. It prevents CSS variables to "pierce" the shadow DOM. However, we have declarative_shadow_dom.js which is opening it after load

Some ideas:

  • Do we still need a "closed" Shadow DOM for HTMX requests in server side to open it in JS after load?
  • Can we "force" :root inside each declarative shadow dom?
  • Can we set a :root as a wrapper at the top of the root panel, so variable will be initialized and will "pierce"

Custom properties inherit through the boundary, so tokens declared on an ancestor in the light DOM do reach in — which is why this partially works today and will keep partially failing in confusing ways.

It already works well with the current state of the MR:

  • I add a SDC in the slot of another SDC
  • In the parent SDC, I change the value of a design token used by the child SDC using the dedicated Panel
  • The value is updated in the child SDC even if it is sandboxed in its own Shadow DOM

DOM manipulation

Everything that walks the DOM must become shadow-aware. document.querySelectorAll('[data-node-id]'), elementFromPoint() (returns the host, needs composedPath()), focus traversal, and the Playwright selectors

It was not an issue until the big UX revamp of July, all mechanisms were working well during manual testing and the playwright tests were all green.

However, we now have playwright fails which may be related to DOM traversing:

  • Move within the Navigator
  • Move and circular guard
  • SSE relays another session edit

and some false negative (we don't manually reproduce the issue, we may just need to adapt element.dragTo(target, {):

  • Occupied slot - drops from the library:
  • Occupied slot - moving an existing node in
  • Navigator keeps Collapse all through a Canvas move
pdureau’s picture

Assigned: pdureau » Unassigned
Status: Needs work » Postponed
Issue tags: -display_builder-1.0.0-beta
mogtofu33’s picture

Issue tags: +UX
pdureau’s picture

Enthusiasm for this task has been warmly expressed during DrupalCon Rotterdam's demos & workshops 😉

So, here is the current state after a big rebase and the addition of assets/js/shadow_root_styles.js

Core needs a patch

Solution found 🎉 We were missing a Core patch!

--- a/core/misc/htmx/htmx-assets.js
+++ b/core/misc/htmx/htmx-assets.js
@@ -125,7 +125,11 @@
     });

     // The response is the whole page without the assets we handle with loadjs.
-    detail.serverResponse = responseHTML.documentElement.outerHTML;
+    // Unlike outerHTML, getHTML() keeps the declarative shadow roots that
+    // Document.parseHTMLUnsafe() attached, when they are serializable.
+    detail.serverResponse = `<html>${responseHTML.documentElement.getHTML({
+      serializableShadowRoots: true,
+    })}</html>`;

     // Helps with memory management.
     responseHTML = null;

I will create a Core issue soon.

What is already OK

General:

  • ✅ Hide .gin--navigation-top-bar which is always displayed with a breadcrumb for admin pages with Core Gin

In Builder/Scaffold:

  • ✅ Dropping components & blocks
  • ✅ Moving stuff around
  • ✅ Right-click menu and its actions: copy, paste, save as preset,
  • ✅ open contextual panel on click
  • ✅ Nodes updates from modification in ContextualForm Panel, StylesPanel...
  • Support placeholders and lazy loader (the admin theme logo was rendered instead of the front one in the site branding block) ⚠️ we need a documentation update, with a schema
  • ...

In Library panels' preview pop-ins:

  • ✅ Components
  • ✅ Blocks
  • ✅ Pattern presets

By spliting DSD in root and non-root versions:

  • ✅ Don't apply body styles on each shadow root. Some themes have opinionated styles on body element (example: DaisyUI), so only copy body styles in the root shadow dom.
  • ✅ Theme switch (as UI Skins' design systems themes) works.
  • ✅ "Custom properties inherit through the boundary, so tokens declared on an ancestor in the light DOM do reach in" still works
  • ⚠️ It was tempting to shadowrootmode="closed" for the root (it doesn't need to inherit custom properties to ancestors), but it doesn't render properly when closed, so let's keep it open;
  • ✅ To make "Render components" feature of Scaffold panel works with CSS variables defined in tree ancestors, we have also added a root DSD at the top

Tests:

  • ✅ PHPUnit is green on pipeline.
  • ✅ Playwright support "open" shadow dom: https://playwright.dev/docs/locators#locate-in-shadow-dom
  • ✅ Playwright tests on ddev are fine if:
    • all display builder test modules are activated
    • the display_builder_theme_test is the only front theme installed
    • the German language is activated.
    • navigation module is not installed

⚠️ Playwright fails in the pipeline don't happen on local environment and may be related to the absence of the Core patch.

Remaining work

  • ⚠️ Remaining fails in local playwright: scaffold.spec.ts:17:5 › Move tests @extra: it doesn't seem related to the changes
  • ⚠️ With SSE, even if the playwright test is green, the Preview panel is replaced by a timestamp integer. But I have the same issue on 1.0.x branch in my local environment, so it may not be related to the current work.
  • ⚠️ What about "Cross-origin stylesheets" ? Is it something to be careful about?

Next step?

The proposal add less than 300 lines of PHP and 100 lines of JS (tests excluded), so it is kind of tight, but we may be able to clean it a bit:

  • Remove the remains of db-block custom element?
  • Remove $htmx_route from DeclarativeShadowDomRenderer::executeSubrequest() ?
  • Remove $admin from DeclarativeShadowDomRenderer? It is always FALSE as far as I know
  • Remove DeclarativeShadowDomPageVariantSubscriber?
  • Remove html--ds-shadow-dom.html.twig and page--ds-shadow-dom.html.twig templates and their associated logic?

Christian may have an idea to have a single DSD for the full builder (the current approach has nested DSD, it is totally fine in my opinion, but challengeable if we have better idea).

pdureau changed the visibility of the branch 3562060-follow-up-render-ui-event-bubbler to hidden.

pdureau’s picture

Status: Postponed » Needs review

It works :)

3 commits in the MR:

  1. feat: #3562060 Render UI with admin theme: the proper change, but need a Core patch
  2. Without Core patch: less elegant, with one additional JS file, but don't need the Core patch
  3. Unrelated phpstan fixes

Notice for the reviewer:

  • I feel a performance boost using Declarative Shadow Dom but id didn't measure it, is it also the case for you?
  • There is 1 phpunit fails but it doesn't seem related to the current work: OverrideDisplayTabs: Canonical page lists the rendered display only: ✘ Current display is excluded from its own list. Am I wrong?
  • Is the PreviewPanel in SSE replaced by a timestamp integer? If yes, is it also the case with 1.0.x branch?

Local tests:

UI Suite
DaisyUI
UI Suite
Bootstrap
UI Suite
DSFR
Component rendering & prop updates ✅ ✅ ✅
Block rendering & settings updates ✅ ✅ ✅
Style utilities updates ✅ ✅ ✅
Design tokens updates & inhertitance ✅ ⚠️ BS5 tokens are a mess ⚠️ no tokens in DSFR
Component library preview popin ✅ ✅ ✅
Block library preview popin ✅ ✅ ✅
Patterns library preview popin ✅ ✅ ✅
UI Skins theme switch ✅ Not tested Not tested

Next steps / Follow-ups:

  • It could be interesting to combine this work with #3627705: Align the builder UI with the Default Admin theme, by removing some overrides instead of remapping them
  • As said previously, the change is not that big/complicated (around 400 additional LOC), but it can be made even simpler once we validate it works well
  • Documentation update
  • Gin in Core ("default admin") manage Light/dark theme switch. What do we need to adapt?
pdureau’s picture

Assigned: Unassigned » mogtofu33

Following our today meeting, assigned to you for review. Don't hesitate to ask questions if necessary.

For your information, I have removed the form.css content because it was the most relevant place to check unaltered admin theme rendering.

mogtofu33’s picture

Assigned: mogtofu33 » pdureau

Some fixes and cleanup, here is the compare but did not rebase 3562060-follow-up-render-ui, so perhaps including other merged fix.

pdureau’s picture

here is the compare but did not rebase 3562060-follow-up-render-ui, so perhaps including other merged fix.

Thanks for the compare, that's convenient. I will push the 3562060-follow-up-render-ui rebase to help me visualizing this.

pdureau’s picture

MR 468 review.

Feature review

UI Suite
DaisyUI
UI Suite
Bootstrap
UI Suite
DSFR
Component rendering & prop updates ✅ ✅ Not tested yet
Block rendering & settings updates ✅ ✅ Not tested yet
Style utilities updates ✅ ✅ Not tested yet
Design tokens updates & inheritance ✅ BS5 tokens are a mess No tokens in DSFR
Component library preview popin ✅ ✅ Not tested yet
Block library preview pop-in ✅ ✅ Not tested yet
Patterns library preview pop-in ✅ ✅ Not tested yet
UI Skins theme switch ✅ ✅ Not tested yet

Cool stuff:

Other feedback:

  • ✅ Entity View Overrides and Pattern Preset routes for display building are now rendered with admin theme, it was forgotten in the initial MR.
  • ⚠️ The gin toolbar is visible. In MR 183, it was hidden by hook page top

Code review

A look on the gitlab compare page:

  • ✅ More CSS Cleaning/removal (partially ported to they initial MR when it has been rebased)
  • ✅ the OverrideDisplayTabs phpunit fail (Current display is excluded from its own list) is fixed
  • ✅ Some proposed clean-ups have been done: DeclarativeShadowDomPageVariantSubscriber, db-block, $admin from DeclarativeShadowDomRenderer...
  • ✅ Removal of RenderableBuilderTrait::wrapContent()
  • ✅ Addition of a data-db-shadow-body . May be useful.
  • ✅ Simplification of ThemeHooks::stripChrome() now the builder page is not rendered in front theme anymore. However, ⚠️ do we still need _display_builder_full_page_route ?
  • ⚠️ Some hook_theme have been added in src/Hook/ThemeHooks.php instead of manipulating the registry. It is not blocking the MR, but is is sad we are back to rely on ThemeManager API while we are pushing to replace them.
  • some changes about SSE (in display_builder.twig, ApiControllerBase, ProfileViewBuilder) I am struggling to understand and evaluate
pdureau’s picture

Assigned: pdureau » mogtofu33
Status: Needs review » Reviewed & tested by the community

Hi Jean,

Thanks for the new MR which is improving the DSD proposal while removing 90 lines of PHP code.

I move the ticket to RTBC, knowing:

  • the feedback and proposals can be discussed in follow-up ticket(s):
    • Remaining cleanup opportunities: DeclarativeShadowDomRenderer::executeSubrequest(), hook_theme, _display_builder_full_page_route...
    • Gin toolbar removal?
    • Light/dark theme switch
    • The "weight" select is now visible in forms (example: field:node:article:field_test[value][sources][0][_weight])
  • there is a competing proposal under review in #3629497: Render the Canvas in an iframe on the front theme to address some execution issues in components specific JS

mogtofu33 changed the visibility of the branch 3562060-follow-up-render-ui to hidden.

  • mogtofu33 committed 62ba14b9 on 1.0.x
    task: #3562060 Render UI with admin theme
    
    By: pdureau
    By: mogtofu33
    By...
mogtofu33’s picture

Assigned: mogtofu33 » Unassigned
Status: Reviewed & tested by the community » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

pdureau’s picture

Status: Fixed » Closed (fixed)