Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Implement peer discovery #1117

Merged
merged 12 commits into from
Feb 22, 2024
Merged

Implement peer discovery #1117

merged 12 commits into from
Feb 22, 2024

Conversation

bfollington
Copy link
Collaborator

@bfollington bfollington commented Feb 16, 2024

Fixes #1084

We need to consider that neighbors won't be indexed retroactively unless we choose to re-index from sphere creation.

Changes

  • Introduce "Discover" tab
  • Index peers-of-peers as neighbors
  • Populate discover view using neighbors
  • Also list suggestions in "Add User" section (predicting user intent)

Screen.Recording.2024-02-20.at.2.38.43.pm.mov

Comment on lines 326 to 333
case let .requestFollowSuggestion(neighbor):
return update(
state: state,
actions: [
.form(.didField(.reset)),
.form(.petnameField(.reset)),
.form(.didField(.setValue(input: neighbor.identity.description))),
.form(.petnameField(.setValue(input: neighbor.name.description)))
],
environment: environment
)
}
Copy link
Collaborator Author

@bfollington bfollington Feb 20, 2024

Choose a reason for hiding this comment

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

Pre-populate the Add User form with the best name + DID

@@ -102,6 +102,7 @@ struct NotebookNavigationView: View {
}
}
}
.ignoresSafeArea(.keyboard, edges: .bottom)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

An attempt to fix the strange cutoff BG issue we've seen.

@bfollington bfollington marked this pull request as ready for review February 20, 2024 06:03
Copy link
Collaborator

@gordonbrander gordonbrander left a comment

Choose a reason for hiding this comment

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

A few design notes and a question. Otherwise LGTM.

Amazing work.

Copy link
Collaborator

Choose a reason for hiding this comment

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

High-level design feedback:

  • Tapping follow button on discover tab should show toggle follow/unfollow instead of disappearing user you followed.
    • Allows undoing accidental follows
    • Does not need to show up next time you load the view
  • "Follow a user" suggestions should show same view as discover.
    • Don't show DID. Too intimidating. We only show DID as a last resort when scanning or manually entering.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sounds good to me, I think there's room for visual improvement on the DiscoverUserView component in general but I didn't want to overcook the first pass.

Copy link
Collaborator

@gordonbrander gordonbrander left a comment

Choose a reason for hiding this comment

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

LGTM

@gordonbrander gordonbrander merged commit 76c77fe into main Feb 22, 2024
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Discovery: I want to find interesting content (via users to follow)
2 participants