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

[docs-infra] Prefetch pages on hover #40314

Merged

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Dec 25, 2023

Inspired by #40313. The idea is to reproduce what we do for the side nav but for all the markdown links.

Before: https://deploy-preview-40310--material-ui.netlify.app/material-ui/getting-started/usage/

before.mov

After: https://deploy-preview-40314--material-ui.netlify.app/material-ui/getting-started/usage/

after.mov

We save 200ms in the page transition, that time here:

Screenshot 2023-12-25 at 18 26 10

This is a significant UX improvement on my end, but there is still a lot we could do to make the docs feel super responsive. It doesn't feel great yet.


In the future, we should be able to make the whole markdown a server-side component with Next.js link as client-side components. The whole React bypass with markdown is kind of crap.

@oliviertassinari oliviertassinari added performance enhancement This is not a bug, nor a new feature scope: docs-infra Specific to the docs-infra product labels Dec 25, 2023
@mui-bot
Copy link

mui-bot commented Dec 25, 2023

Netlify deploy preview

https://deploy-preview-40314--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 2aaf924

@oliviertassinari oliviertassinari merged commit ca66fbe into mui:master Jan 2, 2024
19 checks passed
@oliviertassinari oliviertassinari deleted the docs-infra-prefetch-on-hover branch January 2, 2024 15:02
@oliviertassinari
Copy link
Member Author

I'm excited about this change, a step toward a super slick docs experience 🧈

mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is not a bug, nor a new feature performance scope: docs-infra Specific to the docs-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants