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

Remove the Suspense boundary for individual items #15

Merged
merged 4 commits into from
Dec 8, 2021
Merged

Conversation

shuding
Copy link
Member

@shuding shuding commented Dec 7, 2021

As mentioned in #13 (comment), we think removing the spinners for individual items will reduce layout shift and improve the overall experience of this app.

@vercel
Copy link

vercel bot commented Dec 7, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/vercel/next-rsc-demo/FT3wzMadDiwbM3QeMpyKLJaE4Qkm
✅ Preview: https://next-rsc-demo-git-shu-0653.vercel.sh

@gaearon
Copy link
Collaborator

gaearon commented Dec 7, 2021

When I tried this locally I got weird hydration errors. Is that specific to me?

@shuding
Copy link
Member Author

shuding commented Dec 7, 2021

Not specific to you, that's something we are looking into — reverting to a previous Next.js release should fix it (#14).

@vercel-team
Copy link

vercel-team commented Dec 7, 2021

📝 Changed routes:

/rsc.server
Screenshot of /rsc.server
(view full size)

Commit 4a72a01 (https://next-rsc-demo-meerkdgkc.vercel.sh).

@gaearon
Copy link
Collaborator

gaearon commented Dec 7, 2021

Should we also fix up the parent suspense boundary to be more natural than a spinner? For example by giving body min height and then making the fallback empty, or something.

@shuding
Copy link
Member Author

shuding commented Dec 7, 2021

Good call, min div height with some skeletons inside (that matches the item height) will be better.

@shuding
Copy link
Member Author

shuding commented Dec 8, 2021

Updated with animating skeletons: https://next-rsc-demo-git-shu-0653.vercel.sh/rsc. Should be good for now I think.

@gaearon
Copy link
Collaborator

gaearon commented Dec 8, 2021

Can we make it so that the height of the skeleton is the same as the height of the content? Do we not know the number of the rows or the size of each?

Copy link
Collaborator

@gaearon gaearon left a comment

Choose a reason for hiding this comment

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

shipit

@shuding shuding merged commit 8a71052 into main Dec 8, 2021
@shuding shuding deleted the shu/0653 branch December 8, 2021 00:20
@shuding
Copy link
Member Author

shuding commented Dec 8, 2021

❤️

@gaearon
Copy link
Collaborator

gaearon commented Dec 8, 2021

Sometimes when I refresh I get this:

Screenshot 2021-12-08 at 00 23 51

Screenshot 2021-12-08 at 00 23 35

But not every time.

@gaearon
Copy link
Collaborator

gaearon commented Dec 8, 2021

When it's broken, I can see the scripts on the right are missing from the HTML:

Screenshot 2021-12-08 at 00 30 28

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.

3 participants