Skip to content

Medium zip download#4133

Merged
ildyria merged 3 commits intomasterfrom
medium_zip_download
Feb 28, 2026
Merged

Medium zip download#4133
ildyria merged 3 commits intomasterfrom
medium_zip_download

Conversation

@ildyria
Copy link
Member

@ildyria ildyria commented Feb 28, 2026

Summary by CodeRabbit

  • New Features

    • Add optional photo-size variant selection for album ZIP downloads via a new download modal; defaults to ORIGINAL when unspecified.
    • Download action now includes the chosen variant so ZIPs contain the requested sizes when available.
  • Bug Fixes / Behavior

    • Graceful fallback to ORIGINAL if a requested variant is unavailable.
  • Docs

    • Feature plan, spec, tasks, and roadmap entries for variant-aware album ZIPs.
  • Tests

    • Updated validation tests to allow optional variant.
  • Localization

    • Added "download_album" translation in multiple locales.

@ildyria ildyria requested a review from a team as a code owner February 28, 2026 22:26
@coderabbitai
Copy link

coderabbitai bot commented Feb 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cae3c0d and 8f5c18e.

📒 Files selected for processing (24)
  • app/Http/Requests/Album/ZipRequest.php
  • 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/vi/gallery.php
  • lang/zh_CN/gallery.php
  • lang/zh_TW/gallery.php
  • resources/js/components/modals/DownloadAlbum.vue
✅ Files skipped from review due to trivial changes (1)
  • lang/el/gallery.php
🚧 Files skipped from review as they are similar to previous changes (1)
  • resources/js/components/modals/DownloadAlbum.vue

📝 Walkthrough

Walkthrough

Adds optional download size variant support for album ZIPs: threads a DownloadVariantType from controller through the archive pipeline, relaxes request validation, adds a frontend modal and service parameter to select/preserve the variant, and updates docs and translations.

Changes

Cohort / File(s) Summary
Backend Archive Pipeline
app/Actions/Album/BaseArchive.php
Public API do() now accepts ?DownloadVariantType $variant and propagates the variant through internal compression methods with fallback to ORIGINAL.
Controller Callsite
app/Http/Controllers/Gallery/AlbumController.php
Passes the request size variant into AlbumBaseArchive::resolve()->do(...).
Request Validation & Tests
app/Http/Requests/Album/ZipRequest.php, tests/Unit/Http/Requests/Album/ZipRequestTest.php
Validation for size variant changed from required_if_accepted to sometimes; tests adjusted to reflect optional enum validation.
Frontend Service
resources/js/services/album-service.ts
download() gains an optional variant parameter (default ORIGINAL) and appends it to the ZIP download URL as a query param.
Frontend Components
resources/js/components/gallery/albumModule/AlbumHero.vue, resources/js/components/gallery/albumModule/AlbumPanel.vue
Hero now emits toggleDownloadAlbum; Panel adds modal state/handlers and wires download flows to open the new modal.
Download Modal
resources/js/components/modals/DownloadAlbum.vue
New Vue component exposing albumIds prop and allowing users to pick a DownloadVariantType (feature-flag filtered) before invoking AlbumService.download.
Documentation
docs/specs/4-architecture/features/021-album-variant-zip/plan.md, .../spec.md, .../tasks.md, docs/specs/4-architecture/roadmap.md
Feature 021 docs added/extended: design, requirements, UI mockups, task breakdown, roadmap entry.
Translations
lang/*/gallery.php
Added download_album translation key across locales (multiple lang/.../gallery.php files).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 I hopped through code to thread a size,

ORIGINAL waits if the chosen one dies.
Click the modal, pick what you please,
I zip your album with variant ease.
A rabbit’s nibble, a tidy archive breeze! 🥕

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 87.50% which is sufficient. The required threshold is 80.00%.

✏️ 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: 7

🧹 Nitpick comments (2)
resources/js/components/gallery/albumModule/AlbumPanel.vue (1)

257-259: Snapshot selected album IDs before opening the modal.

Assigning the reactive array by reference can unintentionally change the modal target list if selection mutates afterward. Copy by value here.

♻️ Suggested tweak
-	downloadAlbumIds.value = selectedAlbumsIds.value;
+	downloadAlbumIds.value = [...selectedAlbumsIds.value];
docs/specs/4-architecture/features/021-album-variant-zip/tasks.md (1)

8-69: Reorder the checklist so tests come before implementation tasks.

The current sequence places most code work before test tasks; please reorder to match the expected workflow in this tasks document.

As per coding guidelines, "docs/specs/4-architecture/features/**/tasks.md: ... orders tests before code ...".


ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 17e9ccb and cae3c0d.

📒 Files selected for processing (12)
  • app/Actions/Album/BaseArchive.php
  • app/Http/Controllers/Gallery/AlbumController.php
  • app/Http/Requests/Album/ZipRequest.php
  • docs/specs/4-architecture/features/021-album-variant-zip/plan.md
  • docs/specs/4-architecture/features/021-album-variant-zip/spec.md
  • docs/specs/4-architecture/features/021-album-variant-zip/tasks.md
  • docs/specs/4-architecture/roadmap.md
  • resources/js/components/gallery/albumModule/AlbumHero.vue
  • resources/js/components/gallery/albumModule/AlbumPanel.vue
  • resources/js/components/modals/DownloadAlbum.vue
  • resources/js/services/album-service.ts
  • tests/Unit/Http/Requests/Album/ZipRequestTest.php

@codecov
Copy link

codecov bot commented Feb 28, 2026

Codecov Report

❌ Patch coverage is 70.83333% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.51%. Comparing base (17e9ccb) to head (8f5c18e).
⚠️ 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 5f06de4 into master Feb 28, 2026
44 checks passed
@ildyria ildyria deleted the medium_zip_download branch February 28, 2026 23:35
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