Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(app): set max height for desktop modal shell #14915

Merged
merged 3 commits into from
Apr 16, 2024
Merged

Conversation

ncdiehl11
Copy link
Collaborator

@ncdiehl11 ncdiehl11 commented Apr 16, 2024

closes RQA-2279

Overview

We special-cased the size of the modal shell to accommodate a large body for the 96-channel pipette attachment BeforeBeginning step to avoid scrollable content. The size was set to 70% of the screen, but that resulted in a lot of modal whitespace when the app was resized to larger than default dimensions. Here, I add a max height of 31rem to accommodate the content of the largest pipette wizard flow tile content without growing arbitrarily large with a resized desktop app. I also ensure minimum padding between tile content and footer buttons, and fix padding on the ChoosePipette tile.

Test Plan

  • launch 96-channel attachment wizard flow
  • resize desktop app to larger than default in the vertical direction
  • observe that modal shell does not resize to larger than the content

I also smoketested various wizard flows that use LegacyModalShell.

Screenshot 2024-04-16 at 10 11 31 AM

Changelog

  • set special-cased LegacyModalShell height to constant rather than percentage to not grow with resized app
  • add padding between body and bottom buttons of GenericWizardTile
  • set explicit max height to 31rem for LegacyModalShell if not full screen
  • fix container padding for ChoosePipette

Review requests

frontend friends

Risk assessment

low

We special-cased the size of the modal shell to accommodate a large body for the 96-channel pipette
attachment BeforeBeginning step to avoid scrollable content. The size was set to 70% of the screen,
but that resulted in a lot of modal whitespace when the app was resized to larger than default
dimensions. Here, I add a max height of 31rem to accommodate the content of the largest pipette
wizard flow tile content without growing arbitrarily large with a resized desktop app. I also ensure
minimum padding between tile content and footer buttons, and fix padding on the ChoosePipette tile.
@ncdiehl11 ncdiehl11 marked this pull request as ready for review April 16, 2024 14:12
@ncdiehl11 ncdiehl11 requested a review from a team as a code owner April 16, 2024 14:12
@@ -105,7 +105,7 @@ const ModalArea = styled.div<
>`
position: ${POSITION_RELATIVE};
overflow-y: ${OVERFLOW_AUTO};
max-height: 100%;
max-height: ${({ isFullPage }) => (isFullPage ? '100%' : '31rem')};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't this change affect every component that uses LegacyModalShell since the default is now 31rem instead of 100%?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with @jerader. I think LegacyModal is due for a bit of a re-think, but I'm all for avoiding changing the base component if we can help it. If we are special-casing the attach flows due to the 96 graphic, let's pass in custom CSS.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the time being, I'll leave alone the max height here til we can give some more thought to standardizing our modal styling.

<Flex
flexDirection={DIRECTION_ROW}
gridGap={SPACING.spacing24}
paddingBottom={SPACING.spacing24}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See other comment. I don't think we want to change base components if we can help it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point. I will leave this alone.

@ncdiehl11 ncdiehl11 requested a review from jerader April 16, 2024 16:03
Copy link
Contributor

@mjhuff mjhuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Would you mind fixing an unrelated copy error here: L35 of pipette_wizard_flows.json should have a capital A for and Attach 96-Channel pipette.

@ncdiehl11 ncdiehl11 requested a review from mjhuff April 16, 2024 17:40
Copy link
Contributor

@mjhuff mjhuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with passing CI. Thanks for fixing!

@ncdiehl11 ncdiehl11 merged commit 1fb2e85 into edge Apr 16, 2024
20 checks passed
@ncdiehl11 ncdiehl11 deleted the fix_app-modal-sizing branch April 16, 2024 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants