fix: Optimize reflows on the applications list page (#16812)

* optimized the reflows

* removed unneccessary changes

* fixing a cypress test

* updated a cypress test
This commit is contained in:
Ankita Kinger 2022-09-17 11:38:28 +05:30 committed by GitHub
parent 75bac52626
commit db32d520d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 17 deletions

View File

@ -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");
});
});

View File

@ -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) ? (
<TooltipComponent
content={props.application.name}
maxWidth="400px"
>
{appNameText}
</TooltipComponent>
) : (
appNameText
)}
{appNameText}
</AppNameWrapper>
{showOverlay && !props.isMobile && (
<div className="overlay">