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

feat: Zoomable image improvements #17431

Merged
merged 6 commits into from
May 21, 2024

Conversation

przemvs
Copy link
Contributor

@przemvs przemvs commented May 20, 2024

https://wearezeta.atlassian.net/browse/WPB-1445

Description

Improved Image zoom. Now user can click on image and zoom image to original width and height of image. User can change image position by dragging on image.

Details copied from JIRA:

Image gallery view:

  • Zoom in is available for any image in the gallery view that is not shown in 100% already
  • Cursor is changes to “zoom in” when zoom is available
  • When clicking, Image is zoomed to 100% (naturalHeight / naturalWidth)

Zoomed in view:

  • Cursor changes to “zoom out”
  • The image zooms in on the part of the image that the mouse pointer pointed to
  • The image can be scrolled in each direction with a smooth scrolling animation
  • The image can be dragged in each direction
  • No automatic scrolling when the cursor is moved (to reduce fidgety movement on the screen)
  • No additional zoom levels (for now) – just zoom in to 100%
  • When clicking, image is zoomed back to its previous scale

Screenshots/Screencast (for UI changes)

2024-05-20.21-20-02.mp4

Checklist

  • PR has been self reviewed by the author;
  • Hard-to-understand areas of the code have been commented;
  • If it is a core feature, unit tests have been added;

@codecov-commenter
Copy link

codecov-commenter commented May 20, 2024

Codecov Report

Attention: Patch coverage is 3.77358% with 102 lines in your changes are missing coverage. Please review.

Project coverage is 46.06%. Comparing base (373bd3f) to head (7b1ac5c).
Report is 24 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev   #17431      +/-   ##
==========================================
- Coverage   46.07%   46.06%   -0.01%     
==========================================
  Files         753      754       +1     
  Lines       24737    24789      +52     
  Branches     5669     5683      +14     
==========================================
+ Hits        11398    11420      +22     
- Misses      11910    11935      +25     
- Partials     1429     1434       +5     

@przemvs przemvs marked this pull request as ready for review May 20, 2024 19:24
@przemvs przemvs requested review from otto-the-bot and a team as code owners May 20, 2024 19:24
Copy link

sonarcloud bot commented May 21, 2024

Quality Gate Passed Quality Gate passed

Issues
4 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@PatrykBuniX PatrykBuniX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@przemvs przemvs merged commit fcd4d41 into dev May 21, 2024
11 checks passed
@przemvs przemvs deleted the feat/WPB-1445-zoomable-image-improvements branch May 21, 2024 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants