-
Notifications
You must be signed in to change notification settings - Fork 435
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
feat(core): document store loader - swr in edit state #7552
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
No changes to documentation |
597cbf3
to
7e57e56
Compare
Component Testing Report Updated Oct 8, 2024 3:12 PM (UTC) ✅ All Tests Passed -- expand for details
|
7e57e56
to
b219e8d
Compare
b219e8d
to
79bc6c8
Compare
79bc6c8
to
e1fda2c
Compare
…ore" This reverts commit 72a05a7.
8f6b665
to
dba471c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Such a great improvement ✨⚡
id: idPair.publishedId, | ||
type: typeName, | ||
draft: draftSnapshot, | ||
published: publishedSnapshot, | ||
liveEdit, | ||
ready: true, | ||
transactionSyncLock, | ||
ready: !fromCache, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it make sense to pass fromCache
as a separate property on EditState? The granularity might be useful in certain cases (can do this later if the need arises though)
Description
Adds in memory swr cache to the documents edit state, allowing us to render them immediately when you open the form instead of having to wait for it to be fully loaded again.
It works for the following case:
Screen.Recording.2024-09-27.at.12.14.41.mov
What to review
Is this the right approach? Any side effects to consider that hasn't been considered here?
Testing
Existing tests have been updated with the changes introduced.
Notes for release
Adds swr cache for document edits state, navigating between previously visited documents in the studio is now instant