feat(ui): Guarantee consuming-app global CSS can't distort Bible components - Shadow DOM - #348
Open
cameronapak wants to merge 1 commit into
Open
feat(ui): Guarantee consuming-app global CSS can't distort Bible components - Shadow DOM#348cameronapak wants to merge 1 commit into
cameronapak wants to merge 1 commit into
Conversation
* feat(ui)!: prototype automatic Shadow DOM isolation * docs(examples): add hostile CSS POC demo * docs(examples): clarify hostile CSS vectors * docs(ui): align shadow DOM prototype ADR * test(ui): strengthen shadow isolation proof * refactor(ui): remove shadow isolation type assertions * fix(ui): block hostile shadow host pseudo-elements * docs(ui): clarify shadow isolation trade-offs * test(ui): align shadow isolation demo conventions * docs(examples): keep hostile demo labels readable * fix(ui): use style precedence for shadow fallback stylesheet Addresses PR review feedback: the non-adoptedStyleSheets fallback rendered a bare <style> tag inside the shadow-root portal. Use React 19's <style href precedence> resource form instead so React hoists and de-duplicates the stylesheet within the shadow root rather than risking duplicate insertion. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: abharms <aharms@works24.com> Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 69841bf The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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.
This PR is in progress and will continue to be defined. This PR was created as a feature branch for https://lifechurch.atlassian.net/browse/YPE-4113.
Greptile Summary
The PR prototypes automatic Shadow DOM style isolation for
YouVersionAuthButtonand marks the resulting DOM, SSR, and ref changes as breaking.<style>fallback paths.Confidence Score: 5/5
The prototype appears safe to merge within its explicitly documented breaking and deferred scope.
The shadow boundary, stylesheet installation paths, ref forwarding, hostile-CSS coverage, and breaking changeset are internally consistent, and no unacknowledged actionable defect was established.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD App[Consumer application] --> Host[Light-DOM shadow host] Host --> Root[Open ShadowRoot] Root --> Styles[SDK stylesheet] Root --> Wrapper[Internal reset wrapper] Wrapper --> Button[YouVersionAuthButton implementation] Global[Consumer global CSS] --> Host Global -. selector boundary .-> RootReviews (1): Last reviewed commit: "feat(ui): prototype automatic Shadow DOM..." | Re-trigger Greptile
Context used: