Skip to content

Conversation

Ovgodd
Copy link
Collaborator

@Ovgodd Ovgodd commented Oct 15, 2025

Purpose

Introduce a loading skeleton in the DocEditor and manage its visibility using Zustand. Ensure the loader is removed properly in case of errors to prevent it from staying stuck on screen.

issue : 1452

nothrotskeleton.mp4

Proposal

  • Add a skeleton component to display while a document is being created
  • Use Zustand store to track the document creation state
  • Add onError handling to reset state on failure and avoid UI freeze
  • Add FadeIn & FadeOut animation, smoothing transition

@Ovgodd Ovgodd force-pushed the feat/doc-editor-skeleton branch from 9707dc5 to f976a72 Compare October 15, 2025 12:03
@github-actions
Copy link

github-actions bot commented Oct 15, 2025

Size Change: +3.6 kB (+0.1%)

Total Size: 3.67 MB

Filename Size Change
apps/impress/out/_next/static/68dca360/_buildManifest.js 0 B -880 B (removed) 🏆
apps/impress/out/_next/static/chunks/pages/401.js 2.27 kB +510 B (+29.04%) 🚨
apps/impress/out/_next/static/chunks/pages/404.js 2.06 kB +522 B (+33.98%) 🚨
apps/impress/out/_next/static/chunks/pages/docs.js 1.64 kB +525 B (+47.3%) 🚨
apps/impress/out/_next/static/chunks/pages/docs/[id].js 2.63 kB +589 B (+28.82%) 🚨
apps/impress/out/_next/static/chunks/pages/index.js 1.65 kB +523 B (+46.37%) 🚨
apps/impress/out/_next/static/chunks/pages/offline.js 6.73 kB +518 B (+8.33%) 🔍
apps/impress/out/_next/static/ab6e49e7/_buildManifest.js 879 B +879 B (new file) 🆕

compressed-size-action

@Ovgodd Ovgodd requested a review from AntoLC October 15, 2025 12:50
@Ovgodd Ovgodd self-assigned this Oct 15, 2025
@Ovgodd Ovgodd added frontend feature add a new feature triage labels Oct 15, 2025
@Ovgodd Ovgodd marked this pull request as ready for review October 15, 2025 12:51
@Ovgodd Ovgodd force-pushed the feat/doc-editor-skeleton branch from f976a72 to 5b99563 Compare October 15, 2025 13:41
Copy link
Collaborator

Choose a reason for hiding this comment

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

As talk together, maybe something very generic could be nice (BooleanStore ?), with Record<string, boolean>; to be able to have multiple toggles here and there.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

As we talk together afterwards, ye created an useSkeletonStore as we just need it for this specific case for the moment

overflow-x: clip;
`}
>
<DocCreationOverlay />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same I think it could be nice to have something more generic, that can be used for other things that DocCreation.
The problem that I find as well, is I get a bit the flickering effect, if we could implement a light transition before unmounting the skeleton would be great (fadeOut / fadeIn ?)

@Ovgodd Ovgodd force-pushed the feat/doc-editor-skeleton branch 4 times, most recently from 69846b2 to 09d8341 Compare October 22, 2025 06:13
@Ovgodd Ovgodd requested a review from AntoLC October 22, 2025 06:17
Copy link
Collaborator

@AntoLC AntoLC left a comment

Choose a reason for hiding this comment

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

I made a proposal to simplify a bit Skeleton.tsx, let me know if you find that suitable.

I think will should modify our commits, to talk about this new feature.

Comment on lines 201 to 204
// If we're in creation mode, the global skeleton is already displayed
// Otherwise, display the local skeleton
if (!doc) {
return <Loading />;
return isLoading ? null : <DocEditorSkeleton />;
Copy link
Collaborator

Choose a reason for hiding this comment

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

You should not need to do that, if you want to have the skeleton displayed when the page load, you just have to activate the skeleton like that setLoading(true);, at the earliest moment so maybe in DocLayout ?

@Ovgodd Ovgodd force-pushed the feat/doc-editor-skeleton branch 4 times, most recently from 6c84664 to caf41b3 Compare October 22, 2025 12:29
@Ovgodd Ovgodd requested a review from AntoLC October 22, 2025 12:30
@Ovgodd Ovgodd force-pushed the feat/doc-editor-skeleton branch 3 times, most recently from 3bb1706 to 3b86a77 Compare October 22, 2025 14:37
creating a skeleton to be display during doc creation

Signed-off-by: Cyril <c.gromoff@gmail.com>
@Ovgodd Ovgodd force-pushed the feat/doc-editor-skeleton branch from 3b86a77 to 546aeb5 Compare October 22, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants