Fix render-components not loading for revealjs documents in Hub - #645
Open
EmilHvitfeldt wants to merge 2 commits into
Open
Fix render-components not loading for revealjs documents in Hub#645EmilHvitfeldt wants to merge 2 commits into
EmilHvitfeldt wants to merge 2 commits into
Conversation
ReactRenderer's customComponentsCode gate only allowed format === 'q2-debug' | 'q2-preview', so render-components: silently never loaded for revealjs presentations even though the CLI's q2-preview-spa has no such restriction. revealjs converged onto the same Q2PreviewIframe/dispatcher tree as q2-preview a while back (bd-vwp4y5ku), but this gate was never updated to match.
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
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
ReactRenderer'scustomComponentsCodegate only allowedformat === 'q2-debug' | 'q2-preview', sorender-components:custom TSX overrides silently never loaded forformat: revealjsdocuments in Hub (no error, no warning — the document just quietly fell back to built-in rendering).Q2PreviewIframe/dispatcher tree asq2-previewa while back (bd-vwp4y5ku), but this particular gate was never updated to match. The CLI'sq2-preview-spahas no equivalent gate, which is why the same fixture worked there and failed only in Hub.revealjsto the allowed formats.Test plan
extracts customComponentsCode for revealjs format) inReactRenderer.integration.test.tsx; confirmed it fails before the fix and passes after.npx vitest run --config vitest.integration.config.ts src/components/render/ReactRenderer.integration.test.tsx— 14/14 pass.npm run test:ci— full hub-client suite passes.npm run build:all— production build succeeds.local-prod): before the fix, a revealjs document's customrender-components:file never logged[Q2PreviewIframe] Loaded custom component: ...]and the DOM showed only built-in rendering; after the fix, the log fires and the custom component's output appears in the DOM as expected.