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

refactor(classifier): use VisX's built-in wheel zoom #6756

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

eatyourgreens
Copy link
Contributor

@eatyourgreens eatyourgreens commented Mar 13, 2025

A small refactor of VisXZoom to use zoom.handleWheel, from @visx/zoom, for wheel events. Wheel zoom speed is configured with the wheelDelta prop.

Please request review from @zooniverse/frontend team or an individual member of that team.

Package

  • lib-classifier

How to Review

https://localhost:8080/?env=staging&project=markb-panoptes/test-project-1-mb-fem-lab&workflow=3847

Wheel zoom shouldn't have changed. Scrolling up zooms out, scrolling down zooms in. The zoom speed is set by the wheelDelta function. I've left wheel event throttling in, but it might not be needed with the @visx/zoom wheel handler.

http://localhost:6006/?path=/story/subject-viewers-scatterplotviewer--selected-x-ranges

Light curves should still zoom in the x-axis without zooming in y.

Checklist

PR Creator - Please cater the checklist to fit the review needed for your code changes.
PR Reviewer - Use the checklist during your review. Each point should be checkmarked or discussed before PR approval.

General

  • Tests are passing locally and on Github
  • Documentation is up to date and changelog has been updated if appropriate
  • You can yarn panic && yarn bootstrap or docker-compose up --build and FEM works as expected
  • FEM works in all major desktop browsers: Firefox, Chrome, Edge, Safari (Use Browserstack account as needed)
  • FEM works in a mobile browser

General UX

Example Staging Project: i-fancy-cats

  • All pages of a FEM project load: Home Page, Classify Page, and About Pages
  • Can submit a classification
  • Can sign-in and sign-out
  • The component is accessible

Refactoring

  • The PR creator has described the reason for refactoring
  • The refactored component(s) continue to work as expected

A small refactor of `VisXZoom` to use `zoom.handleWheel`, from `@visx/zoom`, for wheel events. Wheel event handling is configured with the `wheelDelta` prop.
@eatyourgreens eatyourgreens force-pushed the refactor-visx-wheel-zoom branch from 0acbca9 to 7caaaf0 Compare March 13, 2025 11:50
@mcbouslog mcbouslog self-requested a review March 13, 2025 15:04
@coveralls
Copy link

coveralls commented Mar 13, 2025

Coverage Status

coverage: 84.825% (+9.3%) from 75.49%
when pulling 7caaaf0 on eatyourgreens:refactor-visx-wheel-zoom
into aed398d on zooniverse:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants