jaltekruse / Free-Math

An offline React web application for managing digital math homework
http://freemathapp.org
71 stars 18 forks source link

Add client app routing and fix back button behavior #13

Open jaltekruse opened 6 years ago

jaltekruse commented 6 years ago

After opening an assignment or the grading experience, hitting the back button will take uses away from the site, rather than back to the homepage.

Not quite sure how fluid the experience can be made in the case where several assignments are opened in succession. The auto-saved data could provide the last state of each assignment in most cases, with a message about the assignment missing from the auto-save list if it failed due to insufficient storage. This is not fully reliable because there is no server that holds onto the data that can always retrieve and document for a URL.

jaltekruse commented 4 years ago

This can be improved hopefully in the soon-to-be world of having google drive as an optional backend store. I do still want this to be optional, so it would be nice to implement back/forward history navigation using local storage to bring back the content that was being edited.

jaltekruse commented 3 years ago

This has been improved slightly with the introduction of the react free homepage, so if users start there before "launching the app" with the returning users button, at least the back button won't make them leave the site entirely.

It would still be nice to make the transition to the assignment editor or grading create history events as well. I don't want to break refresh though, so I probably want to couple this with using IndexedDB instead of localstorage for the recovery docs, it will still be local to the browser, but it doesn't have the strict size limitations (which currently makes recovery docs near useless when grading a class that includes a decent number of images.

One thought, I would like to put the object ID in the URL to allow refresh, but I'm afraid of users trying to share the URL with others, which won't work for docs that have only been saved local to their browsers.