fix(site): true conditional rendering in FrameworkCase#1223
Merged
Conversation
…workCase Replace the hidden-div workaround with Astro.slots.render() + set:html to conditionally render framework-specific content. The old approach rendered all framework variants to the DOM and hid non-matching ones, causing DOM pollution. Upstream Astro fixes (#5032, #8222) resolved the hydration script deduplication bug that previously broke this approach. https://claude.ai/code/session_018wYM6TgaaHbvBXMRx2q9VT
✅ Deploy Preview for vjs10-site ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📦 Bundle Size Report🎨 @videojs/html — no changesPresets (7)
Media (7)
Players (3)
Skins (17)
UI Components (22)
Sizes are marginal over the root entry point. ⚛️ @videojs/react — no changesPresets (7)
Media (6)
Skins (14)
UI Components (19)
Sizes are marginal over the root entry point. 🧩 @videojs/core — no changesEntries (8)
🏷️ @videojs/element — no changesEntries (2)
📦 @videojs/store — no changesEntries (3)
🔧 @videojs/utils — no changesEntries (10)
📦 @videojs/spf — no changesEntries (3)
ℹ️ How to interpretAll sizes are standalone totals (minified + brotli).
Run |
decepulis
commented
Apr 6, 2026
Collaborator
Author
decepulis
left a comment
There was a problem hiding this comment.
Claude is my hero
decepulis
added a commit
that referenced
this pull request
Apr 13, 2026
This reverts commit 55a0755.
This was referenced Apr 13, 2026
decepulis
added a commit
that referenced
this pull request
Apr 13, 2026
This reverts commit 55a0755.
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.
Summary
hidden-div workaround inFrameworkCase.astrowithAstro.slots.render()+set:htmlfor true conditional rendering<div>, nohiddenattribute, nodata-search-ignore/data-llms-ignoreattributes neededCloses #1224
Context
The original implementation always rendered all framework variants and hid non-matching ones with the
hiddenattribute. This was a workaround for an Astro bug where{shouldRender && <slot />}broke hydration for the entire page.The root cause is that Astro's
<slot />mechanism renders children (including their hydration scripts) regardless of whether the slot is actually placed in the output. When a conditional prevents the<slot />from rendering, the hydration scripts are consumed but never emitted, breaking allclient:*islands on the page.Astro.slots.render('default')sidesteps this entirely — it's only called whenshouldRenderis true, so hydration scripts are never processed for content that won't be output.Verified
/docs/framework/html/concepts/overview:Test plan
client:*components insideFrameworkCaseblocks (e.g. installation page interactive demos)https://claude.ai/code/session_018wYM6TgaaHbvBXMRx2q9VT