Migrate to IndexedDB with support for multiple project storage#653
Draft
microbit-robert wants to merge 59 commits intomainfrom
Draft
Migrate to IndexedDB with support for multiple project storage#653microbit-robert wants to merge 59 commits intomainfrom
microbit-robert wants to merge 59 commits intomainfrom
Conversation
Hopefully having this as a separate commit can make the diff easier to read.
Provide default values for project data and settings
Remove methods that are now unused.
Add new createdAt field used to sort actions and recordings when loaded from IndexedDB.
Can't use the migration function that creates uuids as the snapshot is different for every run.
Everything that updates multiple stores is now a transaction. Assert data loaded from storage. Update project 'updatedAt' when appropriate
This option is probably going away.
Simplify project deletion. Update project updatedAt for appropriate route changes.
When opening MakeCode, simply close other instances in other tabs/ windows
|
Preview build will be at https://review-createai.microbit.org/multiple-storage-flagged/ |
Move broadcast channel listener to navigate in response. Update projects on new / listing page when edits are made. Clear state when current project is deleted from another tab. Don't broadcast changes unnecessarily.
If there is no project id in session storage: Redirect to the home page for multiple projects. Redirect to the data page for a single project (and create new project).
It is increasingly difficult to manage the various changes with a feature flag. This makes it more likely that the IndexedDB storage change goes live with UI changes to support multiple projects.
It's not pretty but it's functional. List view is not yet implemented.
Project cards more card like. Tidy UI on "all projects" page. Add checkbox and menu to each project card.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates storage from localStorage to IndexedDB and allows the storage of multiple projects. This draft PR replaces both #639 and #644; review comments on these previous versions should have been addressed.
TODO: