lookit / lookit-api

Codebase for Lookit v2 and Experimenter v2. Includes an API. Docs: http://lookit.readthedocs.io/
https://lookit.mit.edu/
MIT License
10 stars 18 forks source link

auto-save code when users are logged out? #1171

Open raboody opened 1 year ago

raboody commented 1 year ago

TL;DR

If your login times out while editing a study, the current system allows you to continue editing study code, but when you try to save, it will redirect you to the login page and all your changes/code will actually be lost.

Narrative

It would be nice if, when you get auto-booted out after 24 hours, the website would also auto-save your study if you are currently editing your code. The work-around is of course just logging out and logging back in every morning (rendering this feature very much not critical). The pain comes in if you forget to do that, and then in the middle of making a bunch of edits you get auto-logged out. You will be able to continue making changes to your code, even if you have been logged out. But you will not be able to save them, because when you try you will be redirected to log in again, and nothing you did will be saved.

Acceptance Criteria

A precise description of how/when this issue will be considered closed, e.g.:

Implementation Notes

You are the experts and I don't really know if what I suggested is reasonable :)

becky-gilbert commented 1 year ago

Thanks for this suggestion @raboody! Another option might be for us to add a pop-up warning saying e.g. 'You will be logged-out in 5 minutes.' And I think the user should immediately be redirected to the login page when their credentials expire, to prevent the situation described here (researcher continues editing while logged out and then loses the work).

asfuchs6 commented 1 year ago

When editing the study code in Study Details>Protocol Configuration, the code should auto save in general OR there should be a button that allows users to save changes without having to leave that UI. Currently users have to click "Close">"Save changes" and then go back to the code if they want to continue editing but this is quite frustrating and tedious.