Repository navigation
feat: votação com pergunta e múltipla escolha - #1
Closed
cassio2703 wants to merge 1 commit into
Closed
cassio2703 wants to merge 1 commit into
cassio2703 wants to merge 1 commit into
Conversation
Um slide pode definir `poll: { question, options }` (2 a 6 opções). Com ela,
P abre a votação com a pergunta escrita: a plateia vê a lista de opções, o
telão e o passador mostram uma barra por opção, e as métricas guardam a
pergunta e os votos de cada opção. Sem `poll`, continua o 👍/👎 de sempre.
O voto passa a ser o índice da opção; "up"/"down" ainda são aceitos como 0/1.
Métricas antigas (up/down) continuam aparecendo no relatório.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RTybDNU1NDt27r8RzXc996
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.
Requested by Cássio · project thread
What changed
A slide can now define its own poll:
poll: { question, options }(2 to 6 options). When the presenter opens the poll (Por the remote) on that slide:textContent.question,optionsandcounts; the report shows the question and the result (winner in bold). Oldmetrics.jsonwithup/downstill renders.Slides without
pollkeep the current 👍/👎 behaviour unchanged.Protocol:
Pollis now{ id, open, question, options, counts };vote.choiceis the option index ("up"/"down"are still accepted as 0/1, for an audience page opened before an update); the deck'sslidemessage carries the optionalpoll. The server validates the spec (trims, drops empty, caps at 6 options / 80 chars per option / 200 chars per question) and falls back to 👍/👎 when it is invalid.Docs updated:
AGENTS.md,deck/README.md,backstage/README.md. The starter talk's "A plateia participa" slide now has a sample question.How it was tested
npm run typecheckandnpm run buildindeck/npm run typecheckandnpm testinbackstage/(16/16; new test covers custom options, out-of-range/non-integer votes, vote change, legacy"down", invalid spec falling back to 👍/👎, and the metrics report)npm run pngattached (checked by hand with Playwright instead: stage, audience page and remote with three simulated phones, plus the 👍/👎 path on another slide)protocol.ts, server-side validation and a test🤖 Generated with Claude Code
https://claude.ai/code/session_01RTybDNU1NDt27r8RzXc996