forked from microbit-foundation/cctd-ml-machine
-
Notifications
You must be signed in to change notification settings - Fork 4
Migrate to IndexedDB with flagged support for multiple project storage #653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
microbit-robert
wants to merge
43
commits into
main
Choose a base branch
from
multiple-storage-flagged
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
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 Single project storage: Multiple project storage (you will need to set flags in localStorage to test page refreshing): |
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).
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 using the
multipleProjectsflag. This draft PR replaces both #639 and #644; review comments on these previous versions should have been addressed.TODO: