Preload scaffolds for an almost-instant-loading user profile page #9172
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improve the loading states of the user profile page. This started with the observation that the drafts list was picking up a
limit: 20
and displaying more post-placeholders than it should. I fixed that, and went a little further and also made aSequencesGridItem
placeholder, and used the userpostCount
andsequenceCount
fields to get things to line up.I also did most of the setup for
UsersProfile
to have an instant-load from the Apollo cache, similar to the instant-load experience you get on post pages. However, there is still one server round trip spent with a blank page and a loading spinner, because to get a user out of the apollo cache we need the user _id, but the URL contains only the user slug, and I didn't manage to find an easy way to convert without a server round trip.┆Issue is synchronized with this Asana task by Unito