Skip to content

Conversation

@ildyria
Copy link
Member

@ildyria ildyria commented Jan 22, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Album gallery view toggle buttons are now hidden when the album collection is empty. Previously, controls for switching between grid and list display layouts would appear even without any albums, creating a confusing user experience. This change ensures view controls only display when there is content to view.

✏️ 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 22, 2026 17:55
@ildyria ildyria changed the title Hide button if there are no albums Hide list button if there are no albums Jan 22, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 22, 2026

📝 Walkthrough

Walkthrough

This PR modifies the AlbumHero.vue component to add conditional guards ensuring album view toggle buttons only render when albums exist. The buttons are now hidden when the albums array is empty, affecting the component's render path without changing core functionality.

Changes

Cohort / File(s) Summary
Album Hero Template Guards
resources/js/components/gallery/albumModule/AlbumHero.vue
Adds albumsStore.albums.length > 0 checks to conditional rendering of view toggle buttons. The grid-view and list-view buttons now only display when albums are present, preventing UI elements from appearing on empty album states.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 No albums? No buttons! declares the guard bold,
The toggle buttons wait in their conditional hold,
When albums return, the view options spring free,
A gallery more graceful, as graceful can be! 🎨

🚥 Pre-merge checks | ✅ 1
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

@ildyria ildyria merged commit 758210b into master Jan 22, 2026
43 checks passed
@ildyria ildyria deleted the do-not-display-list-mode branch January 22, 2026 18:26
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