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

Peterson implement toast when user is already in a team #2332

Conversation

peterson337
Copy link
Contributor

Description

This PR has been opened to implement a toast notification that will be displayed when a user is added to a team they are already part of.

Related PRS (if any):

None

Main changes explained:

The component "AddTeamPopup.jsx" has been modified to implement the toast.

How to test:

  1. Check into current branch
  2. Do npm install and ... to run this PR locally
  3. Clear site data/cache
  4. Log in as an administrator or owner.
  5. You need to add your user to a team to test this PR.
  6. Go to view profile → Teams.
  7. Click on the button named "Assign Team".
  8. Select a team that your user has already been added to.
  9. Click on the button named "Confirm" and check if the toast appears.

Screenshots or videos of changes:

Peterson_Implement_toast_when_user_is_already_in_a_team

Note:

None

jennZhang93
jennZhang93 previously approved these changes Jun 8, 2024
Copy link
Contributor

@jennZhang93 jennZhang93 left a comment

Choose a reason for hiding this comment

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

Tested with owner account and feature work as intended. When trying to add a user to an existing team, the error pop up will appear. Good work!

image

shradac
shradac previously approved these changes Jun 8, 2024
Copy link
Contributor

@shradac shradac left a comment

Choose a reason for hiding this comment

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

Verified team assignment functionality for an admin user.
Confirmed error toast notification appears when already in the same team. Good work!

week1-5

@Logeshwari-Renu Logeshwari-Renu self-requested a review June 10, 2024 20:01
Copy link
Contributor

@Logeshwari-Renu Logeshwari-Renu left a comment

Choose a reason for hiding this comment

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

I have tested the PR as admin. Getting notification whenever try to add an already assigned team. Also the new team code is getting successfully added. The functionality works as intended.
PR2332

Copy link
Contributor

@Kavil-Jain-514 Kavil-Jain-514 left a comment

Choose a reason for hiding this comment

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

The functionality works when a new team is assigned to the user, and then the user is added to the same team again.
image

However, I am facing issues when the user is added again to the existing team. There is no response in the UI. Please check the video.

PR.2332.mp4

In the video, "The Test 2024" was the new team just added, while the "FanYangTestTeam" was the team the user was already in.

Copy link
Contributor

@KaushikMreddy KaushikMreddy left a comment

Choose a reason for hiding this comment

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

Hi Peterson,

I found 2 test cases in this PR, I've shown them below.

  1. Test case 1 :
  • Find a team that a user is already assigned to
  • Try adding yourself into the same team
  • The warning shows up
  • Here, I'm part of team 2023 and I try to add myself
    image
  • I get the warning
    image
  • Test case 1 works as expected
  1. Test case 2 :
  • Assign yourself a new team
  • Click confirm
  • The user is not added into that team until the user click save changes at the bottom of the page
  • But the assign team modal stays open, This needs to be closed after the user clicks confirm.
  • Since it stays open, if I click confirm again in the assign team modal, there is no response from the UI, nor is there any API call running.
  • I clicked confirm here, got the team assigned but the modal stayed open
    image
  • Even if I keep clicking confirm after that, there is no response anywhere
    image
  • Test case 2 is the issue

This may be linked to the previous user's requested changes. Please verify and update. If this is not linked to your task, I can raise a bug.

Copy link
Contributor

@Kavil-Jain-514 Kavil-Jain-514 left a comment

Choose a reason for hiding this comment

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

After your changes, I have reviewed the PR again. The problem I faced earlier was solved; I got the Toast error message for adding the user to an existing team. However, there is a new issue when I try to assign the user to a new team (which still needs to be added to the team list); I am facing errors. This was not the issue in my previous review. So your changes might have caused it.

I have attached the video for you to look over.

PR.2332-1.mp4

tianyangL11
tianyangL11 previously approved these changes Jun 15, 2024
Copy link

@tianyangL11 tianyangL11 left a comment

Choose a reason for hiding this comment

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

It work as expected. Great job!
a128d28cdc62ad072000bf6d1ee9888

aaryaneil
aaryaneil previously approved these changes Jun 15, 2024
Copy link
Contributor

@aaryaneil aaryaneil left a comment

Choose a reason for hiding this comment

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

Tested the PR and the changes work as expected and it won't let me add the user to the same team again.
Screenshot 2024-06-15 at 2 55 48 PM

@peterson337 peterson337 dismissed stale reviews from aaryaneil and tianyangL11 via 7d77727 June 17, 2024 21:16
KaushikMreddy
KaushikMreddy previously approved these changes Jun 22, 2024
Copy link
Contributor

@KaushikMreddy KaushikMreddy left a comment

