Skip to content
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

Picture viewer #2347

Closed
taoeffect opened this issue Sep 13, 2024 · 2 comments · Fixed by #2367
Closed

Picture viewer #2347

taoeffect opened this issue Sep 13, 2024 · 2 comments · Fixed by #2367
Assignees
Labels
App:Frontend Kind:Enhancement Improvements, new features, performance upgrades, etc. Note:UI/UX Priority:High

Comments

@taoeffect
Copy link
Member

Problem

We don't have a way to zoom the pictures to view them more closely.

Solution

Create a picture viewer so that when a picture attachment clicked (or tapped) then it is shown in a view in more detail similar to how other apps do it.

On mobile it should be very simple - simply make the picture full screen and make it possible to pinch to zoom in and out.

@taoeffect taoeffect added Kind:Enhancement Improvements, new features, performance upgrades, etc. App:Frontend Priority:High Note:UI/UX labels Sep 13, 2024
@SebinSong
Copy link
Collaborator

SebinSong commented Sep 18, 2024

@taoeffect
I'm referencing Slack's image viewer and it has 200% as the maximum zoom-in limit for all cases, regardless of how big/small the intrinsic image size is.

image

That's when it's viewed on desktop and on mobile-app it seems to allows more zoom-in (it's not sure as it doesn't show the in-app slider UI on mobile-app but it feels like 300 or 400%).

What do we want as the maximum value in our app?

@taoeffect
Copy link
Member Author

Let's go with 400% and if you feel that doesn't work well feel free to pick a value that you like better

SebinSong added a commit that referenced this issue Sep 29, 2024
SebinSong added a commit that referenced this issue Oct 15, 2024
SebinSong added a commit that referenced this issue Oct 21, 2024
taoeffect added a commit that referenced this issue Oct 21, 2024
* build the skeleton ImageViwerModal.vue / make sure it open/close

* add blurry bg / add modal-btn / implement onLoad handler

* calculation logic to determine the minimum zoom value

* update the min zoom calc logic again (incomplete)

* fix the initial render logic

* add zoom slider UI to the modal

* fix typo in slider component

* custom UI/UX for the slider / dynamic zoom update to the image

* extract PointerEventsMixin.js and add it to the image viewer

* allow moving around the image

* add some helper comments for auto-translation logic

* fix the broken blurry-bg and work on Greg's feedback

* make sure ImageViwerModal.vue is triggered by various call-to-actions

* implement zoom in/out triggered by wheel event

* pass image meta-data to ImageViewerModal.vue

* image metadata UI on the modal

* implement zoom/move by touch events

* fix/optimize zoom action by pinch gesture

* fix linter err

* make sure the color looks good in both themes

* use css transform() instead of updating width and height

* fix the slider bug / fix cypress failure

* typo in name / fix pinned-msg issue

* Fix for Greg CR 1.

* pass the zoom action point

* simplify auto-translation logic for when zoom without center-point

* zooming into a certain point

* percent x,y while pointed zoom action should be fixed

* fix the buggy zoom-into-certain-point

* fix linter err

* fix all bugs related to 'zoom-into-ceertain-point'

* uncomment the err handling logic

* resolve TODO: debouncing the resize handler

* Greg's CR / fix the bug where zoom-slider value is string

* fix the bug where pinch-out -> in is not seamless

* uncomment SW err handling

* comments update

* comment update again

* remove console.log

* cursor style

* implement instant zoom in/out upon single click

* fix the linter error

* make sure the logic is not executed in touch-devices

* update resizehandler

* minor consistency fix

---------

Co-authored-by: Greg Slepak <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App:Frontend Kind:Enhancement Improvements, new features, performance upgrades, etc. Note:UI/UX Priority:High
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants