From 7b97ad0fca44afdd6419a50436de680f66973d06 Mon Sep 17 00:00:00 2001 From: Patrick Niebeling Date: Mon, 9 Nov 2026 15:01:07 +0100 Subject: [PATCH] Show only the status above the question on stage 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 --- src/Service/PollStateService.php | 1 - templates/Admin/present.php | 2 +- templates/Embed/view.php | 2 +- webroot/css/plenario.css | 5 +++-- webroot/js/plenario.js | 14 ++++++++------ 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/Service/PollStateService.php b/src/Service/PollStateService.php index 94ccea9..bc0d877 100644 --- a/src/Service/PollStateService.php +++ b/src/Service/PollStateService.php @@ -365,7 +365,6 @@ class PollStateService return [ 'id' => $slide->id, 'type' => $slide->type, - 'typeLabel' => $slide->typeLabel(), 'question' => $slide->question, 'description' => (string)$slide->description, 'isVotingOpen' => $slide->isVotingOpen(), diff --git a/templates/Admin/present.php b/templates/Admin/present.php index 9ec9e2a..b4a85c5 100644 --- a/templates/Admin/present.php +++ b/templates/Admin/present.php @@ -34,7 +34,7 @@ $host = preg_replace('#^https?://#', '', $joinBaseUrl);
-

+

diff --git a/templates/Embed/view.php b/templates/Embed/view.php index 385a430..b835756 100644 --- a/templates/Embed/view.php +++ b/templates/Embed/view.php @@ -38,7 +38,7 @@ $host = preg_replace('#^https?://#', '', $joinBaseUrl);
-

+

question) ?>

diff --git a/webroot/css/plenario.css b/webroot/css/plenario.css index b5582ad..0128c4d 100644 --- a/webroot/css/plenario.css +++ b/webroot/css/plenario.css @@ -584,7 +584,9 @@ body.present { .stage__qr { border: 0; padding: 4px; background: #fff; border-radius: 8px; cursor: zoom-in; } .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__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__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; } @@ -592,7 +594,6 @@ body.present { .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__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 .columns { height: 22vh; } .stage .average { padding: 1vh 2vw; gap: 1vh 3vw; margin-bottom: 1.5vh; background: rgba(var(--tint), .06); } diff --git a/webroot/js/plenario.js b/webroot/js/plenario.js index a8f55ee..652058d 100644 --- a/webroot/js/plenario.js +++ b/webroot/js/plenario.js @@ -1066,7 +1066,7 @@ } 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 ? 'Noch keine Folien angelegt' : state.poll.title; @@ -1086,16 +1086,18 @@ var quizPhase = slide.type === 'quiz' && state.results ? state.results.phase : null; var qaStage = slide.type === 'qa' && state.results ? state.results.stage : null; var orderRevealed = slide.type === 'order' && state.results ? state.results.revealed : null; - q('[data-type]').textContent = quizPhase - ? slide.typeLabel + ' · ' + { ready: 'bereit', running: 'läuft', finished: 'Auflösung' }[quizPhase] - : (qaStage ? slide.typeLabel + ' · ' + Qa.labels[qaStage] - : (orderRevealed ? slide.typeLabel + ' · Auflösung' : slide.typeLabel)); + var closed = slide.isInteractive && !slide.isVotingOpen && !quizPhase && !qaStage && !orderRevealed; + // Status line above the question: only what the room needs to know, not the slide type. + q('[data-status]').textContent = quizPhase + ? { 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-description]').textContent = slide.description; root.classList.toggle('stage--content', !slide.isInteractive); root.classList.toggle('stage--video', slide.type === 'youtube'); 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); var voting = q('[data-voting]');