-
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
fix: preload documents on hover #8110
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
No changes to documentation |
8a8513a
to
01e6688
Compare
Component Testing Report Updated Dec 20, 2024 1:59 PM (UTC) ❌ Failed Tests (1) -- expand for details
|
⚡️ Editor Performance ReportUpdated Fri, 20 Dec 2024 14:01:10 GMT
Detailed information🏠 Reference resultThe performance result of
🧪 Experiment resultThe performance result of this branch
📚 Glossary
|
8e35af9
to
2a8c6a8
Compare
@@ -124,14 +127,6 @@ export function PaneItem(props: PaneItemProps) { | |||
documentPresence, | |||
]) | |||
|
|||
const Link = useMemo( |
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.
Defining components during render should be avoided whenever possible 🙌
2a8c6a8
to
27f93ad
Compare
27f93ad
to
66c9ddf
Compare
@@ -89,7 +89,7 @@ export const Pane = forwardRef(function Pane( | |||
ref.current = refValue | |||
}, []) | |||
|
|||
useEffect(() => { | |||
useLayoutEffect(() => { |
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.
This fixes a long standing quirk where clicking on a document sees a weird initial layout shift before the panel is mounted 😮💨
f424f6c
to
58c157c
Compare
(did a rebase of this branch, fyi @stipsan) |
58c157c
to
7d9c5e6
Compare
7d9c5e6
to
e30f1a6
Compare
Description
By preloading the
editState
for a document it makes for a much snappier experience when navigating documents, here's a video demonstrating both side-by-side (with the new behavior on the left, and no preloading on the right):Screen.Recording.2024-12-19.at.14.33.33.mov
What to review
Is there enough inline context or should I add code comments?
Testing
Existing tests should capture regressions, otherwise the manual testing steps are demonstrated in the video 🙌
Notes for release
Added preloading of documents when hovering them in document list panes. This speeds up the experience of navigating between documents pretty significantly.