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

Improve typeahead search with inclusion of followed users (temporary solution) #1612

Merged
merged 4 commits into from
Oct 5, 2023

Conversation

pfrazee
Copy link
Collaborator

@pfrazee pfrazee commented Oct 4, 2023

Uses a client-side cache of the followed users to prioritize the user's follows in autocomplete search (seach page, mentions).

Should replace this with serverside as the fetch of follows has to happen in pages (of 100) and stops at 1k, all of which adds more load than we want. Still, these results are much better

Before

CleanShot.2023-10-04.at.16.20.39.mp4

Notice how much I'm struggling to find ppl I know

After

CleanShot.2023-10-04.at.16.19.34.mp4

Eat viola, I'm immediately finding my friendos

@pfrazee pfrazee changed the title Improve typeahead search with temporary client inclusion of followed users Improve typeahead search with inclusion of followed users (temporary solution) Oct 4, 2023
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.

looks ok but not familiar with the code overall, lmk if you want closer testing.

have one concern about matching algorithm, commented

@@ -137,7 +137,7 @@ export class ProfileModel {
runInAction(() => {
this.followersCount++
this.viewer.following = res.uri
this.rootStore.me.follows.addFollow(this.did, res.uri)
this.rootStore.me.follows.hydrate(this.did, this)
Copy link
Contributor

Choose a reason for hiding this comment

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

Definitely a better name

@pfrazee pfrazee merged commit bd7db8a into main Oct 5, 2023
4 checks passed
@pfrazee pfrazee deleted the tmp-improve-typeahead branch October 5, 2023 23:44
estrattonbailey added a commit that referenced this pull request Oct 9, 2023
…e-post-tags-into-app

* origin/main: (40 commits)
  1.52
  README: tweaks to high-level context (#1625)
  Fix stuck lightbox header after double tap (#1627)
  Fix: add padding to the spinner bottom while loading threads (#1626)
  Rewrite Android lightbox (#1624)
  Dont trim before posting (close #1621) (#1622)
  Only listen to back button on android (#1623)
  Improve typeahead search with inclusion of followed users (temporary solution) (#1612)
  Slightly smaller highlighted post text (#1608)
  Pull upstream bugfixes to bottom-sheet (#1606)
  Fix animations and gestures getting reset on state updates in the lightbox (#1618)
  Remove unused lightbox options (#1616)
  Profile UI tweaks (#1607)
  Fix invite codes flash on desktop, use loading placeholder (#1591)
  Update to react-native@0.72.5 (#1599)
  Fixed a typo on the onboarding recommended screen (#1604)
  Onboarding & feed fixes (#1602)
  Improve time to content in the search page (#1603)
  Fix a potential reference error in bottombarweb (#1600)
  Fix: only use scroll-positioning control on thread when looking at replies (#1587)
  ...
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