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

Data selection feedback for scatter plots #5857

Merged

Conversation

eatyourgreens
Copy link
Contributor

@eatyourgreens eatyourgreens commented Jan 17, 2024

Add feedbackBrushes, from PH-TESS, to the scatter plot viewer's Selections component. Show a green bar for each success, a red bar for each failure.

Disable the subject viewer so that annotations can't be edited in the feedback popup.

Add a selection feedback story, with mock feedback brushes.

Refactor ScatterPlotViewer so that it can be rendered with jsdom.

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

Package

lib-classifier

Linked Issue and/or Talk Post

How to Review

Run Black Hole Hunters in the standalone classifier and try the training workflow. Every subject should have feedback.
https://localhost:8080/?env=production&project=cobalt-lensing%2Fblack-hole-hunters&workflow=25860

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

New Feature

  • The PR creator has listed user actions to use when testing the new feature
  • Unit tests are included for the new feature
  • A storybook story has been created or updated

@eatyourgreens
Copy link
Contributor Author

Screenshots here: #5856 (comment)

@eatyourgreens eatyourgreens force-pushed the scatterplot-feedback-brushes branch from b202285 to 7699c60 Compare January 17, 2024 16:11
@coveralls
Copy link

coveralls commented Jan 17, 2024

Coverage Status

coverage: 81.292% (+0.06%) from 81.234%
when pulling cbf266f on eatyourgreens:scatterplot-feedback-brushes
into b6d5c4f on zooniverse:master.

Add `feedbackBrushes`, from PH-TESS, to the scatter plot viewer's `Selections` component. Show a green bar for each success, a red bar for each failure.

Disable the subject viewer so that annotations can't be edited in the feedback popup.

Add a selection feedback story, with mock feedback brushes.
@eatyourgreens eatyourgreens force-pushed the scatterplot-feedback-brushes branch from 108df7e to 5fc957c Compare January 18, 2024 12:00
@mcbouslog mcbouslog self-assigned this Jan 18, 2024
@eatyourgreens
Copy link
Contributor Author

eatyourgreens commented Jan 18, 2024

I've added a story and a couple of tests too. withParentSize won't render outside of a browser window, so I've refactored ScatterPlotViewer to work with jsdom. See the discussion here: airbnb/visx#951

I had to bump the storybook to 7.6.9 to get it to build without erroring. See #5861.

Refactor `ScatterPlotViewer` with `<ParentSize>` so that it can be rendered in JSDOM.
@eatyourgreens eatyourgreens force-pushed the scatterplot-feedback-brushes branch from 72c22fe to 6b1e607 Compare January 18, 2024 17:56
Copy link
Contributor

@mcbouslog mcbouslog left a comment

Choose a reason for hiding this comment

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

This looks good. Tested locally on https://local.zooniverse.org:3000/projects/cobalt-lensing/black-hole-hunters/classify/workflow/25860?demo=true without issue, feedback is as expected. The colors are a little confusing, but I know that's not related to these changes.

Testing on https://localhost:8080/?env=production&project=cobalt-lensing%2Fblack-hole-hunters&workflow=25860&demo=true resulted in two/duplicated Selections each time I made a Selection. I can not figure out why this is happening in lib-classifier, but not in app-project. 🤔 @eatyourgreens - do you see the same duplicated selections locally? Maybe it's me/my machine.

@eatyourgreens
Copy link
Contributor Author

@mcbouslog mcbouslog merged commit a73489f into zooniverse:master Jan 22, 2024
8 checks passed
@eatyourgreens eatyourgreens deleted the scatterplot-feedback-brushes branch January 22, 2024 20:04
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.

Graph2dRangeFeedback Doesn't show correct answers
3 participants