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

fix(ui): Fix incomplete list of member's teams #29134

Merged
merged 1 commit into from
Oct 7, 2021

Conversation

davidenwang
Copy link
Contributor

@davidenwang davidenwang commented Oct 7, 2021

Before:
image

After:
Kapture 2021-10-06 at 16 59 13

Due to switching settings from heavyweight org -> lightweight org, we no longer have access to all teams within the organizationMemberDetails.tsx view. Shown in the above example as the first screenshot does not include the 200th team (team_199)

In order to fetch a user's teams we must load them on the fly if they do not exist using the Teams utility. This also means we have to introduce a loading state for the TeamSelect component.

Note: The gif has an artificially long loading state of 2 seconds. Typically the user will not see the loading state for nearly this long

@davidenwang davidenwang changed the title Davidenwang/fix member teams fix(ui): Fix incomplete list of member's teams Oct 7, 2021
@davidenwang davidenwang changed the base branch from master to davidenwang/use-teams-slugs-fix October 7, 2021 00:01
@davidenwang davidenwang marked this pull request as ready for review October 7, 2021 00:03
@davidenwang davidenwang requested review from a team October 7, 2021 00:03
onAddTeam={this.handleAddTeam}
onRemoveTeam={this.handleRemoveTeam}
/>
<Teams slugs={member.teams}>
Copy link
Member

Choose a reason for hiding this comment

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

niceeeee

Copy link
Member

@evanpurkhiser evanpurkhiser left a comment

Choose a reason for hiding this comment

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

looking gooood. Do we have any tests to update?

@davidenwang
Copy link
Contributor Author

looking gooood. Do we have any tests to update?

Had a look at the tests and it seems like everything is fine. I could make a test to ensure that it fetches members teams if they aren't part of the store already, but I feel like that is just testing the useTeams component at that point so I think we're good here. @evanpurkhiser

@evanpurkhiser
Copy link
Member

nah, lets go

Base automatically changed from davidenwang/use-teams-slugs-fix to master October 7, 2021 00:12
Copy link
Member

@priscilawebdev priscilawebdev left a comment

Choose a reason for hiding this comment

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

lgtm

@davidenwang davidenwang merged commit 4a4df61 into master Oct 7, 2021
@davidenwang davidenwang deleted the davidenwang/fix-member-teams branch October 7, 2021 16:32
@github-actions github-actions bot locked and limited conversation to collaborators Oct 23, 2021
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.

3 participants