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: create group support multiple csv files #1419

Merged
merged 2 commits into from
Feb 10, 2025
Merged

Conversation

marlonkeating
Copy link
Contributor

Jira Ticket

This change fixes some bugs in the behavior of uploading csv lists of enterprise members to add to a new group.

Testing Instructions

  • Go to the admin-portal repo, pull down branch, and run npm run start:stage
  • Navigate to https://localhost.stage.edx.org:1991/alc-general/admin/people-management
  • Click 'Create group'
  • Upload csv file containing enterprise members
  • Click check box next to one of the added members, and click 'Remove'
  • Upload same csv file again
  • Verify the removed member was re-added

For all changes

  • Ensure adequate tests are in place (or reviewed existing tests cover changes)

Only if submitting a visual change

  • Ensure to attach screenshots
  • Ensure to have UX team confirm screenshots

Copy link

codecov bot commented Feb 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.44%. Comparing base (a95d20f) to head (77ed2af).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1419      +/-   ##
==========================================
- Coverage   86.44%   86.44%   -0.01%     
==========================================
  Files         660      660              
  Lines       14929    14923       -6     
  Branches     3168     3163       -5     
==========================================
- Hits        12906    12900       -6     
  Misses       1951     1951              
  Partials       72       72              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@jesperhodge jesperhodge left a comment

Choose a reason for hiding this comment

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

Great job, seems to work well, and I love the straightforward code you wrote. I just recommended adding one more test but otherwise everything super.


useEffect(() => {
debouncedHandleEmailAddressesChanged(emailAddressesInputValue);
}, [emailAddressesInputValue, debouncedHandleEmailAddressesChanged]);
Copy link
Member

Choose a reason for hiding this comment

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

I love the simplification. Having a useEffect that is triggered by an input change is an antipattern that creates problems, like in the bug I was working on. It's great that you just introduce a simpler function that is called directly.

test: create group remove and re-add user from csv file
@marlonkeating marlonkeating merged commit 1010d7d into master Feb 10, 2025
6 checks passed
@marlonkeating marlonkeating deleted the mkeating/ENT-9932 branch February 10, 2025 15:47
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.

2 participants