Make Q&A upvote budget a share of the questions
The fixed number of votes per person does not fit varying question counts. The budget is now `upvote_share` percent of the questions (rounded up, at least one), so it grows with the number of questions. A migration converts existing Q&A slides (no voting stays off, others get 25 %). On the stage the voting step no longer lists the questions but points participants to their devices. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3762b880cb
commit
575fb8649d
14 files changed
+171
-76
No files matched your search
@@ -573,6 +573,9 @@ textarea { resize: vertical; }
|
||||
.qa-focus__nav:empty { display: none; }
|
||||
.qa-list--compact .qa-item { padding: 8px 12px; }
|
||||
.qa-summary { color: var(--muted); margin: 0 0 1em; }
|
||||
.qa-vote-hint { text-align: center; padding: 8vh 16px 4vh; }
|
||||
.qa-vote-hint__title { margin: 0 0 .3em; font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 800; color: var(--qa); }
|
||||
.qa-vote-hint__text { margin: 0 auto 1.2em; max-width: 30em; font-size: clamp(1.1rem, 2.6vw, 1.6rem); }
|
||||
.qa-steps { list-style: none; padding: 0; margin: 0 0 1em; display: flex; flex-wrap: wrap; gap: 6px; counter-reset: none; }
|
||||
.qa-steps__step { display: inline-block; padding: 4px 12px; border-radius: 99px; border: 1px solid var(--border); background: transparent; color: var(--muted); font: inherit; font-size: .85em; }
|
||||
button.qa-steps__step { cursor: pointer; }
|
||||
|
||||
+10
-10
@@ -1026,16 +1026,16 @@
|
||||
return el('li', { class: 'answer', text: question.text });
|
||||
})));
|
||||
} else if (results.stage === 'vote') {
|
||||
children.push(el('p', { class: 'qa-summary', text: 'Abstimmen: jede Person hat '
|
||||
+ results.maxUpvotes + (results.maxUpvotes === 1 ? ' Stimme' : ' Stimmen')
|
||||
+ (results.maxPerQuestion < results.maxUpvotes ? ' (höchstens ' + results.maxPerQuestion + ' pro Frage)' : '')
|
||||
+ ' · bisher ' + results.upvotes + ' vergeben' }));
|
||||
// No counts or ranking while voting is open (the server sends none), so the stage does not sway the vote.
|
||||
children.push(el('ul', { class: 'qa-list' }, questions.map(function (question) {
|
||||
return el('li', { class: 'qa-item' }, [
|
||||
el('span', { class: 'qa-item__text', text: question.text })
|
||||
]);
|
||||
})));
|
||||
// The questions are voted on at the participants' devices: the stage only points there
|
||||
// (no list, counts or ranking, so it can not sway the vote).
|
||||
children.push(el('div', { class: 'qa-vote-hint' }, [
|
||||
el('p', { class: 'qa-vote-hint__title', text: 'Jetzt abstimmen!' }),
|
||||
el('p', { class: 'qa-vote-hint__text', text: 'Schau auf dein Gerät und gib deine Stimmen den Fragen, die dir wichtig sind.' }),
|
||||
el('p', { class: 'qa-summary', text: questions.length + (questions.length === 1 ? ' Frage' : ' Fragen')
|
||||
+ ' · jede Person hat ' + results.maxUpvotes + (results.maxUpvotes === 1 ? ' Stimme' : ' Stimmen')
|
||||
+ (results.maxPerQuestion < results.maxUpvotes ? ' (höchstens ' + results.maxPerQuestion + ' pro Frage)' : '')
|
||||
+ ' · bisher ' + results.upvotes + ' vergeben' })
|
||||
]));
|
||||
} else if (questions.length === 0) {
|
||||
children.push(el('p', { class: 'qa-summary', text: 'Es wurden keine Fragen eingereicht.' }));
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user