Add support for toggle select on mobile view#4416
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (23)
✅ Files skipped from review due to trivial changes (15)
🚧 Files skipped from review as they are similar to previous changes (5)
📝 WalkthroughWalkthroughThis PR implements touch-select mode across the gallery: new togglable store flag and action, selection composables updated, thumbnail and list components render overlays/indicators and emit selection events, events propagate to AlbumPanel, header adds toggle and context-menu trigger, and translations added. ChangesTouch-select mode for album and photo galleries
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ❌ 1❌ Failed checks (1 warning)
✏️ 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
resources/js/components/gallery/albumModule/AlbumThumbPanel.vue (1)
30-87:⚠️ Potential issue | 🟠 Major | ⚡ Quick winTimeline view sections missing
@selectedevent handlers.The non-timeline grid view (lines 17, 25) correctly wires
@selected="propagateSelected"to bothAlbumListViewandAlbumThumbPanelList. However, the timeline view sections have four instances of these components (lines 43-49, 51-57, 69-75, 77-83) that are missing the@selectedhandler. This means touch-select mode will not work when the timeline view is active, breaking the feature for users with timeline enabled.🔧 Proposed fix
Add
@selected="propagateSelected"to all four timeline component instances:<AlbumListView v-if="album_view_mode === 'list'" :albums="slotProps.item.data" :selected-ids="props.selectedAlbums" `@clicked`="propagateClicked" + `@selected`="propagateSelected" `@contexted`="propagateContexted" /> <AlbumThumbPanelList v-else :albums="slotProps.item.data" :selected-albums="props.selectedAlbums" `@clicked`="propagateClicked" + `@selected`="propagateSelected" `@contexted`="propagateContexted" />Repeat for the v-else section at lines 69-83.
🧹 Nitpick comments (1)
resources/js/components/gallery/albumModule/AlbumThumbPanel.vue (1)
123-125: 💤 Low valueConsider adding
propagateSelectedto theusePropagateAlbumEventscomposable.The existing
propagateClickedandpropagateContextedhandlers are provided by theusePropagateAlbumEventscomposable (line 121), butpropagateSelectedis manually defined here with identical logic. This creates minor code duplication and pattern inconsistency.♻️ Suggested refactor
Add
propagateSelectedto the composable and destructure it on line 121:-const { propagateClicked, propagateContexted } = usePropagateAlbumEvents(emits); +const { propagateClicked, propagateSelected, propagateContexted } = usePropagateAlbumEvents(emits);Then remove lines 123-125.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 36cadd23-d18a-4b27-adc6-d292695b1ff3
📒 Files selected for processing (12)
lang/en/gallery.phpresources/js/components/gallery/albumModule/AlbumListItem.vueresources/js/components/gallery/albumModule/AlbumListView.vueresources/js/components/gallery/albumModule/AlbumPanel.vueresources/js/components/gallery/albumModule/AlbumThumbPanel.vueresources/js/components/gallery/albumModule/AlbumThumbPanelList.vueresources/js/components/gallery/albumModule/PhotoThumbPanelList.vueresources/js/components/gallery/albumModule/thumbs/AlbumThumb.vueresources/js/components/gallery/albumModule/thumbs/PhotoThumb.vueresources/js/components/headers/AlbumHeader.vueresources/js/composables/selections/selections.tsresources/js/stores/ModalsState.ts
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4d584224-728d-4e24-9bf1-f08dc43b7a34
📒 Files selected for processing (23)
lang/ar/gallery.phplang/bg/gallery.phplang/cz/gallery.phplang/de/gallery.phplang/el/gallery.phplang/es/gallery.phplang/fa/gallery.phplang/fr/gallery.phplang/hu/gallery.phplang/it/gallery.phplang/ja/gallery.phplang/nl/gallery.phplang/no/gallery.phplang/pl/gallery.phplang/pt/gallery.phplang/ru/gallery.phplang/sk/gallery.phplang/sv/gallery.phplang/tr/gallery.phplang/vi/gallery.phplang/zh_CN/gallery.phplang/zh_TW/gallery.phpresources/js/components/gallery/albumModule/thumbs/AlbumThumb.vue
✅ Files skipped from review due to trivial changes (10)
- lang/no/gallery.php
- lang/es/gallery.php
- lang/pl/gallery.php
- lang/it/gallery.php
- lang/nl/gallery.php
- lang/sk/gallery.php
- lang/fr/gallery.php
- lang/ru/gallery.php
- lang/sv/gallery.php
- lang/tr/gallery.php
🚧 Files skipped from review as they are similar to previous changes (1)
- resources/js/components/gallery/albumModule/thumbs/AlbumThumb.vue
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
Fixes #1585
Summary by CodeRabbit
New Features
Localization