Skip to content

Conversation

@david-crespo
Copy link
Collaborator

Figured out how to do it and it is good. Closes #1569. In the video a show that we avoid showing the skeleton on login and device token verify pages that do not have the grid lines.

2025-03-13-skeleton.mp4

@vercel
Copy link

vercel bot commented Mar 13, 2025

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

Name Status Preview Updated (UTC)
console ✅ Ready (Inspect) Visit Preview Mar 13, 2025 7:37pm

@david-crespo
Copy link
Collaborator Author

Ok I just noticed on the preview that in MSW banner mode, we need the banner on the loading state, otherwise the grid doesn't line up when the page pops in.

</Route>

<Route index element={<Navigate to={pb.projects()} replace />} />
<Route index loader={() => redirect(pb.projects())} />
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Without this, when loading the root (an extremely common thing to do) you'd see the skeleton flash and then it would go blank wile the loaders for the next route load. I think doing it this way is fine as long we never link to /, which we don't. We'll have to see if there's any weird behavior, though. I think another workaround would be to leave the element thing in place and give this route a loader that just calls the loader from the projects page, that way the loading time is spent with the fallback up.

@david-crespo david-crespo merged commit 72e2f0c into main Mar 13, 2025
7 checks passed
@david-crespo david-crespo deleted the skeleton-2 branch March 13, 2025 20:14
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.

Top-level loading state for initial pageload

2 participants