-
Notifications
You must be signed in to change notification settings - Fork 415
Feat/doc editor skeleton #1491
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
base: main
Are you sure you want to change the base?
Feat/doc editor skeleton #1491
Conversation
9707dc5
to
f976a72
Compare
Size Change: +3.6 kB (+0.1%) Total Size: 3.67 MB
|
f976a72
to
5b99563
Compare
src/frontend/apps/impress/src/features/left-panel/components/DocCreationOverlay.tsx
Outdated
Show resolved
Hide resolved
src/frontend/apps/impress/src/features/left-panel/components/DocCreationOverlay.tsx
Outdated
Show resolved
Hide resolved
src/frontend/apps/impress/src/features/docs/doc-editor/components/DocEditorSkeleton.tsx
Outdated
Show resolved
Hide resolved
src/frontend/apps/impress/src/features/docs/doc-editor/components/DocEditorSkeleton.tsx
Outdated
Show resolved
Hide resolved
src/frontend/apps/impress/src/features/docs/doc-editor/components/DocEditorSkeleton.tsx
Outdated
Show resolved
Hide resolved
src/frontend/apps/impress/src/features/docs/doc-editor/components/DocEditorSkeleton.tsx
Outdated
Show resolved
Hide resolved
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.
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.
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.
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 /> |
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.
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 ?)
69846b2
to
09d8341
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.
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.
src/frontend/apps/impress/src/features/skeletons/components/DocEditorSkeleton.tsx
Show resolved
Hide resolved
src/frontend/apps/impress/src/features/skeletons/store/useSkeletonStore.tsx
Outdated
Show resolved
Hide resolved
src/frontend/apps/impress/src/features/left-panel/components/LeftPanelHeaderButton.tsx
Outdated
Show resolved
Hide resolved
// 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 />; |
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.
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
?
6c84664
to
caf41b3
Compare
3bb1706
to
3b86a77
Compare
creating a skeleton to be display during doc creation Signed-off-by: Cyril <c.gromoff@gmail.com>
3b86a77
to
546aeb5
Compare
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