-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
[#12749] Autosave and restore progress if user navigates away #13140
[#12749] Autosave and restore progress if user navigates away #13140
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.
Thanks for the PR, I think this is a really neat feature to have, but I have some comments on it.
Upon testing, it seems that the autosave works on the preview setting (preview as student) as well, however the reset button doesnt work in preview mode, and I'd have to manually delete the data for it to clear. I've attached a video snippet for your reference (apologies for the bad quality, had to fit it within 10mb, let me know if its too hard to see and ill re-record). Since this is just for previews, one method would be to disable this autosave mechanism when the feedback session is being previewed.
Screen.Recording.2024-07-11.at.11.26.48-1.mov
src/web/app/pages-session/session-submission-page/session-submission-page.component.ts
Outdated
Show resolved
Hide resolved
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.
LGTM, just a tiny nit. Good work on this
src/web/app/pages-session/session-submission-page/session-submission-page.component.ts
Outdated
Show resolved
Hide resolved
@Respirayson could you fix the failing component tests by updating the snapshots? thanks |
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.
LGTM! Great work
Fixes #12749
Outline of Solution
Description
This PR introduces autosave functionality for this feedback session page. The way that I implemented it ensures that users' responses are automatically saved after they have made a change.
Some key changes
1. Autosave Implementation
2. Loading autosaved data
3. Reset
git reset --hard
to help users get back to the original previous data that they had.Video Demo
Below is a video showcasing a really quick demo of what I've done:
https://github.com/Respirayson/teammates/assets/88478542/5eb944dc-37b2-4925-9b49-f46c22991558
And some screenshots:
Tooltip for relevant info
Reset button disabled when there are no changes
Also updated the grouped and ungrouped questions' UI