Skip to content

"Auto-Save" persistent document storage #233

@Keavon

Description

@Keavon

We should store the open documents and the artwork within each document in localStorage or IndexedDB. Other state, like the current tool and working colors, would be a nice bonus. This helps restore previous sessions if the user accidentally closes the browser tab (for example, while intending to use a keyboard shortcut to close a document tab).

The UX of this should work based on the "Auto-Save" feature. When enabled, every change is saved locally and automatically restored on the next visit. When disabled, any saves are discarded and not saved, so the next visit will not reopen any saved documents.

IndexedDB should be used, not localStorage, because we want to store proper binary data and not be limited to a string. This is how VS Code's online editor (at vscode.dev) does it.

Soft-blocked on #324.

Metadata

Metadata

Assignees

Labels

WebInvolves web programming (TypeScript, Svelte, CSS)

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions