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

Use detailed profile view for getSuggestions #2596

Merged
merged 8 commits into from
Jun 25, 2024

Conversation

mozzius
Copy link
Member

@mozzius mozzius commented Jun 22, 2024

Allows us to show social proof in the suggested follows section. Includes a minor lexicon change from ProfileView to ProfileViewDetailed, but I don't think the AppView is doing much more work here - seems like it's fetching the detailed profile views already but just not sending them

@mozzius mozzius requested a review from devinivy June 22, 2024 17:05
Copy link
Member

@estrattonbailey estrattonbailey left a comment

Choose a reason for hiding this comment

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

Nice one! Get Devin's final sign off, but lgtm

"ref": "app.bsky.actor.defs#profileView"
"ref": "app.bsky.actor.defs#profileViewDetailed"
Copy link
Collaborator

@devinivy devinivy Jun 25, 2024

Choose a reason for hiding this comment

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

One intentional feature of the way knownFollowers was added to ViewerState is that it's decoupled from whether we serve a ProfileView vs. ProfileViewDetailed. This is nice because it means we can sprinkle knownFollowers wherever we want it without converting all those areas to detailed views.

@mozzius @estrattonbailey How would we feel about instead leaving the lexicons unchanged and just adding knownFollowers into the ViewerStates served from this endpoint?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd be perfectly happy with this!

This reverts commit f0b167d.

Revert "update snapshot test for getSuggestions"

This reverts commit 2160951.

Revert "finish running the codegen"

This reverts commit 8bf3150.
@mozzius mozzius requested a review from devinivy June 25, 2024 13:49
@mozzius
Copy link
Member Author

mozzius commented Jun 25, 2024

@devinivy I added a profileKnownFollowers view that extends the basic profile view with just the known followers. lemme know if that's the right way to do it

Copy link
Collaborator

@devinivy devinivy left a comment

Choose a reason for hiding this comment

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

Good stuff!! Adding a new view like this is a simple improvement, hard to go wrong 👍

I think we'll still want to align what we're hydrating with what we're presenting, which this change doesn't quite get us. But I can hit that in some followup work. In the spirit of keeping all the view/hydration wires exposed in the route handlers, the way I'd do this would probably be to add an option to the profile hydration and profile view methods that determines whether knownFollowers should be included.

@devinivy devinivy merged commit 4ddf457 into main Jun 25, 2024
10 checks passed
@devinivy devinivy deleted the samuel/detailed-suggestions branch June 25, 2024 15:13
estrattonbailey added a commit that referenced this pull request Jun 26, 2024
* origin/main:
  Appview: simple fix for no-hosted known followers (#2609)
  bsky: syntax typo in README (#2601)
  Use detailed profile view for `getSuggestions` (#2596)
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