Skip to content

Add link to owning albums.#4122

Merged
ildyria merged 3 commits intomasterfrom
add-find-albums
Feb 27, 2026
Merged

Add link to owning albums.#4122
ildyria merged 3 commits intomasterfrom
add-find-albums

Conversation

@ildyria
Copy link
Member

@ildyria ildyria commented Feb 26, 2026

Fixes #4062

Summary by CodeRabbit

  • New Features

    • Photo Details sidebar now shows an Albums section (lazy-loaded) with loading, empty, and error states; album links navigate to the chosen album.
    • New backend API to fetch albums for a photo to power the UI.
  • Documentation

    • Full spec, plan and task list added for the Photo Albums Sidebar feature.
  • Translations

    • Album-related UI strings added across multiple language packs.
  • Tests

    • Backend feature tests covering access scenarios and edge cases.

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

coderabbitai bot commented Feb 26, 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 06eb9c6 and d6cbe2a.

📒 Files selected for processing (1)
  • app/Metadata/Cache/RouteCacheManager.php

📝 Walkthrough

Walkthrough

Adds a Photo Albums Sidebar feature: new API endpoint to list a photo's albums with request validation and authorization, backend resource and tests, frontend UI and service to lazy-load albums, TypeScript types, route caching entry, many i18n strings, and supporting docs and roadmap updates.

Changes

Cohort / File(s) Summary
Controller & Request
app/Http/Controllers/Gallery/PhotoController.php, app/Http/Requests/Photo/GetPhotoAlbumsRequest.php
New public controller method albums(GetPhotoAlbumsRequest) and request class that validates/authorizes the photo and loads its albums for downstream use.
Resource & Types
app/Http/Resources/Models/PhotoAlbumResource.php, resources/js/lychee.d.ts
New PhotoAlbumResource (id, title) server-side Spatie Data class and corresponding TypeScript type added.
Route & Cache
routes/api_v2.php, app/Metadata/Cache/RouteCacheManager.php
New GET route /Photo/{photo_id}/albums registered and added to route cache list (user-dependent, GALLERY tag).
Frontend: UI & Service
resources/js/components/drawers/PhotoDetails.vue, resources/js/services/photo-service.ts
PhotoDetails.vue: Albums section with loading/error/empty/list states, lazy load + per-photo caching, navigation behavior; PhotoService.albums() HTTP method added.
Tests
tests/Feature_v2/Photo/GetPhotoAlbumsTest.php
New feature tests covering owner, shared user, guest visibility, private access denial, 404 for missing photo, and empty-albums response.
Localization
lang/*/gallery.php (multiple locales: ar,bg,cz,de,el,en,es,fa,fr,hu,it,ja,nl,no,pl,pt,ru,sk,sv,vi,zh_CN,zh_TW)
Added four translation keys under photo.details: albums, albums_loading, no_albums, albums_loading_error across all listed locales.
Documentation & Roadmap
docs/specs/4-architecture/features/018-photo-albums-sidebar/*, docs/specs/4-architecture/roadmap.md
New spec, plan, tasks documents for Feature 018 and roadmap entry added describing scope, requirements, tests, UX, and implementation steps.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰
I hopped through routes and docs today,
Found albums waiting, just a click away.
I fetch, I cache, I show the list with cheer,
Titles and ids — all tidy and near.
Hip-hop hooray, the sidebar’s here! 🥕

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 92.86% 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: 1

🧹 Nitpick comments (2)
resources/js/components/drawers/PhotoDetails.vue (1)

100-106: Consider adding keyboard accessibility to album links.

The album links are clickable but use <a> tags without href or tabindex/role attributes. This may impact keyboard navigation for accessibility.

♿ Suggested accessibility improvement
 <ul v-else class="list-none p-0 m-0">
 	<li v-for="album in albums" :key="album.id" class="mb-1">
-		<a class="text-sm text-primary-color cursor-pointer hover:underline" `@click`="navigateToAlbum(album.id)">
+		<a class="text-sm text-primary-color cursor-pointer hover:underline" tabindex="0" role="link" `@click`="navigateToAlbum(album.id)" `@keydown.enter`="navigateToAlbum(album.id)">
 			{{ album.title }}
 		</a>
 	</li>
 </ul>
docs/specs/4-architecture/features/018-photo-albums-sidebar/tasks.md (1)

3-4: Status may be premature.

The status is marked "Implementation Complete" but post-implementation tasks (T-018-17 through T-018-19) are still unchecked. Consider updating the status to reflect that post-implementation steps remain, or mark those tasks complete if they've been done.

📝 Suggested status update
-_Status: Implementation Complete_
+_Status: Implementation Complete, Post-Implementation Pending_

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 71053b2 and 06eb9c6.

📒 Files selected for processing (34)
  • app/Http/Controllers/Gallery/PhotoController.php
  • app/Http/Requests/Photo/GetPhotoAlbumsRequest.php
  • app/Http/Resources/Models/PhotoAlbumResource.php
  • docs/specs/4-architecture/features/018-photo-albums-sidebar/plan.md
  • docs/specs/4-architecture/features/018-photo-albums-sidebar/spec.md
  • docs/specs/4-architecture/features/018-photo-albums-sidebar/tasks.md
  • docs/specs/4-architecture/roadmap.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/vi/gallery.php
  • lang/zh_CN/gallery.php
  • lang/zh_TW/gallery.php
  • resources/js/components/drawers/PhotoDetails.vue
  • resources/js/lychee.d.ts
  • resources/js/services/photo-service.ts
  • routes/api_v2.php
  • tests/Feature_v2/Photo/GetPhotoAlbumsTest.php

@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.23%. Comparing base (71053b2) to head (d6cbe2a).
⚠️ Report is 1 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 9eccf52 into master Feb 27, 2026
44 checks passed
@ildyria ildyria deleted the add-find-albums branch February 27, 2026 11:12
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.

View Original button

1 participant