From 3a04fcecdbcc2e67adf0410f2c31a2c8e0207d1d Mon Sep 17 00:00:00 2001 From: Davit Darsavelidze <76407236+DaveDarsa@users.noreply.github.com> Date: Thu, 11 Jul 2024 11:16:53 +0400 Subject: [PATCH] Change: show count on system groups/users and toggle users on by default (#284) * show count on system groups/users and toggle users on by default * idle handler for delete user * change org table defaults and org project styles * remove leftover defaultviewoptions for projects * format --- cypress/e2e/organizations/users.cy.ts | 3 + .../Organizations/GroupMembers/index.js | 3 +- .../PaginatedTable/PaginatedTable.tsx | 77 ++++++-- .../ProjectGroupSkeleton.tsx | 14 +- .../ProjectGroupMembers/Styles.tsx | 9 + .../ProjectGroupMembers/index.js | 172 +++++++++--------- .../ProjectNotificationsSkeleton.tsx | 14 +- .../ProjectNotifications/Styles.tsx | 8 +- .../ProjectNotifications/index.js | 29 +-- .../Organizations/Projects/Styles.tsx | 24 ++- src/components/Organizations/User/index.tsx | 1 + src/components/Organizations/Users/index.js | 3 +- 12 files changed, 233 insertions(+), 124 deletions(-) diff --git a/cypress/e2e/organizations/users.cy.ts b/cypress/e2e/organizations/users.cy.ts index e3879b34..45678d36 100644 --- a/cypress/e2e/organizations/users.cy.ts +++ b/cypress/e2e/organizations/users.cy.ts @@ -17,6 +17,8 @@ describe('Org Users page', () => { aliasMutation(req, 'removeUserFromGroup'); aliasMutation(req, 'addGroupToOrganization'); }); + + registerIdleHandler('idle'); }); it('Creates a group', () => { @@ -29,6 +31,7 @@ describe('Org Users page', () => { }); it('Deletes user', () => { + cy.waitForNetworkIdle('@idle', 500); users.doDeleteUser(testData.organizations.users.email); }); diff --git a/src/components/Organizations/GroupMembers/index.js b/src/components/Organizations/GroupMembers/index.js index acb5164b..7df6e937 100644 --- a/src/components/Organizations/GroupMembers/index.js +++ b/src/components/Organizations/GroupMembers/index.js @@ -75,8 +75,6 @@ const GroupMembers = ({ projects, refetch, }) => { - const duRegex = new RegExp('^default-user@' + groupName.replace('project-', '') + '$', 'g'); - const [projectModalOpen, setProjectModalOpen] = useState(false); const [selectedProject, setSelectedProject] = useState(''); @@ -356,6 +354,7 @@ const GroupMembers = ({ defaultViewOptions={{ type: 'user', selected: false, + selectedOnZeroCount: true, }} />