Skip to content

Migrate/group member list#393

Open
Pasindufdo98 wants to merge 17 commits intothoth-tech:9.xfrom
Pasindufdo98:migrate/group-member-list
Open

Migrate/group member list#393
Pasindufdo98 wants to merge 17 commits intothoth-tech:9.xfrom
Pasindufdo98:migrate/group-member-list

Conversation

@Pasindufdo98
Copy link

Migration : Group Member List

Description

This component displays the list of members in a selected group, allowing users to add new members or remove existing ones. Also manages related actions such as showing member details and updating the list when group data changes.

Before:
image

After:
image

Fixes # (issue)

How Has This Been Tested?

Tested by adding and removing members across different groups to confirm the list updates correctly and toolbar actions respond based on user role.

Testing Checklist:

  • Tested in latest Chrome
  • Tested in latest Safari
  • Tested in latest Firefox

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have requested a review on the Pull Request

@Pasindufdo98 Pasindufdo98 marked this pull request as ready for review August 14, 2025 19:41
@Pasindufdo98 Pasindufdo98 force-pushed the migrate/group-member-list branch from dfee0fa to 2e94aa9 Compare August 17, 2025 00:56
Copy link

@returnMarcco returnMarcco left a comment

Choose a reason for hiding this comment

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

Hi @Pasindufdo98,

This is a peer review (junior OR senior) for these changes.

All in all, the component is functioning as expected. I am able to add and remove members to and from a group, respectively. Good work. Below are some things that will need changing/investigating:

  1. Please remove the reference to the old .js component-file in doubtfire-angularjs.module.ts. This is causing the app to not load.

  2. I've noticed what seems to be potentially infinite triggering of the members() getter method highlighted in the below screenshot. I'm not sure if this behavior was present in the old component, but you can reproduce it by creating a group, and by putting a breakpoint on the method name shown in the below screenshot, this method should trigger on its own. If you step through the code in the debugger, you should notice that this method is constantly called in succession:

Screenshot 2025-08-17 151204
  1. The - sign on the Remove button seems like it needs a space between itself and the Remove text.
Screenshot 2025-08-17 150658

Once these requested changes have been made/investigated, please leave your response in this PR and re-request a review from me from the PR Reviewers list.

Cheers

@returnMarcco
Copy link

Hi @Pasindufdo98,

Can you please update the Migration Progress List section of README.MD.

Cheers

…e getters with fields, enabling OnPush change detection, and making member removal update the UI instantly.
@Pasindufdo98
Copy link
Author

Pasindufdo98 commented Aug 24, 2025

Hi @Pasindufdo98,

This is a peer review (junior OR senior) for these changes.

All in all, the component is functioning as expected. I am able to add and remove members to and from a group, respectively. Good work. Below are some things that will need changing/investigating:

  1. Please remove the reference to the old .js component-file in doubtfire-angularjs.module.ts. This is causing the app to not load.
  2. I've noticed what seems to be potentially infinite triggering of the members() getter method highlighted in the below screenshot. I'm not sure if this behavior was present in the old component, but you can reproduce it by creating a group, and by putting a breakpoint on the method name shown in the below screenshot, this method should trigger on its own. If you step through the code in the debugger, you should notice that this method is constantly called in succession:
Screenshot 2025-08-17 151204 3. The `-` sign on the `Remove` button seems like it needs a space between itself and the `Remove` text. Screenshot 2025-08-17 150658 Once these requested changes have been made/investigated, please leave your response in this PR and re-request a review from me from the PR `Reviewers` list.

Cheers

Hey @returnMarcco ,
Thanks for the catch Jason, the repeated calls were from the template getter being re-evaluated every change-detection pass. I did the fixes as follows and added some more improvements too.

Fixes implemented

  • Replaced get members()/sortedMembers() with fields, recalculated via resort() only when data or sort order changes.
  • Enabled ChangeDetectionStrategy.OnPush and added markForCheck() after async loads to trigger view updates when needed.
  • Updated removeMember to refresh local arrays so rows disappear right away, no page refresh needed.
  • Verified (members-loaded) output correctly toggles the toolbar.
  • The component now updates only when expected and avoids unnecessary cycles too.
