Open
Conversation
This commit introduces a configurable root element for Quasar global nodes to support proper teleportation inside isolated Shadow DOM hierarchies (e.g. Micro Frontends). - Add `getRootElement()` to dynamically resolve the configured teleport root. - Fix `document.body` hardcoded references in node appending mechanisms (nodes.js, QDialog, QTooltip, TouchRepeat, use-fullscreen). - Add robust defensive checks for `ShadowRoot` resolution on `classList` mutations in the Dark plugin and CSS variables utilities (falling back to `ShadowRoot.host`). - Inject `:host` alongside `:root` in Quasar's core Sass payload to guarantee CSS variable inheritance across Shadow DOM boundaries.
UI Tests Results 1 files 98 suites 40s ⏱️ Results for commit ba3c24f. ♻️ This comment has been updated with latest results. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
The PR fulfills these requirements:
devbranch (orv[X]branch)fix: #xxx[,#xxx], where "xxx" is the issue number)If adding a new feature, the PR's description includes:
Other information:
Config Root Element (
config.root)This PR introduces the
config.rootproperty to the Quasar plugin configuration allowing developers to customize the DOM attachment point (defaulting todocument.body) for Quasar teleported components (QDialog,QMenu,QSelect,QTooltip, etc).Why is this needed?
The primary driver for this feature is robust support for Micro Front-ends / Web Components encapsulated in Shadow DOM. Prior to this change, teleporting overlays to
document.bodyaggressively broke component CSS encapsulation since the appended overlay fell outside the Shadow Root, losing access to local CSS Variables and Quasar styles loaded within the custom element instance.By passing the custom element's
shadowRootviaconfig.root, the overlays seamlessly remain inside the boundaries of the Web Component.Content of the PR
config.rootattachment logic across Quasar global components and utilities.Root Elementsection within the documentation explaining typical and Web Component usages.