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): suppress title bar exit in calcheck results #6941

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion app/src/components/CheckCalibration/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ import type {
import type { CalibrationPanelProps } from '../CalibrationPanels/types'
import type { CalibrationHealthCheckParentProps } from './types'

import styles from './styles.css'

const ROBOT_CALIBRATION_CHECK_SUBTITLE = 'Calibration health check'
const EXIT = 'exit'

Expand Down Expand Up @@ -160,7 +162,14 @@ export function CheckHealthCalibration(

const titleBarProps = {
title: ROBOT_CALIBRATION_CHECK_SUBTITLE,
back: { onClick: confirmExit, title: EXIT, children: EXIT },
back: {
onClick: confirmExit,
title: EXIT,
children: EXIT,
Copy link
Contributor

Choose a reason for hiding this comment

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

if you wanted to completely get rid of the styles.css file you could replace the className with a dummy box e.g.

back: currentStep === Sessions.CHECK_STEP_RESULTS_SUMMARY ? {title: null, children: (<Box width={SIZE_1} />)} : {...}

Copy link
Member Author

@sfoster1 sfoster1 Nov 6, 2020

Choose a reason for hiding this comment

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

I think I tried that in some other case and it had some display issues around active-state rendering. I think we should just keep the styles thing until that's a styled-component or primitive and we can use a css literal or something

...(currentStep === Sessions.CHECK_STEP_RESULTS_SUMMARY
? { className: styles.suppress_exit_button }
: {}),
},
}

if (showSpinner) {
Expand Down
Loading