-
Notifications
You must be signed in to change notification settings - Fork 29
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
fix modal-subtask buttons on touch devices #3568
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes look good to me. I'm not sure why the tests are failing. There's nothing obvious in the changes that should break any tests. I think this can be merged once we've figured out why the tests failed.
...components/SubjectViewer/components/InteractionLayer/components/SubTaskPopup/SubTaskPopup.js
Outdated
Show resolved
Hide resolved
…ubjectViewer/components/InteractionLayer/components/SubTaskPopup/SubTaskPopup.js Co-authored-by: Jim O'Donnell <[email protected]>
Woopsie, thanks Jim. I've been trying to figure it out but my eyes burn now so i just submitted the pull request. Would love to know whats going on with it! |
Tests like this one have broken but this is a bad test anyway. Line 71 in 7869f1a
|
- add a `subtaskpopup-task` CSS class to task components. - use that class to find tasks in the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Staging branch URL:
https://github.com/zooniverse/front-end-monorepo/tree/fix-3344
Package
lib-classifier
lib-react-components
Linked Issue and/or Talk Post
Fixes #3344
Changes
Problem - the subtask modal buttons on 'Save and Close' and 'X' do not work on mobile devices. Pointer actions outside of task area for pop up is being overidden and being replaced by drag actions.
Analysis - The 'Save and Close' button, as well as the 'Close' (x) button were missing the property that the task area has (className="subtaskpopup-element-that-ignores-drag-actions"). This property doesn't allow the pointer actions to be overridden.
Solution - add the property to both the Save and Close button in a element and also to the element so that they ignore the drag actions (but only on those elements.)
See screen recording below.
View on an iPhone12Pro 390x844 at 125%
Screen.Recording.2022-08-23.at.16.14.11.mov
How to Review
Helpful explanations that will make your reviewer happy:
This is production env:
(https://local.zooniverse.org:3000/projects/maceb/drawing-project/classify/workflow/3614?reload=0&workflow=3614)
This is staging env.
https://local.zooniverse.org:8080/?env=staging&project=maceb%2Fdrawing-project&workflow=3614
To view the solved bug:
Ensure you have done yarn build on both lib-classifier and lib-react-components, then run yarn dev on app-project to run production env
To test on mobile, Safari v.15.6:
Which storybook stories should be reviewed?
This is lib-react components:
http://localhost:6006/?path=/story/components-movablemodal--sub-task&globals=locale:en;locales.en:English;locales.test:Test+Language
This is lib-classifier:
http://localhost:6007/?path=/story/drawing-tools-transcription-line--subtask&globals=locale:en;locales.en:English;locales.test:Test+Language
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
yarn panic && yarn bootstrap
ordocker-compose up --build
and FEM works as expectedGeneral UX
Example Staging Project: i-fancy-cats
https://local.zooniverse.org:3000/projects/maceb/drawing-project/classify/workflow/3614?reload=0&workflow=3614
Bug Fix
New Feature
Refactoring
Maintenance