Skip to content

feat(lightbox): play live photos from a dock button in v7 and v8 - #4933

Merged
ildyria merged 5 commits into
LycheeOrg:masterfrom
mlapaglia:feat/lightbox-live-dock-button
Nov 1, 2026
Merged

ildyria merged 5 commits into
LycheeOrg:masterfrom
mlapaglia:feat/lightbox-live-dock-button

Conversation

@mlapaglia

@mlapaglia mlapaglia commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Hide the LivePhotosKit LIVE badge in the main lightbox and add a play/stop toggle to the dock. While on, a muted looping video of the clip plays over the still until the button is turned off. Viewers without edit rights get a dock with only this button. Flow and Moderation keep the native controls.

Spec impact: FR-100-06, S-100-25, S-100-26, UI-100-04 added to feature 100

image

Summary by CodeRabbit

  • New Features
    • Added play and stop controls for Live Photos in the v7 and v8 lightbox docks, including for viewers without photo-editing access.
    • Live Photos play as muted, looping video overlays. Dock controls are keyboard-operable and have accessible labels.
    • Added translated labels for clockwise and counterclockwise photo-rotation actions.
  • Bug Fixes
    • Playback stops when a video fails, the displayed photo changes, or the lightbox closes.
    • Dock visibility accounts for photo-editing, zoom, and PDF states.

Hide the LivePhotosKit LIVE badge in the main lightbox and add a play/stop toggle to the dock. While on, a muted looping video of the clip plays over the still until the button is turned off. Viewers without edit rights get a dock with only this button. Flow and Moderation keep the native controls.

Spec impact: FR-100-06, S-100-25, S-100-26, UI-100-04 added to feature 100
@mlapaglia
mlapaglia requested a review from a team as a code owner October 31, 2026 15:00
@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 08f93ba8-c8ae-4330-9582-f572a9ab9956
Commits

Reviewing files that changed from the base of the PR and between 88ba0f7 and 4e7a985.

Files selected for processing: 1
  • docs/specs/4-architecture/features/100-google-motion-photos/spec.md
Files skipped from review as they are similar to previous changes: 1
  • docs/specs/4-architecture/features/100-google-motion-photos/spec.md

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.

Walkthrough

The v7 and v8 lightboxes add a dock button for Live Photo playback through a looping video overlay. A shared composable tracks playback state and control ownership. The dock can appear for viewers without edit permission. The changes also update accessibility labels, translations, tests, and feature documentation.

Changes: Live Photo lightbox playback

