Skip to content

feat(slidev-component): standalone inline PollQr component + QR overlay e2e#49

Merged
asm0dey merged 16 commits into
mainfrom
feat/poll-qr-overlay
Jun 5, 2026
Merged

feat(slidev-component): standalone inline PollQr component + QR overlay e2e#49
asm0dey merged 16 commits into
mainfrom
feat/poll-qr-overlay

Conversation

@asm0dey

@asm0dey asm0dey commented Jun 5, 2026

Copy link
Copy Markdown
Owner

Summary

Add <PollQr slug="..." /> — a standalone, always-visible inline QR component placeable on any slide. Renders the poll's voter URL as a styled QR (rounded dots) with the URL printed underneath. No button, no overlay, no auth gate, no network — distinct from the presenter-only PollQrButton overlay toggle.

Technical changes

  • composables/qrOptions.ts — extract buildQrOptions(url), the shared rounded-dot QR config; PollQrButton.vue switched to it (behavior-preserving, dedup).
  • composables/useVoterUrl.ts — resolve voter URL purely from the deck: slide frontmatter pollServer → deck headmatter configs.pollServerwindow.location.origin, trailing slash stripped, /${slug} appended. No getConfiguredBackend/auth.
  • components/PollQr.vue — inline component, props { slug }; builds the QR on mount via useVoterUrl + buildQrOptions, re-renders on slug change. Fills container width.
  • index.ts — export PollQr.
  • test/slidev-client-stub.ts — settable $frontmatter (__setFrontmatter) for unit tests.
  • e2e (slidev-question-switch.spec.ts) — assert the presenter QR overlay hides for anonymous decks and shows an SVG + voter URL when opened.
  • Unit tests for buildQrOptions, useVoterUrl, and PollQr; README documents <PollQr>.

@sonarqubecloud

sonarqubecloud Bot commented Jun 5, 2026

Copy link
Copy Markdown

@asm0dey asm0dey merged commit dd58ca6 into main Jun 5, 2026
9 checks passed
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.

1 participant