Hacker News new | ask | show | jobs
by solardev 597 days ago
> Short story: there is no Undo-Redo.

OK, fair enough, but that doesn't have to preclude autosaving.

> If you implement auto-save, users will expect every click/keystroke to be saved. [...] Simply adding a 1-minute timer will make people lose work in the last minute.

I think a nicer compromise might be a simple debounced isDirty state. If it detects any changes, wait 5 or 10 seconds. If any more changes happen in that same time, wait again (up to some sane max, like a min or few). If no further changes, create a new automatic checkpoint.

It's usually not a big deal if someone loses 10 seconds of work. It is if they lose a few hours.

> Save button plays the role of making a checkpoint, trying out something, reverting if needed. With autosave this could be ruined.

Only if you make the autosave overwrite user checkpoints. Can't they produce their own separate bin of autosave checkpoints? Word has done that for decades, as have video games.

The user can choose to revert to "Blahblah save (10/31/24)" or "Autosave (3 min ago)".

Even if it is a generational thing, it's also just good UX IMO.

1 comments

You are right, having two buckets is probably the easiest way to solve this. Then when loading the page it'd ask what to do with the autosave version.
Thanks for considering it!