From ca35ccbd35acf7e5b5c613d9a1602f2f5448eae5 Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Fri, 13 May 2022 15:52:58 -0400 Subject: [PATCH] PS-515 Fix/org users list performance (#1673) * [PS-515] Use virtual scroll to speed up long user lists WIP: this is currently showing a large blank area under the last user. Need to figure out why virtual-scroll-spacer is sized too large. * Fix cdk-virtual-scroll styling * Format csp for readability * Set Viewport height The viewport height was * Calculate viewport height from item size Virtual scroll viewports need set heights, we can emulate the old modal behavior by calculating an approximate height required by the viewport to display all items. It will not go beyond the window due to the `.modal-dialog-scrollable` class * Remove modal css changes * pr review --- src/app/modules/loose-components.module.ts | 3 - .../manage/entity-users.component.html | 94 +++++++++---------- .../manage/entity-users.component.ts | 11 +++ .../manage/organization-manage.module.ts | 13 +++ .../manage/collections.component.ts | 3 +- .../organizations/manage/groups.component.ts | 3 +- src/app/oss.module.ts | 2 + webpack.config.js | 56 ++++++++++- 8 files changed, 131 insertions(+), 54 deletions(-) rename src/app/{ => modules}/organizations/manage/entity-users.component.html (74%) rename src/app/{ => modules}/organizations/manage/entity-users.component.ts (93%) create mode 100644 src/app/modules/organizations/manage/organization-manage.module.ts diff --git a/src/app/modules/loose-components.module.ts b/src/app/modules/loose-components.module.ts index 89c0cb567b..9dc1a0d0c8 100644 --- a/src/app/modules/loose-components.module.ts +++ b/src/app/modules/loose-components.module.ts @@ -35,7 +35,6 @@ import { BulkStatusComponent as OrgBulkStatusComponent } from "../organizations/ import { CollectionAddEditComponent as OrgCollectionAddEditComponent } from "../organizations/manage/collection-add-edit.component"; import { CollectionsComponent as OrgManageCollectionsComponent } from "../organizations/manage/collections.component"; import { EntityEventsComponent as OrgEntityEventsComponent } from "../organizations/manage/entity-events.component"; -import { EntityUsersComponent as OrgEntityUsersComponent } from "../organizations/manage/entity-users.component"; import { EventsComponent as OrgEventsComponent } from "../organizations/manage/events.component"; import { GroupAddEditComponent as OrgGroupAddEditComponent } from "../organizations/manage/group-add-edit.component"; import { GroupsComponent as OrgGroupsComponent } from "../organizations/manage/groups.component"; @@ -245,7 +244,6 @@ import { OrganizationBadgeModule } from "./vault/modules/organization-badge/orga OrgCollectionAddEditComponent, OrgCollectionsComponent, OrgEntityEventsComponent, - OrgEntityUsersComponent, OrgEventsComponent, OrgExportComponent, OrgExposedPasswordsReportComponent, @@ -406,7 +404,6 @@ import { OrganizationBadgeModule } from "./vault/modules/organization-badge/orga OrgCollectionAddEditComponent, OrgCollectionsComponent, OrgEntityEventsComponent, - OrgEntityUsersComponent, OrgEventsComponent, OrgExportComponent, OrgExposedPasswordsReportComponent, diff --git a/src/app/organizations/manage/entity-users.component.html b/src/app/modules/organizations/manage/entity-users.component.html similarity index 74% rename from src/app/organizations/manage/entity-users.component.html rename to src/app/modules/organizations/manage/entity-users.component.html index beb9ff0acc..f4c157a941 100644 --- a/src/app/organizations/manage/entity-users.component.html +++ b/src/app/modules/organizations/manage/entity-users.component.html @@ -29,52 +29,52 @@ > {{ "loading" | i18n }} -