From f8bbc251d31a447e002a69e8b2a2d7e90d187e74 Mon Sep 17 00:00:00 2001 From: Samil Abud Date: Thu, 11 Apr 2024 19:26:35 -0400 Subject: [PATCH] Undo the change to fix animation image increasing the content height when SAML is enabled --- src/pages/signin/SignInPage.tsx | 6 +----- src/pages/signin/SignInPageLayout/index.tsx | 3 +-- src/pages/signin/SignInPageLayout/types.ts | 4 ---- src/styles/variables.ts | 1 - 4 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/pages/signin/SignInPage.tsx b/src/pages/signin/SignInPage.tsx index 083fe3f185a3..8bafaeca97b8 100644 --- a/src/pages/signin/SignInPage.tsx +++ b/src/pages/signin/SignInPage.tsx @@ -61,7 +61,6 @@ type RenderOption = { shouldInitiateSAMLLogin: boolean; shouldShowWelcomeHeader: boolean; shouldShowWelcomeText: boolean; - isSAMLEnabled: boolean; }; type GetRenderOptionsParams = { @@ -93,7 +92,7 @@ function getRenderOptions({ shouldShowAnotherLoginPageOpenedMessage, }: GetRenderOptionsParams): RenderOption { const hasAccount = !isEmptyObject(account); - const isSAMLEnabled = !!account?.isSAMLEnabled; + const isSAMLEnabled = true; //!!account?.isSAMLEnabled; const isSAMLRequired = !!account?.isSAMLRequired; const hasEmailDeliveryFailure = !!account?.hasEmailDeliveryFailure; @@ -124,7 +123,6 @@ function getRenderOptions({ shouldInitiateSAMLLogin, shouldShowWelcomeHeader, shouldShowWelcomeText, - isSAMLEnabled, }; } @@ -183,7 +181,6 @@ function SignInPageInner({credentials, account, activeClients = [], preferredLoc shouldInitiateSAMLLogin, shouldShowWelcomeHeader, shouldShowWelcomeText, - isSAMLEnabled, } = getRenderOptions({ hasLogin: !!credentials?.login, hasValidateCode: !!credentials?.validateCode, @@ -263,7 +260,6 @@ function SignInPageInner({credentials, account, activeClients = [], preferredLoc shouldShowWelcomeText={shouldShowWelcomeText} ref={signInPageLayoutRef} navigateFocus={navigateFocus} - isSAMLEnabled={isSAMLEnabled} > {/* LoginForm must use the isVisible prop. This keeps it mounted, but visually hidden so that password managers can access the values. Conditionally rendering this component will break this feature. */} diff --git a/src/pages/signin/SignInPageLayout/index.tsx b/src/pages/signin/SignInPageLayout/index.tsx index 873588b72e77..3532c17181db 100644 --- a/src/pages/signin/SignInPageLayout/index.tsx +++ b/src/pages/signin/SignInPageLayout/index.tsx @@ -33,7 +33,6 @@ function SignInPageLayout( shouldShowWelcomeText = false, navigateFocus = () => {}, children, - isSAMLEnabled = false, }: SignInPageLayoutProps, ref: ForwardedRef, ) { @@ -79,7 +78,7 @@ function SignInPageLayout( const scrollViewStyles = useMemo(() => scrollViewContentContainerStyles(styles), [styles]); - const backgroundImageHeight = Math.max(isSAMLEnabled ? variables.signInSAMLContentMinHeight : variables.signInContentMinHeight, containerHeight); + const backgroundImageHeight = Math.max(variables.signInContentMinHeight, containerHeight); return ( diff --git a/src/pages/signin/SignInPageLayout/types.ts b/src/pages/signin/SignInPageLayout/types.ts index 3eb1dab6d55a..6a3422f846d1 100644 --- a/src/pages/signin/SignInPageLayout/types.ts +++ b/src/pages/signin/SignInPageLayout/types.ts @@ -25,10 +25,6 @@ type SignInPageLayoutProps = { customHeroBody?: string; navigateFocus?: () => void; - - /** Whether to use the default minimun content height or the recommened one - * for login with SAML at the login page */ - isSAMLEnabled?: boolean; }; type SignInPageLayoutRef = { diff --git a/src/styles/variables.ts b/src/styles/variables.ts index 974f66860b27..ff1b20893110 100644 --- a/src/styles/variables.ts +++ b/src/styles/variables.ts @@ -148,7 +148,6 @@ export default { signInContentMaxWidth: 1360, signInHeroContextMaxWidth: 680, signInContentMinHeight: 800, - signInSAMLContentMinHeight: 1000, signInLogoHeightSmallScreen: 28, signInLogoHeight: 34, signInLogoWidth: 120,