-
Notifications
You must be signed in to change notification settings - Fork 29
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
lib-user: refactor group stats page header items and content per group, user, and membership #6095
Conversation
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.
I was able to join a public group at: https://local.zooniverse.org:3000/groups/1326991
I made contributions and left the group 👍 Once I left the group, the component refreshed and my account was removed from the contributors list.
I was a member of group https://local.zooniverse.org:3000/groups/1326984, which is a private, agg only group. When I left the group while viewing that url, the component did not refresh until I manually refreshed the page though, so I could still see the private group even though I was no longer a member. Just want to check if you're seeing the same behavior for private groups? If you need one of my private groups to test, here's a staging link: https://www.zooniverse.org/groups/1326995?join_token=0e834515f7390aa4
(Also note the group links in your PR description are all for production and would be easier to click if linked to app-root run locally).
Ack sorry about the links! I just copied them with the related button and forgot to find and replace the domain 🤦♂️ I've edited accordingly. |
Yes I saw the same behavior after leaving. I added a refactor to route a user to their profile page after if the membership delete is successful. I had an iteration that stayed on the group stats page if it was a public group, but thought that might be confusing? I could add that back, as I could see an argument accordingly (stay on group stats page if public, route elsewhere if private). I think there are a few other similar situations I can bring up in related user_group meeting. |
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.
Much better 🎉 When I join and then leave a private or public group, I get redirected.
-
Your comment above brings up a point I want to discuss too. Because a user's profile page is not part of the launch this summer (even though there is a matching new design), I don't think we should link users to it. I think when a user is viewing
/groups/[groupId]
the header "back" button should be to/users/[login]/groups
, aka My Groups. I don't think it makes sense to send a user "back" to PFE from any of the Groups related pages. For user stats pages, whenever a user is viewing/users/[login]/stats
I think the "back" button should be to Zooniverse homepage since they're signed in. Let's definitely chat at the next user groups meeting!Edit: Expanding on this comment ^ to add that when a user leaves a group, they should be redirected to the My Groups page, too.
-
To double check my understanding of top contributors - the classification count used for a group's contributors only applies when a contributor made the classifications while a member of the group. Is that correct? For instance, my staging account shows I made 7 classifications on Pizza Please via the profile ribbon, but as a member of group 1326986 I made 3 classifications, and therefore my username says "3 classifications" in top contributors of the group page.
|
||
if (typeof window === 'undefined' || isLoading) { | ||
return ( | ||
<p>Loading...</p> |
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.
Just a side note that you can now use <Loader/>
from lib-react-components for any loading UI if desired!
|
Noting these code changes include console logging the resource responses after an action (i.e. deleting a group), but I've included iterations on that in this subsequent PR (i.e. f8009e8). |
Package
Describe your changes
How to Review
Helpful explanations that will make your reviewer happy:
yarn dev
):Checklist
PR Creator - Please cater the checklist to fit the review needed for your code changes.
PR Reviewer - Use the checklist during your review. Each point should be checkmarked or discussed before PR approval.
General
yarn panic && yarn bootstrap
ordocker-compose up --build
and FEM works as expectedGeneral UX
Example Staging Project: i-fancy-cats
New Feature
Refactoring