image

@disururathnayake
Copy link

Hi @Pasindufdo98 ,

I have successfully pulled and reviewed your code. Nice work on the migration. The component is working as expected

Copy link

@returnMarcco returnMarcco left a comment

Choose a reason for hiding this comment

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

Hi @Pasindufdo98,

When I attempt to add a student to a group, that student doesn't seem to show in the list for me. Can you please check to see if you're experiencing the same?

Also, when I add a group to a group set and reload the page, the group no longer shows in the list (it exists in the database though). Can you confirm if this is the case for you? This probably isn't a result of your changes though.

Cheers

@Pasindufdo98 Pasindufdo98 force-pushed the migrate/group-member-list branch from f95ca2c to 1bdbb78 Compare August 27, 2025 13:46
@Pasindufdo98
Copy link
Author

Hi @Pasindufdo98,

When I attempt to add a student to a group, that student doesn't seem to show in the list for me. Can you please check to see if you're experiencing the same?

Also, when I add a group to a group set and reload the page, the group no longer shows in the list (it exists in the database though). Can you confirm if this is the case for you? This probably isn't a result of your changes though.

Cheers

Hi @returnMarcco ,
Thanks for reviewing again.

  • I fixed the issue with not updating member list in the frontend. Now it should be working when adding and removing a member without reloading.
  • When adding a group to a group set, it shows immediately without any error for me.
Screenshot (1715)

@Pasindufdo98 Pasindufdo98 force-pushed the migrate/group-member-list branch from 9e530f3 to 2c838a9 Compare September 7, 2025 09:35
@Pasindufdo98
Copy link
Author

Hi @Pasindufdo98,

When I attempt to add a student to a group, that student doesn't seem to show in the list for me. Can you please check to see if you're experiencing the same?

Also, when I add a group to a group set and reload the page, the group no longer shows in the list (it exists in the database though). Can you confirm if this is the case for you? This probably isn't a result of your changes though.

Cheers

Hey @returnMarcco,
I noticed this issue only occurs when signing in as an admin. I also tested it on the old AngularJS version and the same problem exists there, so it’s not introduced by my migration changes to group-member-list. When logged in as a convenor, the functionality seems to work as expected.

Copy link

@returnMarcco returnMarcco left a comment

Choose a reason for hiding this comment

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

Hey Pasindu,

I've left a few comments as feedback. Reach out if you have any questions.

Cheers

@Pasindufdo98 Pasindufdo98 force-pushed the migrate/group-member-list branch from ebeddc5 to 5eb8f8e Compare September 12, 2025 16:46
@Pasindufdo98 Pasindufdo98 force-pushed the migrate/group-member-list branch from 92144ff to 6d801db Compare September 13, 2025 12:06
@Pasindufdo98 Pasindufdo98 force-pushed the migrate/group-member-list branch from ff481f0 to 1691cc0 Compare September 15, 2025 04:57
@Pasindufdo98 Pasindufdo98 force-pushed the migrate/group-member-list branch from e59b7f7 to 5329318 Compare September 15, 2025 06:06
@Pasindufdo98 Pasindufdo98 force-pushed the migrate/group-member-list branch from 832d88a to 16bb4f5 Compare September 15, 2025 10:34
Copy link

@returnMarcco returnMarcco left a comment

Choose a reason for hiding this comment

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

Pre-approving this PR. Please see last recommended change. After making this change, please contact Brian as soon as possible so he can review this before opening an upstream PR. Good work.

@Pasindufdo98 Pasindufdo98 force-pushed the migrate/group-member-list branch from d839024 to d341287 Compare September 17, 2025 19:12
@Pasindufdo98
Copy link
Author

Latest Appearance
image

Copy link

@chelaz1234 chelaz1234 left a comment

Choose a reason for hiding this comment

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

Hi @Pasindufdo98,

Nice, thorough migration of group-member-list with clear commit structure. All functions are work as expected. Overall good job!

Copy link

@disururathnayake disururathnayake left a comment

Choose a reason for hiding this comment

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

Hi @Pasindufdo98 ,

I have successfully pulled and reviewed your code. Nice work on the migration. The component is working as expected

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.

4 participants