Choose a reason for hiding this comment

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

Hi Peterson,

I found 2 test cases in this PR, I've shown them below.

  1. Test case 1 :
  • Find a team that a user is already assigned to
  • Try adding yourself into the same team
  • The warning shows up
  • Here, I'm part of team 2023 and I try to add myself
    image
  • I get the warning
    image
  • Test case 1 works as expected
  1. Test case 2 :
  • Assign yourself a new team
  • Click confirm
  • The user is not added into that team until the user click save changes at the bottom of the page
  • But the assign team modal stays open, This needs to be closed after the user clicks confirm.
  • Since it stays open, if I click confirm again in the assign team modal, there is no response from the UI, nor is there any API call running.
  • I clicked confirm here, got the team assigned but the modal stayed open
    image
  • Even if I keep clicking confirm after that, there is no response anywhere
    image
  • Test case 2 is the issue

This may be linked to the previous user's requested changes. Please verify and update. If this is not linked to your task, I can raise a bug.

Hi Peterson,

Test case 2 works as well. Duplicate team cannot be added and that is shown clearly using toast messages. Good work.

Copy link
Contributor

@Kavil-Jain-514 Kavil-Jain-514 left a comment

Choose a reason for hiding this comment

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

@one-community one-community added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Jul 17, 2024
@kabraambika kabraambika self-requested a review July 19, 2024 21:51
Copy link
Contributor

@kabraambika kabraambika left a comment

Choose a reason for hiding this comment

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

I have reviewed the frontend PR with latest backend development branch. Feature is showing toast in case of existing team as shown below and working fine in dark mode on as well.
Screenshot 2024-07-19 at 2 51 14 PM

Copy link
Contributor

@ishan-miglani ishan-miglani left a comment

Choose a reason for hiding this comment

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

the functionality works correctly. I am able to see the toast when I try to add user in a team they are already in. Thanks!

Screen.Recording.2024-07-19.at.6.05.53.PM.mov

Copy link
Contributor

@angelalalacheng angelalalacheng left a comment

Choose a reason for hiding this comment

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

Hi,
I use your branch Peterson_Implement_toast_when_user_is_already_in_a_team for frontend and latest development branch for backend. The new feature works good!

Screenshot 2024-07-21 at 4 50 37 PM

Screenshot 2024-07-21 at 4 52 42 PM

Copy link
Contributor

@SrikanthChowdary495 SrikanthChowdary495 left a comment

Choose a reason for hiding this comment

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

I have tested this PR. I tested with my account and the feature worked as intended. When trying to add a user to an existing team, the error pop-up will appear.

profile.mp4

Copy link

@SaiLavanya1 SaiLavanya1 left a comment

Choose a reason for hiding this comment

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

I tested the PR and observed that the toast notification works as expected. When trying to assign a user to a team they are already a part of, a toast notification appears indicating the user is already in the team. Additionally, when assigning the user to a new team, the confirmation toast displays successfully. The feature is functioning correctly, meeting the requirements outlined in the PR description.
Screenshot 2024-07-24 at 2 37 48 PM
Screenshot 2024-07-24 at 2 42 10 PM

Copy link
Contributor

@Pranay-ai Pranay-ai left a comment

Choose a reason for hiding this comment

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

Hey @peterson337
The PR is Working as Expected
Here is The screenshot
image

Thank You

@souravwalke
Copy link

I tested the PR and observed that the toast notification works as expected.

https://www.loom.com/share/dac7a28bc40d48f0b7daa3cf29e0c502?sid=eb2e97cc-53cd-457a-844f-45bd1e86e67c

@Annezhang673 Annezhang673 self-requested a review August 4, 2024 03:37
Copy link
Contributor

@Annezhang673 Annezhang673 left a comment

Choose a reason for hiding this comment

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

Function works as expected. I'm unable to assign myself to a team I'm already in as an admin.
PR2332

@Gmon-k
Copy link

Gmon-k commented Aug 7, 2024

I have tested from side and it is working as expected.

6

Copy link

@varunreddy03 varunreddy03 left a comment

Choose a reason for hiding this comment

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

I have tested this PR in owner account and this PR works as intended and I have also tested this even in dark mode, all the colors are vibrant and visible clearly. Great work!

PR 2332_1
PR 2332_2
PR 2332_3

@arunsrao9
Copy link

Tested with owner account and feature work as intended. When trying to add a user to an existing team, the error pop up will appear. Good work!
Screenshot 2024-08-10 at 8 20 18 PM

@one-community
Copy link
Member

Thank you all, merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible
Projects
None yet
Development

Successfully merging this pull request may close these issues.