-
Notifications
You must be signed in to change notification settings - Fork 167
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
Add the option to add/edit team members in ZubHub (frontend) #734
Comments
Hello @iamhks, @srish, and @tuxology , with respect to this issue and following the instructions provided by @iamhks i have studied the backend APIs in zubhub_backend/zubhub/creators/views, specifically the RemoveGroupMemberAPIView and AddGroupMembersAPIView, I have gained a good understanding of the requirements I noticed a few inconsistencies in the UI that I believe I can help resolve
To contribute to resolving these issues, I have already started working on the UI by adding the Add member card and modifying the participant cards, as shown in the screenshotI am genuinely excited about working on this issue and believe I can make a positive impact. If possible, I kindly request to be assigned to this task. I am available to provide any additional information or collaborate with the team to ensure a successful outcome. |
Super good effort @Formasitchijoh. Agree with your observations please proceed. I have assigned the issue to you! Keep us posted. |
Thank you @iamhks , I will |
Hello @iamhks @srish @tuxology During the implementation, I encountered a challenge related to retrieving a user's membership for a particular team. The data served to the TeamMembers page using the getTeamMember and fetchpage APIs only included the member details without their membership information. To address this, I found a section in the getTeamMember code that was commented out. I uncommented and updated it, allowing me to retrieve the users' details along with their membership information.Currently, my focus is on adding users to a team. I came across an AddGroupMember view, which I assume is used for this purpose. However, when trying to access the page, I encountered the following error,as shown below which i am still figuring out I would appreciate more details on the groups feature so that I can better understand its functionality. Also, please let me know if I need to create a new design for the add member page I will continue my efforts in getting the groups and adding a member to a team. If you have any further guidance or suggestions, please let me know.Thank you |
@Formasitchijoh Teams and groups are the same thing. Can you share the url where you got this error? Usually teams/groups are created through /create-team/ and if you want to find a page to add group members you can use the addTeamMembers (Step2) page of team creation and create a new page. |
@iamhks Here it is creators/group/add-membersi tested using the django admin panel and it worked and ,but when i used it on the client side it didn't. Also i found an addTeamMembers api in the api.js file which used the used the url creators/${groupname}/add-members/` |
@Formasitchijoh Correct. So what I see is you've added the option to remove the team member from the members page. Awesome! As per this issue, we also need to add a new page taking reference from Step 2 of Create Team and use the same design. This page is what needs to be created to complete this issue. |
@iamhks That is the approach i am currently taking, because that was the closes page i could reuse for this issue, the challenge is displaying the single page ie the Step2 page,
But i still can't display the page, is there something else i am supposed to do |
@Formasitchijoh See that Step 2 page from CreateTeam is a part of CreatTeam.jsx and without that it won't work. You need to first remove the linking between them. The new AddGroupMembers should be a standalone page. Now, once you load that page, you can fetch the team details from the groupname and then prepopulate the usernames in admin/members field. The user can then make required changes and click on save which will make the api call. Another approach you can do is, since you have the remove functionality done already, you can simply keep the new page limited to adding a team member (i.e no need to populate anything in the input fields, just validate the username entered is already a part of the team or not and add them to the team) and for that too you already have the required api. I think if you figure out a way to make the Step2 page as standalone without relying on CreateTeam formik props then you should be good to complete it. |
Alright @iamhks , i think i will go with making the Step 2 of the createTeam a standalone page and populate it with the required data, This will help me understand the process better. |
Hello @iamhks with respect to our previous discussion on making the Step Two of the createTeam page a standalone page and to populate it with the required data, i succeded to do that and also add a member to a given team, the video below show details of how it is currenly working Record_2023_10_01_06_41_24_285.mp4I have some glitches in the pop up that displays the status of the team, i intend to fix that and make a PR for you to review. I have some questions i need clarifications on:when we talk of editing a member are we refering to editing his role from admin to member and vice versa or actually editing a members details(which i dont understand how a user should edit another users details for any reason even if he is the admin of a team) |
Hi @Formasitchijoh, Awesome work! |
Alright noted, i will update that, thank you |
Hello @iamhks updates about my work so far, i solved the issue i had with the pop up and managed to complete all add, edit and delete operation on a members of a team, what i am lacking as of now is to improve on the user experience by introducing alerts, on delete or editing a members Before editing a membersAfter toggling the roleI will continue working on improving the User experience and make a PR when i am done, thank you |
@Formasitchijoh You can show a toast message as an alert and also use the notifications api to send a notification to the members. But as of now we can go ahead and review the code. Can you make a PR? |
Okay @iamhks , I'll just clean up out the comment and make a PR |
Hi @Formasitchijoh in case this is taking longer than expect and you have some bottlenecks, I'm willing and available to help on this. |
Hello @yokwejuste , thank you for your help, and your right i was held up, but i have made a PR for the issue waiting for review, |
@iamhks i apologize for the delay , i just made a PR with some attached videos of the issue, Please kindly review it when you get the time |
@Formasitchijoh Hello are you still actively on this task? can i join it to complete it |
Description
Do a checkout to ZubHub in master branch, do local setup and create an account. Thereafter go to the profile page and click on Create Team. (You will need to change TEAM_ENABLED tag in the CreateTeam.jsx file to true for the page to load) Complete the steps and create a team. After it's successful you'll be redirected to the teams page. You will see there in no place to add/edit team members. Click on Members from the top of teams page and add another card which when clicked upon redirects to a new page where you can add/edit team members.
Learning objectives
Understand the backend api's present in zubhub_backend/zubhub/creators/views:
RemoveGroupMemberAPIView
AddGroupMembersAPIView
Todo
Add the feature to add/edit team members in the UI.
Designs
The text was updated successfully, but these errors were encountered: