Skip to content

Conversation

@ildyria
Copy link
Member

@ildyria ildyria commented Jan 25, 2026

Nothing new, just preferring normal string keys instead of int: more explicit what is what.

Summary by CodeRabbit

  • New Features

    • Album creation dialog now displays helpful visibility information explaining each protection option.
    • Added multilingual support for album visibility descriptions (private, public, public-hidden, inherit, inherit-no-parent) across 20+ languages.
  • Improvements

    • Enhanced default album protection configuration with clearer visibility semantics.

✏️ Tip: You can customize this high-level summary in your review settings.

@ildyria ildyria requested a review from a team as a code owner January 25, 2026 19:49
@coderabbitai
Copy link

coderabbitai bot commented Jan 25, 2026

📝 Walkthrough

Walkthrough

This pull request refactors the DefaultAlbumProtectionType enum from integer-backed to string-backed values, updates database configurations via migration, and expands localization strings across 22 language files. Vue components and TypeScript definitions are updated to reflect the new enum structure.

Changes

Cohort / File(s) Summary
Enum Definition
app/Enum/DefaultAlbumProtectionType.php
Changed enum from backed int to backed string; case values updated: PRIVATE (1 → 'private'), PUBLIC (2 → 'public'), INHERIT (3 → 'inherit'), PUBLIC_HIDDEN (4 → 'public_hidden')
Exception File
app/Exceptions/CannotConvertMediaFileException.php
Minor formatting adjustment; no functional change
Configuration & Migration
app/Http/Resources/GalleryConfigs/InitConfig.php, database/migrations/2026_01_25_120000_refactor_default_album_protection_to_string.php
New public property default_album_protection added to InitConfig; migration converts config table values from integers to strings with updated type_range descriptor; includes reversible down() method
Localization Files
lang/ar/dialogs.php, lang/cz/dialogs.php, lang/de/dialogs.php, lang/el/dialogs.php, lang/en/dialogs.php, lang/es/dialogs.php, lang/fa/dialogs.php, lang/fr/dialogs.php, lang/hu/dialogs.php, lang/it/dialogs.php, lang/ja/dialogs.php, lang/nl/dialogs.php, lang/no/dialogs.php, lang/pl/dialogs.php, lang/pt/dialogs.php, lang/ru/dialogs.php, lang/sk/dialogs.php, lang/sv/dialogs.php, lang/vi/dialogs.php, lang/zh_CN/dialogs.php, lang/zh_TW/dialogs.php
Five new visibility-related keys added under new_album section: visibility_private, visibility_public, visibility_public_hidden, visibility_inherit, visibility_inherit_no_parent; translations provided in each language
Vue Component & Frontend
resources/js/components/forms/album/AlbumCreateDialog.vue, resources/js/lychee.d.ts, resources/js/stores/LycheeState.ts
New computed property visibilityInfo added to AlbumCreateDialog with integration to LycheeState store; TypeScript definitions updated to reflect string-based enum and new default_album_protection property; store state initialized with new property and data mapping

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 From integers to strings we hop,
Migration magic makes configs pop,
Twenty-two tongues now sing the tune,
Of private, public, and albums in June!
A visibility dance, both here and there,
With inherits and whispers floating through air! 🌾✨

🚥 Pre-merge checks | ❌ 1
❌ 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%. 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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (2)
lang/nl/dialogs.php (1)

160-164: Minor formatting issue on line 164.

The closing bracket ], is on the same line as the last entry with extra whitespace, which is inconsistent with the rest of the file where each section's closing bracket is on its own line (see lines 14, 22, 171, etc.).

The Dutch translations look good and are consistent in style.

🔧 Suggested fix for consistent formatting
         'visibility_inherit' => 'Dit album erft de zichtbaarheid van het hoofdalbum',
-        'visibility_inherit_no_parent' => 'Dit album is privé (geen hoofdalbum)',    ],
+        'visibility_inherit_no_parent' => 'Dit album is privé (geen hoofdalbum)',
+    ],
lang/fa/dialogs.php (1)

160-164: Missing Persian translations for new visibility strings.

These visibility strings are in English while the rest of the file is translated to Persian. Consider providing Persian translations for consistency with the existing localized content in this file.

@codecov
Copy link

codecov bot commented Jan 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.07%. Comparing base (a0c1014) to head (fc27e67).
⚠️ Report is 2 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 d625a08 into master Jan 25, 2026
44 checks passed
@ildyria ildyria deleted the refactoring-album-rights-propagation-policy branch January 25, 2026 20:22
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