-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 resolution from post thread #4297
Conversation
nit completely remove did cache lookup move cache check for did to `usePostThreadQuery` remove resolution from post thread
Your Render PR Server URL is https://social-app-pr-4297.onrender.com. Follow its progress at https://dashboard.render.com/web/srv-cpco1jv79t8c738p5i80. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good stuff
Placeholders regressed. plc.mov |
} else if ( | ||
!isDid && | ||
quotedPost?.author.handle === atUri.host && | ||
quotedPost.uri.endsWith(atUri.rkey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels complicated. Ok but wondering if there are easier ways. I do think we need to pull this into a utility though cause the copy pasta is not obvious.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's at least extract isSamePostUri
or something
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- let's reduce duplication of the URI check (it's non-trivial)
- placeholders are broken
@gaearon can you check now if placeholders work? I can't repro the spinner even off the first commit and still can't, so not sure what happened there? Left a video on Slack. |
Why
In the continuous effort to remove waterfalls, we can now remove these requests from
getPostThread
. To do so however, we need to do a little bit of reworking on how we pull already-loaded posts from the cache.Currently we load the posts from the cache just based off of their URI. However, since we now are not going to have the resolved URI, we instead need to check both the handle and the rkey instead in our various
findAllPostsInQueryData
functions. This is a pretty straight forward change, though it adds a little extra logic.Test Plan
Note in the debugger that there are no more requests for DID resolutions when opening a post on a fresh load. Also note that whenever you open a post from these areas, there is no spinner: