-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
feat: New create user contextual bar #30582
Conversation
Created a new ui logic for the SetRandomPassword form with 2 radio buttons instead of a toggle and changed the email field to be the first one in the create user contextual bar.
|
Codecov Report
@@ Coverage Diff @@
## feat/user-panel #30582 +/- ##
===================================================
- Coverage 51.24% 51.20% -0.05%
===================================================
Files 808 809 +1
Lines 15122 15127 +5
Branches 2793 2794 +1
===================================================
- Hits 7750 7746 -4
- Misses 6928 6940 +12
+ Partials 444 441 -3
Flags with carried forward coverage won't be shown. Click here to find out more. |
Implemented the password verification and confirmation flows in the users page contextual bar, changed some types to follow the changes, removed the old Verified toggle and componentized the setRandomPassword radios.
Created a briefing text warning users of the new tab layout functionality in the new user contextual bar of the admin users page.
Created a button that will hide or show the custom fields of the new users form on click. Also added an icon to the user form title, changed the password field position in the form, removed the addon icons from some fields and created a new briefing message in the top of the form.
Created the logic that hides the custom fields of the new user form when the 'hide additional fields' button is clicked
Added a new screen to enhance the user creation experience. This screen appears immediately after you create a new user. On this page, you have two options: you can either complete the process and view the user you just created, or you can return to the form to create another user without exiting the contextual bar. Additionally, I've made some minor logic improvements and removed commented-out code.
Implemented logic to the user created contextual bar, now for each user created without exiting or refreshing the page the number of the message will be incremented by 1. Also stopped using the old Field.Component components in favor of their standalone versions and made the message of the Hide Additional Fields button change to Show additional fields when the fields are hidden.
Implemented a tooltip in the email verification field of the user creation contextual bar that explains what toggling on this field will do. Also implemented a way to use a single value in order to controll the setRandomPassword radios instead of two and added the necessary entries in the i18n to follow the aforementioned changes.
Changed the title of the "Only allow verified users to login" setting to "Require email verification to login" and its description from "Make sure you have correct SMTP settings to use this feature" to "Ensure SMTP is configured to enable this feature"
…ord is true Created some logic to make sure the requirePasswordChange field will be true even if the user changed it to false and then changed setRandomPassword to true. Also changed some strings and sizes to follow figma specs.
Removed un-optimal usage of the useEffect hook together with RHF's reset function, implemented a function that changes the requirePasswordChange value based on which setRandomPassword radio is checked, switched resetField for setValue to make sure the value is always correct, changed some rendering logic to make sure the first state of some fields is correct and optimized some parts of the getInitialValues function return.
Changed the name of the AdminUserSetRandomPassword component to AdminUserSetRandomPasswordRadios and created a new component called AdminUserSetRandomPasswordContent to organize and clean the AdminUserForm component.
Implemented a refecthUserData function for the AdminuserInfoWithData component that will run when the handleUpdateUser mutation is succesful to refetch the user data of the edited user. This fixes a bug in which the user form would show the old data instead of the updated one.
Proposed changes (including videos or screenshots)
Jira task: WM-88
Implemented new functionalities for the user creation contextual bar of the /admin/users page, these functionalities include (There's a lot of changes in this, if there is any issues understanding it please look at the figma in the jira task above or contact me):
setRandomPassword
from a ToggleSwitch to two radio buttons;PasswordVerifier
component for the password field;password
,passwordConfirmation
,PasswordVerifier
andrequirePasswordChange
when the 'Set Manually' is toggled on;verified
,password/setRandomPassword
andsendWelcomeEmail
are disabled if SMTP is not set;Require email verification to login
andEnsure SMTP is configured to enable
respectively;password/setRandomPassword
and the Email are disabled or enabled based on both the 'Only allow verified users to login' setting and the SMTP setting;Demo gif:
Issue(s)
Steps to test or reproduce
Further comments