fix(diagram): restore embedded overlay background#2967
Conversation
🦋 Changeset detectedLatest commit: d185919 The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 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 |
b49667a to
dbc82d2
Compare
|
Thanks for the quick fix and sorry to have misblamed you !! ;) |
dbc82d2 to
52babac
Compare
52babac to
ff39b60
Compare
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughRewrites global theme and top-level body selectors into a ChangesShadow Root CSS Scoping Fix
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@Kiiv no worries. Just told the bot to identify the source of the issue so it understands better what happened. |
|
Nice! I already saw that as well after the issue was closed. Thank you for fixing! |
Summary
Fixes #2965 by scoping bundled diagram CSS variables into the
LikeC4Viewshadow root again. Expanded embedded views now render with the themed overlay background instead of inheriting transparency from the page behind them.Root cause: commit
cfe6cd11cfrom #2906 stopped rewriting:root/:hosttoken selectors for the shadow root, so embedded shadow styles were no longer rooted on.likec4-shadow-root.Visual check
--colors-likec4-overlay-bodyempty--colors-likec4-overlay-body: #fffValidation
npx -y pnpm@10.33.3 --filter @likec4/diagram test -- src/shadowroot/styles.css.spec.tsnpx -y pnpm@10.33.3 --filter @likec4/diagram typechecknpx -y pnpm@10.33.3 --filter @likec4/diagram buildNODE_ENV=production npx -y pnpm@10.33.3 turbo run pack --filter="@likec4/core" --filter="@likec4/icons" --filter="likec4" --forcenpx -y pnpm@10.33.3 --dir e2e install --no-lockfilenpx -y pnpm@10.33.3 --dir e2e exec playwright test webcomponent-overlay.spec.ts --reporter=listnpx -y pnpm@10.33.3 --dir e2e exec playwright test static-navigation.spec.ts manual-layout-views.spec.ts --reporter=listnpx -y pnpm@10.33.3 exec dprint check packages/diagram/src/shadowroot/styles.css.ts packages/diagram/src/shadowroot/styles.css.spec.ts e2e/tests/webcomponent-overlay.spec.ts e2e/playwright.config.ts e2e/.gitignoregit diff --check