-
-
Notifications
You must be signed in to change notification settings - Fork 141
Show Users Their Own Follower Counts #1912
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
Show Users Their Own Follower Counts #1912
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
Just noticed #1910 is handling pagination for the other tabs. I'm going to make a separate PR to add pagination to the Followers Tab as well. |
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.
Love this - just a few small notes.
As for the questions:
- 👍 to using the FollowButton as opposed to the raw text. I'd be in favor of using that consistently across both the
Following
andFollowers
page (but that doesn't need to be part of this PR). - IMO the confirmation modal is less critical here given that the Follower won't disappear from the page if you unfollow them (because the page is showing people who follow you, regardless of if you follow them back) so it's easier for a user to just re-follow/unfollow if they misclick.
- Always happy to accept cleanup/refactor PRs, but we'd usually prefer them to be their own separate PR instead of rolled into another change. I would recommend touching base with the team before a big refactor just to avoid wasting effort.
- I'm 99% sure all users are expected to have profiles at this point, but older test data (especially on the dev site) might be wonky and broken. Feel free to point out any users you run into that are in this state and we'll see what we can do about making the world right.
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.
LGTM - Thanks for jumping on this!
That said, let's wait to merge until hack night tomorrow to make sure we're on top of the indexes.
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.
LGTM - as discussed, we can add pagination in another PR now that the other pagination updates have been merged.
Summary
Closes #1879
Checklist
Screenshots
Known issues
Button design
follow/unfollow
link for each user, butFollowUserButton
component instead. Looks better and had preset logic for following users.No confirmation modal
Dispersed/Stale Logic
This PR implements only what #1879 asks for, but I'm hoping y'all will allow some subsequent PRs where I try to clean some stuff up.
While coding, I kept finding more and more instances of stale code and dispersed/repeated logic that I really wanted to refactor away (my first go at this ticket, in fact, got carried away with refactoring).
If refactor PRs aren't welcome, just let me know.
Steps to test/reproduce
Run application server with
yarn dev:up
Note: It's possible the command will fail (as it did with me) due to the recent codebase upgrade to node 20. Use these commands to rebuild your images:
Spoof a Follower
[email protected]
with passwordpassword
.0BvO7rSlFjRVHuLfd7RlHRYg2DN2
), create a collection calledactiveTopicSubscriptions
, with document IDtestimony-05lcy6YQrPvPRvVPlZFbCA0O81TF
), keyuserLookup
and value of typemapping
. The mapping should have keyprofileId
set to your user's profile ID:05lcy6YQrPvPRvVPlZFbCA0O81TF
.public
(boolean) andfullName
(string).Check Followers tab in Edit Profile page
Edge Cases
Private follower
In firestore, set your followers' profile to private. Reload the Followers tab. The follower should now appear as an Anonymous User.
Public follower with no profile
Find a user ID in the dev server firestore that does not exist in the profiles collection and set that user to be a follower, exactly how you did in step 1. Reload the Followers tab. The follower should now appear as an Anonymous User.