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

feat: New users page pending tab #31987

Merged
merged 88 commits into from
Jun 21, 2024
Merged

feat: New users page pending tab #31987

merged 88 commits into from
Jun 21, 2024

Conversation

rique223
Copy link
Contributor

@rique223 rique223 commented Mar 13, 2024

Proposed changes (including videos or screenshots)

This PR introduces a new pending users tab to the users page and a set of new features:

  1. The pending tab will list users that havent been activated yet or that have been activated but haven't logged in for the first time;
  2. The pending tab contains a counter that shows the number of users to be activated;
  3. A new "Pending action" column was introduced, this column displays which action the given user is pending to do/receive, be it activation or first time login;
  4. A new "actions" column was introduced in the users table, this column contains a kebab menu similar to the contextual bar one and, when inside of the pending tab, two new buttons:
    • Activate: Activates the user, its a shortcut to opening the kebab menu/contextual bar;
    • Resend welcome email: Resends the welcome e-mail to the given user, this serves as a reminder for the user to login for the first time;
  5. A new "Reason for joining" section has been introduced to the users page contextual bar, this section shows the message written by the given user when creating their account if the "Manually approve new users" setting was enabled;
  6. A callout component was introduced to the page and it will appear once the workspace exceeds its seats cap;
  7. Upon exceeding the seats cap the "Invite", "New User" and "Activate" buttons will now be disabled;
    ----------------------------------------- Changes after initial review -------------------------------------------------
  8. A refactor of the responsiveness of the users table as well as a change to the useBreakpoints hook in order not to use magical numbers;
  9. Introduced two new user-defined email validation methods for the AJV "format" field based on the emailValidator.ts:
    • basic_email: Simple validation that will only verify the existence of an @ symbol and characters before and after it;
    • rfc_email: More complex validation that aims at being more compliant with RFC 5322;
      This change solves an issue with the standard AJV email validation in which dotless emails were not being accepted.

Demo gif:
pending_users_tab

Issue(s)

Steps to test or reproduce

Further comments

Blocked by: #31917
Related to: #30236
Jira: WM-51

Created a helper function named isSMTPConfigured.ts to run when calling the smtp.check endpoint of the misc.ts group.
Created the two new endpoints that represent the back-end for the new users page.
Added a tab layout to the new users page, created the useFilteredUsers custom hook and implemented it. Also created necessary typing and translation entries.
Added a new column to the users table called registration status that shows the status of the current user. Also created new translation entries.
Added the pending tab to the new users page tab layout and implemented the usePendingUsersCount custom hook to fetch the users count number that will appear on the title of the tab.
Copy link

changeset-bot bot commented Mar 13, 2024

🦋 Changeset detected

Latest commit: 7be9720

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 34 packages
Name Type
@rocket.chat/meteor Minor
@rocket.chat/core-typings Minor
@rocket.chat/i18n Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/fuselage-ui-kit Major
@rocket.chat/gazzodown Major
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/rest-typings Minor
@rocket.chat/ui-contexts Major
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/api-client Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/mock-providers Patch
@rocket.chat/web-ui-registration Major
@rocket.chat/uikit-playground Patch
@rocket.chat/models Patch
@rocket.chat/ddp-client Patch
@rocket.chat/ui-avatar Major
@rocket.chat/ui-client Major
@rocket.chat/ui-video-conf Major
@rocket.chat/instance-status Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

codecov bot commented Mar 13, 2024

Codecov Report

Attention: Patch coverage is 60.55046% with 43 lines in your changes missing coverage. Please review.

Project coverage is 56.55%. Comparing base (fade5a2) to head (7be9720).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #31987      +/-   ##
===========================================
+ Coverage    56.54%   56.55%   +0.01%     
===========================================
  Files         2484     2487       +3     
  Lines        54755    54834      +79     
  Branches     11308    11331      +23     
===========================================
+ Hits         30959    31010      +51     
- Misses       21113    21129      +16     
- Partials      2683     2695      +12     
Flag Coverage Δ
e2e 56.22% <60.55%> (+0.02%) ⬆️
e2e-api 41.35% <ø> (-0.01%) ⬇️
unit 72.14% <ø> (-0.01%) ⬇️

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

Added the Pending action column to the users table of the pending tab, removed an unnecessary console.log and added the necessary translation entries to the i18n dictionary.
Implemented an actions section for the users page table with a menu similar to the one inside of the contextual bar and two new buttons exclusiive to the pending tab, an Activate button for admins to quickly activate users and and Resend Welcome Email for admins to remember users to login for the first time. Also changed some typings to better work with the new code and added the necessary translations.
Introduced a new field in the contextual bar on the users page named 'Reason for Joining'. This field will display the text that users entered when creating their accounts, but only if the 'Manually Approve New Users' setting is enabled. Additionally, reorganized the contextual bar to enhance clarity and have included the required translation entries in the i18n dictionary.
Implemented a callout component that will appear once the sets cap is exceeded and disabled the Activate, Invite and New user buttons when exceeded. Also added the necessary new translation entries to the i18n dictionary.
Gustrb
Gustrb previously approved these changes May 20, 2024
@casalsgh casalsgh modified the milestones: 6.9, 6.10 May 22, 2024
rique223 and others added 7 commits June 3, 2024 18:13
Improved the algorithm that finds the biggest max limit for the SubscriptionCalloutLimits component improving the overall time complexity of the process from O(nlogn) to O(n).
Created a new hook to expose the logic of the SubscriptionCalloutLimits component to be used externally of the component and implemented a new logic for the user panel callout that better follows the one that already exists.
@tassoevan tassoevan requested a review from ggazzo June 14, 2024 22:23
@tassoevan tassoevan dismissed ggazzo’s stale review June 18, 2024 21:13

everything was addressed, so far

@ggazzo ggazzo merged commit 5f95c4e into develop Jun 21, 2024
48 checks passed
@ggazzo ggazzo deleted the feat/new-user-panel-pending branch June 21, 2024 02:54
This was referenced Jun 22, 2024
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.

7 participants