Skip to content

Fix render-components not loading for revealjs documents in Hub - #645

Open
EmilHvitfeldt wants to merge 2 commits into
quarto-dev:mainfrom
EmilHvitfeldt:fix/render-components-revealjs-gate
Open

Fix render-components not loading for revealjs documents in Hub#645
EmilHvitfeldt wants to merge 2 commits into
quarto-dev:mainfrom
EmilHvitfeldt:fix/render-components-revealjs-gate

Conversation

@EmilHvitfeldt

Copy link
Copy Markdown

Summary

  • ReactRenderer's customComponentsCode gate only allowed format === 'q2-debug' | 'q2-preview', so render-components: custom TSX overrides silently never loaded for format: revealjs documents in Hub (no error, no warning — the document just quietly fell back to built-in rendering).
  • revealjs presentations converged onto the same Q2PreviewIframe/dispatcher tree as q2-preview a while back (bd-vwp4y5ku), but this particular gate was never updated to match. The CLI's q2-preview-spa has no equivalent gate, which is why the same fixture worked there and failed only in Hub.
  • Fix: add revealjs to the allowed formats.

Test plan

  • Added a regression test (extracts customComponentsCode for revealjs format) in ReactRenderer.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.
  • Manually verified in a running local Hub instance (local-prod): before the fix, a revealjs document's custom render-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.

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.
@posit-snyk-bot

posit-snyk-bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants