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

Add a warning for unsaved work from the transcription task #2565

Merged
merged 7 commits into from
Dec 1, 2021

Conversation

eatyourgreens
Copy link
Contributor

@eatyourgreens eatyourgreens commented Nov 24, 2021

  • refactor TranscribedLinesConnector to use the withStores helper.
  • add the current annotation to TranscribedLines as a prop.
  • update the active annotation when we create a new transcription line from an existing line.

This PR adds annotation.update() to previously transcribed lines, which enables them to use the work-in-progress flag introduced in #2411 and #2415. It will also set them up to refresh auth tokens on update (#2563), which will allow volunteers to stay logged in when working on long pages.

Try it out on a test subject with many previously transcribed lines. If you edit a few lines, then reload the page, you should be warned that your work will be lost.

https://localhost:8080/?project=11300&subject=55414217&env=production&demo=true
Screenshot of a partially transcribed page, warning that unsaved work will be lost if you leave the page.

Package:
lib-classifier

Closes #2564.

Review Checklist

General

  • Are the tests passing locally and on Travis?
  • Is the documentation up to date?

Components

Apps

  • Does it work in all major browsers: Firefox, Chrome, Edge, Safari?
  • Does it work on mobile?
  • Can you yarn panic && yarn bootstrap or docker-compose up --build and app works as expected?

Publishing

  • Is the changelog updated?
  • Are the dependencies updated for apps and libraries that are using the newly published library?

Post-merging

@eatyourgreens eatyourgreens added bug Something isn't working refactor Refactoring existing code labels Nov 24, 2021
@eatyourgreens eatyourgreens requested review from a team and shaunanoordin November 24, 2021 11:23
@eatyourgreens
Copy link
Contributor Author

There's overlap here with #2558. I've kept those changes in a separate commit, to minimise conflicts.

@eatyourgreens eatyourgreens force-pushed the refactor-transcribed-lines branch from d1ca108 to eb1653f Compare November 30, 2021 14:15
@eatyourgreens eatyourgreens changed the title Add annotation.update() to the transcription task Add a warning for unsaved work from the transcription task Dec 1, 2021
@mcbouslog mcbouslog self-requested a review December 1, 2021 18:55
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.

Code changes LGTM. Tested and confirmed with transcribed lines in progress prompted if sure want to leave page (on multiple frames, with/without new lines).

@github-actions github-actions bot added the approved This PR is approved for merging label Dec 1, 2021
@mcbouslog mcbouslog merged commit 80de98c into master Dec 1, 2021
@mcbouslog mcbouslog deleted the refactor-transcribed-lines branch December 1, 2021 20:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved This PR is approved for merging bug Something isn't working refactor Refactoring existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Davy Notebooks transcription task doesn't warn about unsaved work
2 participants