From 4bffb9929c47a35948a7e5fe1c10bd1bd9fa597f Mon Sep 17 00:00:00 2001 From: Jorge Gonzalez <144717728+jorgeclaudiogonzalez-lyft@users.noreply.github.com> Date: Mon, 5 Aug 2024 07:29:36 -0600 Subject: [PATCH] frontend: fix step container height to match stepper container (#3064) ### Description - Match StepperContainer and StepContainer heights. **Before** **After** ### Testing Performed Manual --- frontend/packages/wizard/src/wizard.tsx | 9 ++++++--- .../tests/__snapshots__/reboot-instance.test.tsx.snap | 8 ++++---- .../ec2/src/tests/__snapshots__/resize-asg.test.tsx.snap | 8 ++++---- .../tests/__snapshots__/terminate-instance.test.tsx.snap | 8 ++++---- .../src/tests/__snapshots__/remote-triage.test.tsx.snap | 8 ++++---- .../k8s/src/tests/__snapshots__/delete-pod.test.tsx.snap | 8 ++++---- .../k8s/src/tests/__snapshots__/resize-hpa.test.tsx.snap | 8 ++++---- .../tests/__snapshots__/scale-resources.test.tsx.snap | 8 ++++---- 8 files changed, 34 insertions(+), 31 deletions(-) diff --git a/frontend/packages/wizard/src/wizard.tsx b/frontend/packages/wizard/src/wizard.tsx index 60c770b6b9..812970d98c 100644 --- a/frontend/packages/wizard/src/wizard.tsx +++ b/frontend/packages/wizard/src/wizard.tsx @@ -71,8 +71,8 @@ const Header = styled(Grid)<{ $orientation: MuiStepperProps["orientation"] }>( const Container = styled(MuiContainer)<{ $width: ContainerProps["width"] }>( { - padding: "32px", - height: "100%", + paddingBlock: "24px 32px", + height: "calc(100% - 56px)", }, props => ({ width: props.$width === "full" ? "100%" : "800px", @@ -104,6 +104,8 @@ const StyledStepContainer = styled(Grid)({ const StyledPaper = styled(Paper)(({ theme }: { theme: Theme }) => ({ boxShadow: `0px 5px 15px ${alpha(theme.palette.primary[600], 0.2)}`, padding: "32px", + maxHeight: "100%", + overflowY: "scroll", })); const Wizard = ({ @@ -234,7 +236,7 @@ const Wizard = ({ return ( - + {heading && (
{React.isValidElement(heading) ? ( @@ -250,6 +252,7 @@ const Wizard = ({ direction={orientation === "vertical" ? "row" : "column"} wrap="nowrap" spacing={2} + marginTop={0} > diff --git a/frontend/workflows/ec2/src/tests/__snapshots__/reboot-instance.test.tsx.snap b/frontend/workflows/ec2/src/tests/__snapshots__/reboot-instance.test.tsx.snap index fbdb53f202..e85583523d 100644 --- a/frontend/workflows/ec2/src/tests/__snapshots__/reboot-instance.test.tsx.snap +++ b/frontend/workflows/ec2/src/tests/__snapshots__/reboot-instance.test.tsx.snap @@ -3,13 +3,13 @@ exports[`renders correctly 1`] = `