Skip to content

Add option to disable the switch photo effect#4406

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

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

Conversation

@ildyria

@ildyria ildyria commented Jun 10, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • New Features

    • Added a configurable setting to disable the swipe effect in the photo viewer.
    • Frontend now respects the new disable-swipe setting for transitions.
    • Setting is available in the app settings and persisted via a migration.
  • Localization

    • Multi-language support added for the new setting across 27 languages.

@ildyria ildyria requested a review from a team as a code owner June 10, 2026 21:05
@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 70381640-7234-4d42-ba06-25ababa14f4c

📥 Commits

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

📒 Files selected for processing (1)
  • resources/js/lychee.d.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • resources/js/lychee.d.ts

📝 Walkthrough

Walkthrough

Adds a new boolean config disable_swipe_effect: backend exposes and migrates the setting, frontend types and Pinia state include and load it, PhotoPanel.vue conditionally disables the transition animation, and 23 language files receive documentation and details entries.

Changes

Disable Swipe Effect Feature

Layer / File(s) Summary
Backend configuration definition
app/Http/Resources/GalleryConfigs/InitConfig.php, database/migrations/2026_06_10_000001_disable_swipe_effect_photo_viewer.php
InitConfig adds the disable_swipe_effect property and reads it from request config. A new migration registers the configuration entry for the Gallery category with default value 0, description, and metadata flags.
Frontend state and type setup
resources/js/lychee.d.ts, resources/js/stores/LycheeState.ts
TypeScript adds the disable_swipe_effect: boolean field to InitConfig type. The Pinia store adds the state flag with default false and binds it during load() initialization from the init payload.
Component transition binding
resources/js/components/gallery/photoModule/PhotoPanel.vue
PhotoPanel.vue extracts disable_swipe_effect from store refs and uses it to conditionally set the <Transition> name to an empty string (disabling animation) when the flag is enabled.
Multi-language setting labels
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
Each of 23 language packs adds disable_swipe_effect to both the documentation section (user-facing label) and the details section (admin help text, left empty) with consistent description text.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 A little rabbit taps the key,

"Freeze the swipe!" it whispers, free.
From migration seed to Vue's bright art,
A flag hops through each code part.
Twenty-three tongues now sing its name.

🚥 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: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5e9f9a4c-f34e-42a6-ad75-2ca85c0704a4

📥 Commits

Reviewing files that changed from the base of the PR and between 2693bcd and 7173548.

📒 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/es/all_settings.php
Comment thread lang/fr/all_settings.php
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.42%. Comparing base (7b28fdc) to head (3a8c364).
⚠️ Report is 5 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 21c7cb7 into master Jun 12, 2026
81 of 86 checks passed
@ildyria ildyria deleted the add-option-disable-switch-photo-effect branch June 12, 2026 07:58
@ildyria ildyria restored the add-option-disable-switch-photo-effect branch June 12, 2026 15:30
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