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

fix(drawing-tools): transcription line handles on smaller screens #6727

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

eatyourgreens
Copy link
Contributor

@eatyourgreens eatyourgreens commented Feb 27, 2025

  • Adjust the transcription line tool to use smaller handles on screens less than 900px wide. This may help with a problem where the line handles obscure the underlying text on tablets, or smaller desktop viewports.
  • Adjust the delete button (for all drawing tools) to have a smaller radius on smaller screens.
  • Adjust the delete button position so that it accounts for the angle of a transcription line.
  • Delete button position can be configured, in the code, as either before the line start or after the line end.

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

Package

lib-classifier/plugins/drawingTools

Linked Issue and/or Talk Post

How to Review

The drag handles at the ends of transcription lines should be a more reasonable size here, on smaller screens. I don't think the HANDLE_RADIUS constant affects the delete button, though. Updated to include the delete button too. The delete button position should also adjust when a line is rotated (#6727 (comment))

See #6723 (comment) for a screenshot of the line handles obscuring text on an iPhone.

Documentation Detectives in the dev classifier: https://localhost:8080/?project=bmtcollections/documentation-detectives-transcribing-accession-registers&env=production&workflow=26197

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

Bug Fix

  • The PR creator has listed user actions to use when testing if bug is fixed
  • The bug is fixed
  • Unit tests are added or updated

Adjust the transcription line tool to use smaller handles on screens less than 900px wide. This may help with a problem where the line handles obscure the underlying text on tablets, or smaller desktop viewports.
@coveralls
Copy link

coveralls commented Feb 27, 2025

Coverage Status

coverage: 75.525% (+0.03%) from 75.496%
when pulling 9e5d915 on eatyourgreens:transcription-line-handles
into fac6ca6 on zooniverse:master.

@eatyourgreens
Copy link
Contributor Author

eatyourgreens commented Feb 27, 2025

Screenshot for a ~800px tablet screen (emulated in Firefox.) The interactive buttons are a lot smaller. I'm not sure if that makes them easier to use, though.

The transcription task emulated on a tablet screen in Firefox. Drag handles and delete buttons are a lot smaller, and don't obscure the underlying text so much any more.

@eatyourgreens
Copy link
Contributor Author

eatyourgreens commented Feb 27, 2025

This is the delete button position with a negative, rather than positive, buffer ie. button to the left of the first point.

The transcription task on a tablet screen, but now the delete button appears to the left of a line's starting point.

If you're wondering why the delete button is so far away from the start of the line, there's a minimum separation between touch/click targets that I'm trying to adhere too: WCAG 2.5.8: Target Size (minimum.)

The delete button and the drag handle at the start of the line might still fail the overlapping 24px circle test: https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html#target-spacing-toolbar

My rough test is: when I have my finger on the first point of the line, is it also clicking the delete button? Is there sufficient affordance for people with shaky hands? Transcription workflows, in particular, might need affordances for an older audience.

@eatyourgreens eatyourgreens force-pushed the transcription-line-handles branch 2 times, most recently from 6471575 to dc84a93 Compare February 28, 2025 12:36
@eatyourgreens eatyourgreens force-pushed the transcription-line-handles branch from dc84a93 to 1995b38 Compare February 28, 2025 12:49
@eatyourgreens
Copy link
Contributor Author

eatyourgreens commented Feb 28, 2025

Delete button position now follows the line rotation angle on this branch, so that the delete button always precedes the start of the line.

Screen.Recording.2025-02-28.at.14.35.45.mov

@eatyourgreens eatyourgreens force-pushed the transcription-line-handles branch from b2f79dc to 9e5d915 Compare March 3, 2025 10:48
@mcbouslog mcbouslog self-requested a review March 4, 2025 15:15
@mcbouslog mcbouslog self-assigned this Mar 4, 2025
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.

3 participants