Layer / File(s) Summary
Playback requirements
docs/specs/4-architecture/features/100-google-motion-photos/spec.md, docs/specs/4-architecture/features/100-google-motion-photos/plan.md, docs/specs/4-architecture/features/100-google-motion-photos/tasks.md, docs/specs/4-architecture/knowledge-map.md
The specification describes dock-controlled playback, button states, and viewer scenarios. The plan and task list track the related increment and work. The knowledge map records the playback arrangement and native-control exception.
Shared toggle and playback state
resources/js/stores/PhotoState.ts, resources/js/composables/photo/useLivePhotoToggle.ts, resources/js/composables/photo/useLivePhotoToggle.test.ts
The store and composable track the active playback control and playing state. Tests cover toggling, stopping, deactivation, and overlapping photo-box lifecycles.
Lightbox video overlays
resources/js/v7/components/gallery/photoModule/PhotoBox.vue, resources/js/v8/components/gallery/photoModule/PhotoBox.vue
Both photo boxes render a looping video overlay during dock-controlled playback and stop playback on video errors. LivePhotosKit renders the still and retains native controls outside dock-controlled playback.
Dock controls and visibility
resources/js/v7/components/gallery/photoModule/Dock.vue, resources/js/v7/components/gallery/photoModule/DockButton.vue, resources/js/v7/components/gallery/photoModule/PhotoPanel.vue, resources/js/v8/components/gallery/photoModule/Dock.vue, resources/js/v8/components/gallery/photoModule/DockButton.vue, resources/js/v8/components/gallery/photoModule/PhotoPanel.vue, lang/*/gallery.php
The docks show the Live Photo control separately from edit actions. The panels show the dock when the viewer can edit or Live Photo controls are available, subject to view-specific conditions. Dock controls use button elements and translated labels.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Merge Risk: Minimal · up to 4e7a9

The updated playback specification presents no identified merge-blocking issue.

Pre-merge checks: Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta… Write docstrings for the functions missing them to satisfy the coverage threshold.
Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 26 files. (1 skipped: 1 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

A rabbit taps the dock to start,
A looping clip springs into view.
The still stays near, the controls track,
Then errors bring the motion back.
New labels help the buttons speak,
And tests check each transition’s beat.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a2665122-71c1-43fc-990f-7874a20656d3
Commits

Reviewing files that changed from the base of the PR and between 4e5d5c8 and 274c97a.

Files selected for processing: 13
  • docs/specs/4-architecture/features/100-google-motion-photos/plan.md
  • docs/specs/4-architecture/features/100-google-motion-photos/spec.md
  • docs/specs/4-architecture/features/100-google-motion-photos/tasks.md
  • docs/specs/4-architecture/knowledge-map.md
  • resources/js/composables/photo/useLivePhotoToggle.test.ts
  • resources/js/composables/photo/useLivePhotoToggle.ts
  • resources/js/stores/PhotoState.ts
  • resources/js/v7/components/gallery/photoModule/Dock.vue
  • resources/js/v7/components/gallery/photoModule/PhotoBox.vue
  • resources/js/v7/components/gallery/photoModule/PhotoPanel.vue
  • resources/js/v8/components/gallery/photoModule/Dock.vue
  • resources/js/v8/components/gallery/photoModule/PhotoBox.vue
  • resources/js/v8/components/gallery/photoModule/PhotoPanel.vue

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

DockButton renders a button instead of an anchor without href in v7 and v8, so every dock button can be focused and triggered with Enter or Space. The live photo button gets an aria-label and aria-pressed. Record the owner's Firefox and Chrome checks on the feature 100 tasks.

Spec impact: FR-100-06 accessibility details, T-100-28 added

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1d21f4ec-db6b-4749-8454-7369826659fc
Commits

Reviewing files that changed from the base of the PR and between 4e5d5c8 and ed01f9c.

Files selected for processing: 15
  • docs/specs/4-architecture/features/100-google-motion-photos/plan.md
  • docs/specs/4-architecture/features/100-google-motion-photos/spec.md
  • docs/specs/4-architecture/features/100-google-motion-photos/tasks.md
  • docs/specs/4-architecture/knowledge-map.md
  • resources/js/composables/photo/useLivePhotoToggle.test.ts
  • resources/js/composables/photo/useLivePhotoToggle.ts
  • resources/js/stores/PhotoState.ts
  • resources/js/v7/components/gallery/photoModule/Dock.vue
  • resources/js/v7/components/gallery/photoModule/DockButton.vue
  • resources/js/v7/components/gallery/photoModule/PhotoBox.vue
  • resources/js/v7/components/gallery/photoModule/PhotoPanel.vue
  • resources/js/v8/components/gallery/photoModule/Dock.vue
  • resources/js/v8/components/gallery/photoModule/DockButton.vue
  • resources/js/v8/components/gallery/photoModule/PhotoBox.vue
  • resources/js/v8/components/gallery/photoModule/PhotoPanel.vue

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

Every icon-only dock button in v7 and v8 gets a translated aria-label, with new gallery.photo.actions.rotate_ccw and rotate_cw keys in all locales. The watermark tooltip uses the existing translated key instead of a hard-coded string.

Align the plan scope, FR-100-06, UI-100-04 and the knowledge map with the dock video overlay and the useLivePhotoToggle composable that owns the control registration.

Spec impact: FR-100-06 and UI-100-04 wording, T-100-29 added

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow-up Comments

Outside diff Stop live playback when the photo changes.

36-48: Minor · Functional Correctness · Quick win

Stop live playback when the photo changes.

On Timeline and Album, a next or previous step from a playing live photo to another live photo remounts PhotoBox under the keyed PhotoPanel transition. The outgoing box keeps its local playing state until its leave transition ends. The shared useLivePhotoToggle composable stops playback only when isActive changes, so the outgoing clip keeps playing during that transition.

Stop playback when the photo identity changes:

Suggested fix
 	watch(
 		isActive,
 		(active) => {
 			if (!active) {
 				release();
 				return;
 			}
 			stop();
 			photoStore.live_photo_controls = controls;
 			photoStore.is_live_playing = false;
 		},
 		{ immediate: true },
 	);
+
+	watch(
+		() => photoStore.photo?.id,
+		() => stop(),
+	);

Open the source location


Review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dd5b2de6-3cf8-46ee-833e-c2889e85f285
Commits

Reviewing files that changed from the base of the PR and between ed01f9c and 88ba0f7.

Files selected for processing: 29
  • docs/specs/4-architecture/features/100-google-motion-photos/plan.md
  • docs/specs/4-architecture/features/100-google-motion-photos/spec.md
  • docs/specs/4-architecture/features/100-google-motion-photos/tasks.md
  • docs/specs/4-architecture/knowledge-map.md
  • lang/ar/gallery.php
  • lang/bg/gallery.php
  • lang/cz/gallery.php
  • lang/de/gallery.php
  • lang/el/gallery.php
  • lang/en/gallery.php
  • lang/es/gallery.php
  • lang/fa/gallery.php
  • lang/fr/gallery.php
  • lang/hu/gallery.php
  • lang/it/gallery.php
  • lang/ja/gallery.php
  • lang/nl/gallery.php
  • lang/no/gallery.php
  • lang/pl/gallery.php
  • lang/pt/gallery.php
  • lang/ru/gallery.php
  • lang/sk/gallery.php
  • lang/sv/gallery.php
  • lang/tr/gallery.php
  • lang/vi/gallery.php
  • lang/zh_CN/gallery.php
  • lang/zh_TW/gallery.php
  • resources/js/v7/components/gallery/photoModule/Dock.vue
  • resources/js/v8/components/gallery/photoModule/Dock.vue
Files skipped from review as they are similar to previous changes: 3
  • docs/specs/4-architecture/knowledge-map.md
  • docs/specs/4-architecture/features/100-google-motion-photos/tasks.md
  • docs/specs/4-architecture/features/100-google-motion-photos/plan.md

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.

The dock stays hidden while photo edit is open and, in v8, while the photo is zoomed.

Spec impact: FR-100-06 visibility wording
@mlapaglia
mlapaglia enabled auto-merge (squash) October 31, 2026 17:11
@ildyria
ildyria disabled auto-merge November 1, 2026 13:19
@ildyria
ildyria merged commit e99b482 into LycheeOrg:master Nov 1, 2026
30 checks passed
@mlapaglia
mlapaglia deleted the feat/lightbox-live-dock-button branch November 1, 2026 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants