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

Mechanism to display already fetched reply when navigating to a dedicated post #57

Open
seanvelasco opened this issue Jun 3, 2024 · 0 comments

Comments

@seanvelasco
Copy link
Owner

When navigating to a post from a reply, we make a request to fetch the post data for that reply.

This takes time, and the page hangs for a bit with no feedback. For good networks, the change is instantaneous. For less ideal networks, the delay is noticeable. To reproduce, we can simulate 4G and 3G in dev tools.

However, we already know the reply data - its content, author, and engagement counts. What we don't have are the post above this post and its replies.

Figure out a way to display the already known post data, and then show loading spinners in place of the replies, while we are fetching the data. Twitter / X already does this.

UI-wise, we have no problem with layout shift with the posts above the main post because we position the post to be scrolled precisely to the top, below the header. In reality, the page will not jump - except when the images above has no known dimensions - but will just display a scrollbar that was not there before.

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

No branches or pull requests

1 participant