Skip to content

#2656: Fixed Settings page to show which team your in even when you have leadership role#3175

Merged
walker-sean merged 5 commits intodevelopfrom
#2656-user-settings-team-name
Feb 23, 2025
Merged

#2656: Fixed Settings page to show which team your in even when you have leadership role#3175
walker-sean merged 5 commits intodevelopfrom
#2656-user-settings-team-name

Conversation

@elbow74
Copy link
Copy Markdown
Contributor

@elbow74 elbow74 commented Jan 30, 2025

Changes

Fixed Settings page to show which team your in even when you have leadership role

Notes

Any other notes go here

Test Cases

  • Case A
  • Edge case
  • ...

Screenshots

Screenshot 2025-01-29 at 7 03 41 PM

To Do

Any remaining things that need to get done

  • item 1
  • ...

Checklist

It can be helpful to check the Checks and Files changed tabs.
Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.

  • [ x] All commits are tagged with the ticket number
  • [ x] No linting errors / newline at end of file warnings
  • [ x] All code follows repository-configured prettier formatting
  • [ x] No merge conflicts
  • [ x] All checks passing
  • [ x] Screenshots of UI changes (see Screenshots section)
  • [ x] Remove any non-applicable sections of this template
  • [ x] Assign the PR to yourself
  • [ x] No yarn.lock changes (unless dependencies have changed)
  • [ x] Request reviewers & ping on Slack
  • [ x] PR is linked to the ticket (fill in the closes line below)

Closes #2656

@vsp05
Copy link
Copy Markdown
Contributor

vsp05 commented Feb 2, 2025

LGTM! Great work! I'll ask sean to take a look at it once the issue with the tests is resolved

vsp05
vsp05 previously approved these changes Feb 6, 2025
Copy link
Copy Markdown
Contributor

@vsp05 vsp05 left a comment

Choose a reason for hiding this comment

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

great work! @walker-sean could you take a look when you get a chance?

jonathan-chen10
jonathan-chen10 previously approved these changes Feb 6, 2025
Copy link
Copy Markdown
Contributor

@jonathan-chen10 jonathan-chen10 left a comment

Choose a reason for hiding this comment

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

lgtm


const userTeams = teams.filter((team) =>
team.members.some((member) => member.userId === user.userId || team.head.userId === user.userId)
team.members.some(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The some calls its given callback for each item in the array, so we're potentially doing a lot of unnecessary checks here. Let's do it serially, checking if the user is in the team, then if the user is a lead, then if the user is the head.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

im pretty sure we have a userOnTeam function already that can be used

@elbow74 elbow74 dismissed stale reviews from jonathan-chen10 and vsp05 via fa2d16d February 13, 2025 00:22
Copy link
Copy Markdown
Contributor

@jonathan-chen10 jonathan-chen10 left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Copy Markdown
Member

@walker-sean walker-sean left a comment

Choose a reason for hiding this comment

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

LGTM

@walker-sean walker-sean merged commit 1f0a9c4 into develop Feb 23, 2025
@walker-sean walker-sean deleted the #2656-user-settings-team-name branch February 23, 2025 17:25
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.

User Settings team name

5 participants