Skip to content
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: recover scrolled position after Library re-opening #6624

Merged
merged 7 commits into from
May 31, 2023

Conversation

arnostpleskot
Copy link
Contributor

Reopen the Library side panel and scroll to the same position as it was when closed. It also adds a skeleton placeholder, as it looks weird when the library is opened, scrolled down, and item content is still waiting to be rendered.

@arnostpleskot arnostpleskot requested a review from dwelle May 25, 2023 16:44
@arnostpleskot arnostpleskot self-assigned this May 25, 2023
@vercel
Copy link

vercel bot commented May 25, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
excalidraw ✅ Ready (Inspect) Visit Preview May 31, 2023 8:15am
excalidraw-package-example ✅ Ready (Inspect) Visit Preview May 31, 2023 8:15am
1 Ignored Deployment
Name Status Preview Updated (UTC)
docs ⬜️ Ignored (Inspect) May 31, 2023 8:15am

@dwelle
Copy link
Member

dwelle commented May 26, 2023

Since we've reintroduced the skeleton here, can we try delaying the render by a ~100ms (e.g. via CSS opacity transition delay somehow) so we can avoid the flicked on initial open of cached library? Don't know if it'll look good, but we can try it out.

previously, if closed while in throttle timeout, it would fire after it was closed and set the pos to invalid position
@arnostpleskot
Copy link
Contributor Author

@dwelle, thanks for the tweaks! Merging...

@arnostpleskot arnostpleskot merged commit 1e3c94a into master May 31, 2023
7 checks passed
@arnostpleskot arnostpleskot deleted the arnost/library-scroll-position branch May 31, 2023 08:22
alswl pushed a commit to alswl/excalidraw that referenced this pull request Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants