Add hiding slides from the presentation
CI / Deploy / test (push) Successful in 57s
CI / Deploy / deploy (push) Skipped

Hidden slides stay prepared in the dashboard but are skipped when
presenting (start, next/prev, goto), can not go live via embed and are
left out of the PDF export. Hiding the live or paused slide pauses the
poll like deleting it and resumes with the next visible slide.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Opus 5.5 committed 2026-11-11 15:25:41 +01:00
1 parent e2f24877dd
commit 3c978e6f22
15 files changed
+333 -35

No files matched your search

+4 -1
View File
@@ -83,7 +83,8 @@ class PollStateService
public function forPresenter(Poll $poll): array
{
$this->Polls->pauseIfEmbedStale($poll);
$slides = $this->Slides->listForPoll($poll->id);
// The presentation consists of the visible slides only.
$slides = $this->Slides->listForPoll($poll->id, true);
$current = null;
$index = null;
foreach ($slides as $i => $slide) {
@@ -102,6 +103,7 @@ class PollStateService
], $slides),
'index' => $index,
'count' => count($slides),
'hiddenCount' => $this->Slides->find()->where(['poll_id' => $poll->id, 'is_hidden' => true])->count(),
'slide' => $current ? $this->slidePayload($current) : null,
'results' => $current ? $this->results->forSlide($current) : null,
];
@@ -123,6 +125,7 @@ class PollStateService
return [
'poll' => $this->pollPayload($poll),
'isLive' => $poll->current_slide_id === $slide->id,
'isHidden' => $slide->is_hidden,
'index' => null,
'count' => null,
'slide' => $this->slidePayload($slide),