From bbfcdb3d428b7485e42aeedf9435b3e8c642a7f5 Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Tue, 18 Mar 2025 14:01:18 +0530 Subject: [PATCH] chore: Improvements in image attachment viewer (#11040) This PR includes improvements in image attachment/gallery viewer: 1. Added double-click zoom functionality (depreciated click to zoom) 2. Implemented scroll zoom based on cursor position 3. Increase the zoom scale 4. Improved layout and styling for better usability Fixes https://linear.app/chatwoot/issue/CW-4127/zoom-images-from-a-specific-location ## How Has This Been Tested? Loom video https://www.loom.com/share/b21e00db3bc74231a90202eb6eb2fb5a?sid=a0651bf1-0952-430b-a5a9-83bf0858e059 --------- Co-authored-by: Pranav Co-authored-by: Shivam Mishra --- .../conversation/components/GalleryView.vue | 255 ++++++++---------- .../composables/spec/useImageZoom.spec.js | 141 ++++++++++ .../dashboard/composables/useImageZoom.js | 186 +++++++++++++ package.json | 2 +- pnpm-lock.yaml | 10 +- 5 files changed, 439 insertions(+), 155 deletions(-) create mode 100644 app/javascript/dashboard/composables/spec/useImageZoom.spec.js create mode 100644 app/javascript/dashboard/composables/useImageZoom.js diff --git a/app/javascript/dashboard/components/widgets/conversation/components/GalleryView.vue b/app/javascript/dashboard/components/widgets/conversation/components/GalleryView.vue index f6e496ce6..5c56639f4 100644 --- a/app/javascript/dashboard/components/widgets/conversation/components/GalleryView.vue +++ b/app/javascript/dashboard/components/widgets/conversation/components/GalleryView.vue @@ -1,10 +1,11 @@