feat(viewer): start the slideshow on open - #39
Open
skjnldsv wants to merge 2 commits into
Open
Conversation
`open(nodes, file, { startSlideshow: true })` opens straight into the
slideshow, which Photos does from its Memories and Timeline views. The
option is ignored for a single file. The slideshow state is bound to
NcModal's `slideshowRunning` model, so the play / pause button and the
last-slide stop are followed, and the state resets on close.
Handlers get an `update:playing` emit. The slideshow waits while it
is true, and the video and audio players emit it from the media
element's play and pause events, so a slideshow does not move on in
the middle of a video.
Needs @nextcloud/vue with the `slideshowRunning` model on NcModal.
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #39 +/- ##
==========================================
+ Coverage 87.83% 87.96% +0.12%
==========================================
Files 36 36
Lines 2474 2500 +26
Branches 519 522 +3
==========================================
+ Hits 2173 2199 +26
Misses 297 297
Partials 4 4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
skjnldsv
marked this pull request as ready for review
September 12, 2026 15:47
The component tests stub NcModal, so they cannot tell whether the modal takes the slideshow state. This drives the real one through the playground, which gets a `slideshow` flag, and reads the state off the play / pause button. It fails until @nextcloud/vue ships the `slideshowRunning` model. Assisted-by: ClaudeCode:claude-opus-5 Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
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.
nextcloud/viewer master got
startSlideshowin nextcloud/viewer@6534fcd5 after this library forked from it, and Photos already passes it fromMemoriesView.vueandTimelineView.vue. The library had no way to start the slideshow from outside, and no way for a video to hold it.open(nodes, file, { startSlideshow: true })now starts the slideshow, ignored for a single file, and the state resets on close. Handlers get a fourth emit,update:playing: the slideshow pauses while it is true. The video and audio players emit it from the media element'splayandpauseevents, so a playing clip finishes before the slideshow moves on. The old viewer only did this for videos; I wired the audio player too since the same argument holds.Important
Depends on nextcloud-libraries/nextcloud-vue#8955, which exposes NcModal's slideshow state as
v-model:slideshow-running. Until that is released and the@nextcloud/vuerequirement bumped here, the option is a no-op at runtime (the modal ignores the unknown prop), and theslideshow.spec.tse2e run is red on purpose: it drives the real modal and is the only check that can tell.Covered by component tests: the option, its single-file and unasked cases, following the play / pause button, reset on close, a handler holding and releasing the slideshow, the hold dropping when the file changes, and both players emitting. The component tests stub NcModal, so they pass either way; the e2e spec passed locally with a build of the nextcloud-vue branch swapped into
node_modules, and fails against 9.11 / 9.12.👾 This pull request was assisted by Claude Code, commits carry an
Assisted-bytrailer.