-
-
Notifications
You must be signed in to change notification settings - Fork 362
Add option to hide photo action dock instead of transparency #3804
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughAdds two gallery config flags for desktop/mobile dock full transparency, a migration to register them, exposes flags in InitConfig and frontend state/types, updates Dock.vue opacity logic to use those flags, and introduces a typed EmbedAlbumInfo used by EmbedAlbumResource. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Poem
Pre-merge checks❌ Failed checks (1 warning)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
app/Http/Resources/Embed/EmbedAlbumInfo.php(1 hunks)app/Http/Resources/Embed/EmbedAlbumResource.php(1 hunks)resources/js/lychee.d.ts(3 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2025-08-14T10:17:35.082Z
Learnt from: ildyria
Repo: LycheeOrg/Lychee PR: 3616
File: app/Actions/Album/PositionData.php:38-39
Timestamp: 2025-08-14T10:17:35.082Z
Learning: PositionDataResource uses toPhotoResources() method to convert photos to PhotoResource instances, and PhotoResource accesses the tags relationship ($photo->tags->pluck('name')->all()), making the 'tags' eager-loading in PositionData necessary to avoid N+1 queries.
Applied to files:
app/Http/Resources/Embed/EmbedAlbumResource.php
📚 Learning: 2025-09-28T12:04:53.277Z
Learnt from: ildyria
Repo: LycheeOrg/Lychee PR: 3721
File: resources/js/stores/TagState.ts:34-36
Timestamp: 2025-09-28T12:04:53.277Z
Learning: In the Lychee codebase, different API services have different response structures. TagsService.get() returns TagWithPhotosResource directly with fields id, name, and photos (no "resource" wrapper field), while AlbumService.get() returns a response with data.resource that can be null. Always check the actual TypeScript definitions before assuming response structure.
Applied to files:
app/Http/Resources/Embed/EmbedAlbumResource.phpresources/js/lychee.d.ts
📚 Learning: 2025-09-28T08:46:37.299Z
Learnt from: ildyria
Repo: LycheeOrg/Lychee PR: 3721
File: resources/js/stores/UserState.ts:7-11
Timestamp: 2025-09-28T08:46:37.299Z
Learning: In Lychee codebase, the type `App.Enum.OauthProvidersType` is properly defined within the `App.Enum` namespace in `resources/js/lychee.d.ts` file. References to `App.Enum.OauthProvidersType` in TypeScript files are valid and resolve correctly.
Applied to files:
resources/js/lychee.d.ts
📚 Learning: 2025-08-16T14:00:53.808Z
Learnt from: ildyria
Repo: LycheeOrg/Lychee PR: 3504
File: resources/js/composables/selections/selections.ts:145-147
Timestamp: 2025-08-16T14:00:53.808Z
Learning: In the Lychee codebase, the maintainer ildyria has indicated that bounds checking for array access in selectables.albums.value[idx] within the albumClick function in resources/js/composables/selections/selections.ts is not necessary, suggesting there are adequate safeguards elsewhere in the code or the access pattern is guaranteed to be safe.
Applied to files:
resources/js/lychee.d.ts
🧬 Code graph analysis (2)
app/Http/Resources/Embed/EmbedAlbumResource.php (2)
resources/js/lychee.d.ts (2)
EmbedAlbumInfo(258-265)Album(969-978)app/Http/Resources/Embed/EmbedAlbumInfo.php (2)
__construct(24-32)fromModel(41-51)
app/Http/Resources/Embed/EmbedAlbumInfo.php (2)
resources/js/lychee.d.ts (2)
Album(969-978)EmbedAlbumInfo(258-265)app/Http/Resources/Embed/EmbedAlbumResource.php (3)
TypeScript(23-48)__construct(31-35)fromModel(44-47)
⏰ Context from checks skipped due to timeout of 180000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: 3️⃣ PHP dist / 8.3 - sqlite
- GitHub Check: 2️⃣ PHP tests / 8.3 - sqlite -- Feature_v2
- GitHub Check: 2️⃣ PHP tests / 8.3 - mariadb -- Webshop
- GitHub Check: 2️⃣ PHP tests / 8.4 - mariadb -- Install
- GitHub Check: 2️⃣ PHP tests / 8.3 - mariadb -- Install
- GitHub Check: 2️⃣ PHP tests / 8.3 - postgresql -- Unit
- GitHub Check: 2️⃣ PHP tests / 8.3 - postgresql -- Feature_v2
- GitHub Check: 2️⃣ PHP tests / 8.3 - mariadb -- Feature_v2
🔇 Additional comments (5)
resources/js/lychee.d.ts (3)
267-267: Good refactoring to use named type.Extracting the inline object to the named
EmbedAlbumInfotype improves maintainability and follows the DRY principle.
277-280: LGTM!The new
EmbedStreamResourcetype is well-structured and follows existing patterns in the codebase.
368-369: LGTM!The new dock transparency configuration fields directly support the PR objective and follow the existing naming conventions. The separation of desktop and mobile settings is appropriate for responsive design.
app/Http/Resources/Embed/EmbedAlbumResource.php (1)
26-26: LGTM! Clean refactoring to strongly-typed resource.The refactoring from an inline array to a dedicated
EmbedAlbumInfotyped object improves type safety and maintainability. The TypeScript types are properly aligned.Also applies to: 33-33
app/Http/Resources/Embed/EmbedAlbumInfo.php (1)
24-32: LGTM! Clean use of promoted properties.The constructor effectively uses PHP 8+ promoted properties with explicit typing, providing a clean and concise implementation.
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
d7415
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd approve, but automerge...
My interpretation - feel free to ignore.
database/migrations/2025_11_15_092400_optional_dock_transparency.php
Outdated
Show resolved
Hide resolved
database/migrations/2025_11_15_092400_optional_dock_transparency.php
Outdated
Show resolved
Hide resolved
database/migrations/2025_11_15_092400_optional_dock_transparency.php
Outdated
Show resolved
Hide resolved
database/migrations/2025_11_15_092400_optional_dock_transparency.php
Outdated
Show resolved
Hide resolved
Co-authored-by: Martin Stone <1611702+d7415@users.noreply.github.com>
|
@d7415 fixed. :) |
Summary by CodeRabbit
New Features
Refactor