Show only the status above the question on stage
CI / Deploy / test (push) Successful in 52s
CI / Deploy / deploy (push) Skipped

The slide type above the question told the room nothing useful. The line
now shows only a status (quiz phase, Q&A stage, solution, voting closed,
pause) and is hidden otherwise. typeLabel is dropped from the state JSON.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Opus 5.5 committed 2026-11-09 15:01:07 +01:00
1 parent c6567b5e28
commit 7b97ad0fca
5 files changed
+13 -11

No files matched your search

-1
View File
@@ -365,7 +365,6 @@ class PollStateService
return [ return [
'id' => $slide->id, 'id' => $slide->id,
'type' => $slide->type, 'type' => $slide->type,
'typeLabel' => $slide->typeLabel(),
'question' => $slide->question, 'question' => $slide->question,
'description' => (string)$slide->description, 'description' => (string)$slide->description,
'isVotingOpen' => $slide->isVotingOpen(), 'isVotingOpen' => $slide->isVotingOpen(),
+1 -1
View File
@@ -34,7 +34,7 @@ $host = preg_replace('#^https?://#', '', $joinBaseUrl);
</header> </header>
<main class="stage__main"> <main class="stage__main">
<p class="stage__type" data-type></p> <p class="stage__status" data-status></p>
<h1 class="stage__question" data-question><?= __('Lade …') ?></h1> <h1 class="stage__question" data-question><?= __('Lade …') ?></h1>
<p class="stage__description" data-description></p> <p class="stage__description" data-description></p>
<div class="stage__media" data-media hidden></div> <div class="stage__media" data-media hidden></div>
+1 -1
View File
@@ -38,7 +38,7 @@ $host = preg_replace('#^https?://#', '', $joinBaseUrl);
</header> </header>
<main class="stage__main"> <main class="stage__main">
<p class="stage__type" data-type></p> <p class="stage__status" data-status></p>
<h1 class="stage__question" data-question><?= h($slide->question) ?></h1> <h1 class="stage__question" data-question><?= h($slide->question) ?></h1>
<p class="stage__description" data-description></p> <p class="stage__description" data-description></p>
<div class="stage__media" data-media hidden></div> <div class="stage__media" data-media hidden></div>
+3 -2
View File
@@ -584,7 +584,9 @@ body.present {
.stage__qr { border: 0; padding: 4px; background: #fff; border-radius: 8px; cursor: zoom-in; } .stage__qr { border: 0; padding: 4px; background: #fff; border-radius: 8px; cursor: zoom-in; }
.stage__qr img { display: block; width: 72px; height: 72px; } .stage__qr img { display: block; width: 72px; height: 72px; }
.stage__main { display: flex; flex-direction: column; justify-content: center; min-height: 0; overflow: auto; padding: 2vh 0; } .stage__main { display: flex; flex-direction: column; justify-content: center; min-height: 0; overflow: auto; padding: 2vh 0; }
.stage__type { text-transform: uppercase; letter-spacing: .12em; color: var(--c1); font-weight: 700; margin: 0 0 .6em; } .stage__status { text-transform: uppercase; letter-spacing: .12em; color: var(--c1); font-weight: 700; margin: 0 0 .6em; }
.stage__status:empty { display: none; }
.stage--closed .stage__status { color: var(--muted); }
.stage__question { font-size: clamp(2rem, 4.5vw, 4rem); margin-bottom: .3em; } .stage__question { font-size: clamp(2rem, 4.5vw, 4rem); margin-bottom: .3em; }
.stage__description { font-size: clamp(1.1rem, 2vw, 1.6rem); color: var(--muted); white-space: pre-line; margin-top: 0; } .stage__description { font-size: clamp(1.1rem, 2vw, 1.6rem); color: var(--muted); white-space: pre-line; margin-top: 0; }
.stage__media { width: min(100%, calc(62vh * 16 / 9)); margin: 1vh auto 0; } .stage__media { width: min(100%, calc(62vh * 16 / 9)); margin: 1vh auto 0; }
@@ -592,7 +594,6 @@ body.present {
.stage--video .stage__description { font-size: clamp(1rem, 1.6vw, 1.3rem); } .stage--video .stage__description { font-size: clamp(1rem, 1.6vw, 1.3rem); }
.stage--content .stage__description { color: var(--text); font-size: clamp(1.3rem, 2.6vw, 2.2rem); } .stage--content .stage__description { color: var(--text); font-size: clamp(1.3rem, 2.6vw, 2.2rem); }
.stage__results { font-size: clamp(1rem, 1.8vw, 1.5rem); margin-top: 2vh; } .stage__results { font-size: clamp(1rem, 1.8vw, 1.5rem); margin-top: 2vh; }
.stage--closed .stage__type::after { content: " · Abstimmung geschlossen"; color: var(--muted); }
.stage .bar__track { height: 1.1em; } .stage .bar__track { height: 1.1em; }
.stage .columns { height: 22vh; } .stage .columns { height: 22vh; }
.stage .average { padding: 1vh 2vw; gap: 1vh 3vw; margin-bottom: 1.5vh; background: rgba(var(--tint), .06); } .stage .average { padding: 1vh 2vw; gap: 1vh 3vw; margin-bottom: 1.5vh; background: rgba(var(--tint), .06); }
+8 -6
View File
@@ -1066,7 +1066,7 @@
} }
if (!slide) { if (!slide) {
q('[data-type]').textContent = state.poll.isPaused ? 'Pause' : ''; q('[data-status]').textContent = state.poll.isPaused ? 'Pause' : '';
q('[data-question]').textContent = state.count === 0 q('[data-question]').textContent = state.count === 0
? 'Noch keine Folien angelegt' ? 'Noch keine Folien angelegt'
: state.poll.title; : state.poll.title;
@@ -1086,16 +1086,18 @@
var quizPhase = slide.type === 'quiz' && state.results ? state.results.phase : null; var quizPhase = slide.type === 'quiz' && state.results ? state.results.phase : null;
var qaStage = slide.type === 'qa' && state.results ? state.results.stage : null; var qaStage = slide.type === 'qa' && state.results ? state.results.stage : null;
var orderRevealed = slide.type === 'order' && state.results ? state.results.revealed : null; var orderRevealed = slide.type === 'order' && state.results ? state.results.revealed : null;
q('[data-type]').textContent = quizPhase var closed = slide.isInteractive && !slide.isVotingOpen && !quizPhase && !qaStage && !orderRevealed;
? slide.typeLabel + ' · ' + { ready: 'bereit', running: 'läuft', finished: 'Auflösung' }[quizPhase] // Status line above the question: only what the room needs to know, not the slide type.
: (qaStage ? slide.typeLabel + ' · ' + Qa.labels[qaStage] q('[data-status]').textContent = quizPhase
: (orderRevealed ? slide.typeLabel + ' · Auflösung' : slide.typeLabel)); ? { ready: 'Bereit', running: 'Läuft', finished: 'Auflösung' }[quizPhase]
: (qaStage ? Qa.labels[qaStage]
: (orderRevealed ? 'Auflösung' : (closed ? 'Abstimmung geschlossen' : '')));
q('[data-question]').textContent = slide.question; q('[data-question]').textContent = slide.question;
q('[data-description]').textContent = slide.description; q('[data-description]').textContent = slide.description;
root.classList.toggle('stage--content', !slide.isInteractive); root.classList.toggle('stage--content', !slide.isInteractive);
root.classList.toggle('stage--video', slide.type === 'youtube'); root.classList.toggle('stage--video', slide.type === 'youtube');
renderMedia(slide); renderMedia(slide);
root.classList.toggle('stage--closed', slide.isInteractive && !slide.isVotingOpen && !quizPhase && !qaStage && !orderRevealed); root.classList.toggle('stage--closed', closed);
root.classList.toggle('stage--qa', !!qaStage); root.classList.toggle('stage--qa', !!qaStage);
var voting = q('[data-voting]'); var voting = q('[data-voting]');