nusmodifications / nusmods

🏫 Official course planning platform for National University of Singapore.
https://nusmods.com
MIT License
575 stars 300 forks source link

Save / Load / History system #1

Closed thebengeu closed 10 years ago

thebengeu commented 12 years ago

From NUSMods Facebook page:

Lim Chai Hou Danny Hi! The URL's sharing nice, but once someone opens another's link, his/her own saved timetable appears to be overwritten by the timetable in the link.

Do you think disabling automatic saves when opening a link or even an explicit save/load function would work here?

Thanks for the great job as always :)

NUSMods.com · NUS CORS Module Finder & Timetable Builder (Unofficial) You're welcome! Yeah the current url is always saved regardless, hadn't gotten around to improving it yet.

Since the app's using localStorage not cookies, it should have at least 5MB at its disposal, enough to save ~40,000 unique timetable configurations of normal workload. So that opens up quite a few possibilities.

I'm thinking maybe something like a game: autosave the current configuration every time there's a change of modules, so there'd be a history stack which can be accessed fully via infinite scrolling, and also explicit saves, which will stay on top of the stack.

Then roll it all up in a autocompleting input like the one that adds modules, so could search through history by code/timestamp. Might be too much info/functionality to fit nicely, gotta see. What do you think?

Lim Chai Hou Danny wow. Actually, we can just have explicit saves and if time permits, autosaves that trigger at every page load and page unload/leave, since the change of mods can be reversed by using the browser's Back capability already (which may also trigger a lot of duplicates in the history stack)

The autosaves can still be scrolled & searched through and quickly loaded as you suggested. :)

NUSMods.com · NUS CORS Module Finder & Timetable Builder (Unofficial) Yeah have to figure out what level of granularity for autosaves would be most useful. Page load/unload definitely makes sense. Like you said, just add that and explicit saves for starters, then maybe see if any additional autosave points would be good.

When I said change of mods the idea is that it would autosave the last configuration for every unique set of mods within a session, so that you could compare between different sets without needing to explicitly save. But yeah might be too much noise.

thebengeu commented 10 years ago

56f0fa05f238ce6fdfdba4f3bd3db75fb1a74d5c adds the capability to replace a saved timetable with a shared timetable or restore the saved timetable, making bookmarked or otherwise saved links quite usable as a save/load/history system. Users are already familiar with the system for sharing URLs, so using that as the UI seems cleaner, unless there is demand otherwise.