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

Task/WP-32--onboarding page filter show incomplete #891

Merged

Conversation

asimregmi
Copy link
Contributor

Overview

The onboarding Admin page has checkbox to filter users whose onboarding steps aren't complete. This makes it easier to view users who have Allocations and System Access steps not completed.

Related

Changes

  • Added Checkbox component
  • Added new handler toggleShowIncomplete based on user interaction with checkbox
  • Replaced users with filteredUsers

Testing

  1. Create a new file users.jsx and add dummy users (https://gist.github.com/asimregmi/891566eab2ecf34b71d26f6d226be10c)
  2. Add the following code to OnboardingAdmin.jsx
    Import : import dummyusers from './users'
    In line 243, remove { users }
    In line 246: const users = useSelector((state) => dummyusers)

Another testing method: Add new entry to the props from the React dev tools, but might be inefficient

UI

image
image

Notes

Dummy Users file for testing

users.jsx

@codecov
Copy link

codecov bot commented Oct 25, 2023

Codecov Report

Merging #891 (373bc42) into main (1495914) will increase coverage by 0.00%.
The diff coverage is 87.50%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #891   +/-   ##
=======================================
  Coverage   63.38%   63.38%           
=======================================
  Files         430      430           
  Lines       12292    12297    +5     
  Branches     2541     2542    +1     
=======================================
+ Hits         7791     7795    +4     
- Misses       4292     4293    +1     
  Partials      209      209           
Flag Coverage Δ
javascript 69.74% <87.50%> (+<0.01%) ⬆️
unittests 56.99% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...ient/src/components/Onboarding/OnboardingAdmin.jsx 73.25% <87.50%> (+0.41%) ⬆️

@asimregmi
Copy link
Contributor Author

Chandra's comment on previous PR (closed)

comment does not add any more info in this, I think. Might as well remove it. useState helps us know that this is a set for showing incomplete only.

Chandra's comment on previous PR (closed)

could make it a bit more concise like this: suggestion
users.filter((user) => (showIncompleteOnly ? !user.setupComplete : true));

Fixed both of these.

@asimregmi asimregmi marked this pull request as ready for review October 25, 2023 23:43
@asimregmi asimregmi changed the title Task/wp 32 onboarding page filter show incomplete Task/WP-32--onboarding page filter show incomplete Oct 25, 2023
Copy link
Collaborator

@chandra-tacc chandra-tacc 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
Contributor

@sophia-massie sophia-massie left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks

@chandra-tacc chandra-tacc merged commit 8ac9be3 into main Oct 26, 2023
6 checks passed
@chandra-tacc chandra-tacc deleted the task/WP-32--onboarding-page-filter-show--incomplete branch October 26, 2023 16:46
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.

3 participants