Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Smooth out block editor loading state #1045

Merged
merged 4 commits into from
Dec 21, 2023
Merged

Conversation

gordonbrander
Copy link
Collaborator

Fixes #1043

We'll use this to present the editor when it is fully ready.
No sense in making this excessively complicated. Just use async/await to
get what we need in one effect.

Along the way, made changes an array so we can compose update functions.
Comment on lines +122 to +133
case loadRelated
case succeedLoadRelated(_ related: [EntryStub])
case failLoadRelated(_ error: String)
/// Load transcludes into cache for entire document
case loadTranscludes
case succeedLoadTranscludes([EntryStub])
case loadTranscludesFor(id: UUID, slashlinks: [Slashlink])
case succeedLoadTranscludesFor(
id: UUID,
fetched: [EntryStub]
transcludes: [EntryStub]
)
case failFetchTranscludesFor(id: UUID, error: String)
case failLoadTranscludesFor(id: UUID, error: String)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! This is exactly the flexibility I think we need to minimise perceived load time.

Copy link
Collaborator

@bfollington bfollington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@bfollington bfollington merged commit 43d24db into main Dec 21, 2023
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: 🌱 Done
Development

Successfully merging this pull request may close these issues.

Make block editor loading states smooth
2 participants