Skip to content

Commit

Permalink
Undo the change to fix animation image increasing the content height …
Browse files Browse the repository at this point in the history
…when SAML is enabled
  • Loading branch information
samilabud committed Apr 11, 2024
1 parent 280d5ef commit f8bbc25
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 12 deletions.
6 changes: 1 addition & 5 deletions src/pages/signin/SignInPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ type RenderOption = {
shouldInitiateSAMLLogin: boolean;
shouldShowWelcomeHeader: boolean;
shouldShowWelcomeText: boolean;
isSAMLEnabled: boolean;
};

type GetRenderOptionsParams = {
Expand Down Expand Up @@ -93,7 +92,7 @@ function getRenderOptions({
shouldShowAnotherLoginPageOpenedMessage,
}: GetRenderOptionsParams): RenderOption {
const hasAccount = !isEmptyObject(account);
const isSAMLEnabled = !!account?.isSAMLEnabled;
const isSAMLEnabled = true; //!!account?.isSAMLEnabled;

Check failure on line 95 in src/pages/signin/SignInPage.tsx

View workflow job for this annotation

GitHub Actions / Run ESLint

Expected exception block, space or tab after '//!' in comment
const isSAMLRequired = !!account?.isSAMLRequired;
const hasEmailDeliveryFailure = !!account?.hasEmailDeliveryFailure;

Expand Down Expand Up @@ -124,7 +123,6 @@ function getRenderOptions({
shouldInitiateSAMLLogin,
shouldShowWelcomeHeader,
shouldShowWelcomeText,
isSAMLEnabled,
};
}

Expand Down Expand Up @@ -183,7 +181,6 @@ function SignInPageInner({credentials, account, activeClients = [], preferredLoc
shouldInitiateSAMLLogin,
shouldShowWelcomeHeader,
shouldShowWelcomeText,
isSAMLEnabled,
} = getRenderOptions({
hasLogin: !!credentials?.login,
hasValidateCode: !!credentials?.validateCode,
Expand Down Expand Up @@ -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. */}
Expand Down
3 changes: 1 addition & 2 deletions src/pages/signin/SignInPageLayout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ function SignInPageLayout(
shouldShowWelcomeText = false,
navigateFocus = () => {},
children,
isSAMLEnabled = false,
}: SignInPageLayoutProps,
ref: ForwardedRef<SignInPageLayoutRef>,
) {
Expand Down Expand Up @@ -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 (
<View style={containerStyles}>
Expand Down
4 changes: 0 additions & 4 deletions src/pages/signin/SignInPageLayout/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
1 change: 0 additions & 1 deletion src/styles/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ export default {
signInContentMaxWidth: 1360,
signInHeroContextMaxWidth: 680,
signInContentMinHeight: 800,
signInSAMLContentMinHeight: 1000,
signInLogoHeightSmallScreen: 28,
signInLogoHeight: 34,
signInLogoWidth: 120,
Expand Down

0 comments on commit f8bbc25

Please sign in to comment.