Automattic / Automattic/jetpack

Image Compare Block: avoid lagging when moving the slider too quickly

Open
#16,043 1 comment 0 reactions 0 assignees View on GitHub
[Block] Image Compare [Pri] Low Enhancement
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

This may be something that can only be addressed in [the Juxtapose library](https://github.com/NUKnightLab/juxtapose) itself, but noting it here for reference.

This only seems to happen with large images, and when using the slider quickly:

![2020-06-02 19-59-24 2020-06-02 20_02_11](https://user-images.githubusercontent.com/426388/83553814-15135300-a50c-11ea-97c7-73412dfb7a0f.gif)

As a comparison, this does not seem to happen with [the Twentytwenty jQuery Plugin](https://github.com/zurb/twentytwenty):

![2020-06-02 20-02-49 2020-06-02 20_09_31](https://user-images.githubusercontent.com/426388/83554404-ff525d80-a50c-11ea-8540-ee6f85b6cec5.gif)

Reported here:
https://wordpress.org/support/topic/the-new-before-after-image-comparison/

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with large images while moving the Image Compare slider quickly, using the attached comparison recordings and the linked Juxtapose library as context. Compare the behavior with the Twentytwenty jQuery Plugin; done means the Image Compare Block no longer visibly lags during rapid slider movement.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jquery
Domain
frontend, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.