Skip to content

Add option to disable the switch photo effect#4410

Merged
ildyria merged 4 commits into
masterfrom
add-option-disable-switch-photo-effect
Jun 12, 2026
Merged

Add option to disable the switch photo effect#4410
ildyria merged 4 commits into
masterfrom
add-option-disable-switch-photo-effect

Conversation

@ildyria

@ildyria ildyria commented Jun 12, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Add option to disable the swipe effect in the photo viewer (setting available in app UI).
  • Localization

    • Added translations/documentation entries for the new setting across many languages.
  • Chores

    • Updated container base images and JS CI Node versions; added a legacy Docker build target.

@ildyria ildyria requested a review from a team as a code owner June 12, 2026 15:30
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds a gallery configuration flag disable_swipe_effect (DB migration, backend InitConfig exposure), propagates it to frontend types and Pinia state, uses it in PhotoPanel to conditionally disable swipe transition, adds translations for 23 locales, and updates CI Node matrix and Docker base images.

Changes

Disable Swipe Effect Photo Viewer Configuration

Layer / File(s) Summary
Backend config registration
database/migrations/2026_06_10_000001_disable_swipe_effect_photo_viewer.php
Migration registers the disable_swipe_effect boolean configuration in the Gallery category with default value 0 and metadata.
Backend API resource exposure
app/Http/Resources/GalleryConfigs/InitConfig.php
InitConfig adds a public disable_swipe_effect property and populates it from request configs.
Frontend type contract
resources/js/lychee.d.ts
TypeScript definition declares disable_swipe_effect: boolean in InitConfig.
Frontend state management
resources/js/stores/LycheeState.ts
Pinia store adds disable_swipe_effect state and assigns it from the init payload during load().
Frontend UI implementation
resources/js/components/gallery/photoModule/PhotoPanel.vue
Component extracts the flag from the store and conditionally disables transition effects by setting the Transition name to empty when true.
Multi-language localization
lang/{ar,bg,cz,de,el,en,es,fa,fr,hu,it,ja,nl,no,pl,pt,ru,sk,sv,tr,vi,zh_CN,zh_TW}/all_settings.php
23 language files add disable_swipe_effect entries in both documentation (UI label) and details (help text placeholder).

CI and Docker updates

Layer / File(s) Summary
GitHub Actions Node matrix
.github/workflows/js_check.yml
check_js job matrix updated to run Node 22 and 24 instead of 20.
Main Dockerfile base images
Dockerfile
Pinned base images updated: composer:2.10.1, node:24-alpine, dunglas/frankenphp:1.12.4-php8.5-trixie.
Demo Dockerfile composer copy
Dockerfile-demo
COPY --from composer source updated to composer:2.10.1.
Legacy Dockerfile
Dockerfile-legacy
Composer/node base images updated; final Debian base changed to trixie-slim; OCI label and PHP apt repo distribution adjusted; ImageMagick policy edit updated.
Makefile
Makefile
New docker-build-legacy target added to build lychee-legacy using Dockerfile-legacy.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 Hopped through code, a tiny tweak,

A flag to hush the photo-swipe streak.
From migration seed to Vue's small art,
The store and types play their part.
Translation blooms — a global start.

🚥 Pre-merge checks | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@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: 4


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fdabebcf-847e-4716-b81b-8f61b11176d5

📥 Commits

Reviewing files that changed from the base of the PR and between d4586dc and 3a8c364.

