-
Notifications
You must be signed in to change notification settings - Fork 179
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
feat(odd): add run failed modal for running protocol #12483
Conversation
add run failed modal for a failed run RCORE-563
Codecov Report
@@ Coverage Diff @@
## edge #12483 +/- ##
=======================================
Coverage 73.78% 73.78%
=======================================
Files 2247 2248 +1
Lines 61778 61805 +27
Branches 6452 6457 +5
=======================================
+ Hits 45580 45601 +21
- Misses 14678 14681 +3
- Partials 1520 1523 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
@@ -57,7 +57,7 @@ export function Modal(props: ModalProps): JSX.Element { | |||
border={`0.375rem solid ${isError ? COLORS.red_two : COLORS.white}`} | |||
width={modalWidth} | |||
height="max-content" | |||
maxHeight="32.5rem" | |||
maxHeight="33.5rem" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set the size of Run Failed's modal size
@@ -23,7 +24,7 @@ export function ModalHeader(props: ModalHeaderProps): JSX.Element { | |||
color={isError ? COLORS.white : COLORS.black} | |||
height="6.25rem" | |||
width="100%" | |||
padding={SPACING.spacing6} | |||
padding={isError ? SPACING.spacing5 : SPACING.spacing6} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isError: true padding 24px
isError: false padding 32px
I'm asking about this to Mel since less conditional statement in ui-component would make maintain easier.
|
||
if (errors == null) return null | ||
const modalHeader: ModalHeaderBaseProps = { | ||
title: 'Run failed', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this come from a translation file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, you are right. I will update that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looked good on my odd!
Overview
Add run failed modal. When runStatus is failed, the app shows the modal.
The current modal is different from the design since we need a new error handling system to display the information in the Figma. This PR is using the first of errors from
run/${runId}
. (Also error codes aren't defined yet.)When the system is ready, we will be able to align this modal with the design.
I comment out the event for
stopRun
and I will follow up this with Shlok, Jesse, and Anthony.[design]
https://www.figma.com/file/AoTLAYuWawlaWItB1umOjr/Release%3A-Opentrons-Flex-Touchscreen-Designs?node-id=8860-128824&t=I3cn6xOFvLdgrX4y-0
close RCORE-563
Test Plan
Wait for a little bit and check the modal is showed up
Changelog
Review requests
Risk assessment
low