From db32d520d1e2b7d2e880c68d4ebd5de2d28b8b08 Mon Sep 17 00:00:00 2001 From: Ankita Kinger Date: Sat, 17 Sep 2022 11:38:28 +0530 Subject: [PATCH] fix: Optimize reflows on the applications list page (#16812) * optimized the reflows * removed unneccessary changes * fixing a cypress test * updated a cypress test --- .../OtherUIFeatures/UpdateApplication_spec.js | 4 ++-- .../src/pages/Applications/ApplicationCard.tsx | 17 ++--------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/OtherUIFeatures/UpdateApplication_spec.js b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/OtherUIFeatures/UpdateApplication_spec.js index 4f81629cbe..1aa024de88 100644 --- a/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/OtherUIFeatures/UpdateApplication_spec.js +++ b/app/client/cypress/integration/Smoke_TestSuite/ClientSideTests/OtherUIFeatures/UpdateApplication_spec.js @@ -83,7 +83,7 @@ describe("Update Application", () => { ); }); - it("Updates the name of first application to very long name and checks whether update is reflected in the application card with a popover", () => { + it("Updates the name of first application to very long name and checks whether update is reflected in the application card with no popover", () => { cy.get(commonlocators.homeIcon).click({ force: true }); cy.get(homePage.searchInput).clear(); // eslint-disable-next-line cypress/no-unnecessary-waiting @@ -111,6 +111,6 @@ describe("Update Application", () => { .first() .find(homePage.applicationCardName) .trigger("mouseover"); - cy.get(".bp3-popover-target.bp3-popover-open").should("have.length", 1); + cy.get(".bp3-popover-target.bp3-popover-open").should("not.exist"); }); }); diff --git a/app/client/src/pages/Applications/ApplicationCard.tsx b/app/client/src/pages/Applications/ApplicationCard.tsx index 8c1a6935c5..cf77a2bba9 100644 --- a/app/client/src/pages/Applications/ApplicationCard.tsx +++ b/app/client/src/pages/Applications/ApplicationCard.tsx @@ -59,11 +59,7 @@ import { getIsErroredSavingAppName, } from "selectors/applicationSelectors"; import { Classes as CsClasses } from "components/ads/common"; -import { - isVerticalEllipsisActive, - truncateString, - howMuchTimeBeforeText, -} from "utils/helpers"; +import { truncateString, howMuchTimeBeforeText } from "utils/helpers"; import ForkApplicationModal from "./ForkApplicationModal"; import { Toaster } from "components/ads/Toast"; import { Variant } from "components/ads/common"; @@ -836,16 +832,7 @@ export function ApplicationCard(props: ApplicationCardProps) { isFetching={isFetchingApplications} ref={appNameWrapperRef} > - {isVerticalEllipsisActive(appNameWrapperRef?.current) ? ( - - {appNameText} - - ) : ( - appNameText - )} + {appNameText} {showOverlay && !props.isMobile && (