-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Per-user search history #7588
base: main
Are you sure you want to change the base?
Per-user search history #7588
Conversation
|
I just realized that Bluesky was on github and came to look into adding this exact feature. So happy to see a PR open already! |
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.
Nice, love this! Couple thoughts while we're at it:
- I'd like to avoid random strings for storage and converge around using
#/storage
interface if possible, lmk what you think of that, can chat in Slack - The
#/storage
interface is sync, which doesn't help here much, but makes stuff a little simpler - Could pry pull this out into a hook just for code clarity, can live in this file for now
9bd94a5
to
7d3ffe3
Compare
25f24c7
to
663c8c9
Compare
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.
Nice, works great, love the new utils
@@ -90,6 +97,7 @@ export function useProfilesQuery({handles}: {handles: string[]}) { | |||
const res = await agent.getProfiles({actors: handles}) | |||
return res.data | |||
}, | |||
placeholderData: maintainData ? keepPreviousData : undefined, |
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.
Oh didn't know they had a helper, v nice
Refactors the search history to partition the history by DID, so that history is unique to the logged-in account
I also changed it to use
react-query, since that's better for handling async statethe new MMKV storage!Test plan
Generate some search history
Switch to and from accounts to confirm it's partitioned