📒 Files selected for processing (28)
  • app/Http/Resources/GalleryConfigs/InitConfig.php
  • database/migrations/2026_06_10_000001_disable_swipe_effect_photo_viewer.php
  • lang/ar/all_settings.php
  • lang/bg/all_settings.php
  • lang/cz/all_settings.php
  • lang/de/all_settings.php
  • lang/el/all_settings.php
  • lang/en/all_settings.php
  • lang/es/all_settings.php
  • lang/fa/all_settings.php
  • lang/fr/all_settings.php
  • lang/hu/all_settings.php
  • lang/it/all_settings.php
  • lang/ja/all_settings.php
  • lang/nl/all_settings.php
  • lang/no/all_settings.php
  • lang/pl/all_settings.php
  • lang/pt/all_settings.php
  • lang/ru/all_settings.php
  • lang/sk/all_settings.php
  • lang/sv/all_settings.php
  • lang/tr/all_settings.php
  • lang/vi/all_settings.php
  • lang/zh_CN/all_settings.php
  • lang/zh_TW/all_settings.php
  • resources/js/components/gallery/photoModule/PhotoPanel.vue
  • resources/js/lychee.d.ts
  • resources/js/stores/LycheeState.ts

Comment thread lang/bg/all_settings.php
Comment thread lang/de/all_settings.php
Comment thread lang/fr/all_settings.php
Comment thread lang/ja/all_settings.php

@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.

🧹 Nitpick comments (2)
Dockerfile (1)

72-72: 💤 Low value

Update OCI base.name label to reflect the pinned FrankenPHP version.

The label still references the generic tag dunglas/frankenphp:php8.5-trixie, but line 59 now pins to version 1.12.4. For accuracy and traceability, update the label to match the pinned version.

📝 Suggested label update
-LABEL org.opencontainers.image.base.name="dunglas/frankenphp:php8.5-trixie"
+LABEL org.opencontainers.image.base.name="dunglas/frankenphp:1.12.4-php8.5-trixie"
Dockerfile-legacy (1)

58-58: Consider stability implications of Debian trixie (testing).

The base image has been upgraded from debian:bookworm-slim (Debian 12 stable) to debian:trixie-slim (Debian 13 testing). Debian testing receives less rigorous stability guarantees than stable releases and may introduce unexpected package updates or breakages in production environments.

The TODO comments at lines 56-57 suggest this migration was planned. Ensure that:

  1. This change has been tested in staging/CI environments
  2. The production deployment strategy accounts for potential instability
  3. There is a rollback plan if issues arise

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d745bd9e-f1e2-43b0-b17c-d95719b662ec

📥 Commits

Reviewing files that changed from the base of the PR and between 3a8c364 and 7d55adc.

📒 Files selected for processing (4)
  • .github/workflows/js_check.yml
  • Dockerfile
  • Dockerfile-demo
  • Dockerfile-legacy
💤 Files with no reviewable changes (1)
  • .github/workflows/js_check.yml

@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.

🧹 Nitpick comments (1)
Dockerfile-legacy (1)

56-57: ⚡ Quick win

Stale TODO comments should be removed or updated.

The TODO comments appear outdated given the current state of the Dockerfile:

  • Line 56 says "migrate to trixie once php8.5-zip is fixed" but the base image is already debian:trixie-slim and uses php8.5 packages.
  • Line 57 says "Fix Imagick sed once we update the version of Imagick" but the sed command on line 120 has been updated to target /etc/ImageMagick-7/policy.xml.

Consider removing these TODOs or clarifying what remains to be addressed.

Suggested fix
-# TODO: migrate to trixie once php8.5-zip is fixed.
-# TODO: Fix Imagick sed once we update the version of Imagick.
 FROM debian:trixie-slim@sha256:4e401d95de7083948053197a9c3913343cd06b706bf15eb6a0c3ccd26f436a0e AS base

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4e0dca97-9a98-482a-b73c-abd250713606

📥 Commits

Reviewing files that changed from the base of the PR and between 7d55adc and 426b7c2.

📒 Files selected for processing (2)
  • Dockerfile-legacy
  • Makefile

@codecov

codecov Bot commented Jun 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.44%. Comparing base (7b28fdc) to head (426b7c2).
⚠️ Report is 6 commits behind head on master.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ildyria ildyria merged commit 4d3d97b into master Jun 12, 2026
45 checks passed
@ildyria ildyria deleted the add-option-disable-switch-photo-effect branch June 12, 2026 18:34
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.

1 participant