-
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(app): guide the user through leveling gen2 multis #5348
Merged
Merged
Changes from 4 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
7117096
feat(app): guide the user through leveling gen2 multis
sfoster1 72b7dc0
fixup: csslint
sfoster1 bb80c7c
fixup: no more spacer divs and smaller video
sfoster1 ba52290
fixup: fix css typo and shrink margins to avoid scrolling
sfoster1 810bc0f
fixup: split nodes into functions with params and such
sfoster1 6ee0a82
fixup: enable video controls
sfoster1 0103770
fixup: add first pass calibration videos and select on mount, name
sfoster1 9c03d30
fixup: final videos for leveling
sfoster1 3b8f97c
fixup: v3 videos for leveling
sfoster1 c2b3239
fixup: code review comments
sfoster1 b2e1154
design review change
sfoster1 10a90c7
missed a displayName
sfoster1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
// @flow | ||
|
||
import * as React from 'react' | ||
import cx from 'classnames' | ||
|
||
import { Icon, ModalPage, PrimaryButton } from '@opentrons/components' | ||
import styles from './styles.css' | ||
|
||
import type { | ||
PipetteNameSpecs, | ||
PipetteModelSpecs, | ||
PipetteDisplayCategory, | ||
} from '@opentrons/shared-data' | ||
|
||
import type { Mount } from '../../pipettes/types' | ||
|
||
const EXIT_BUTTON_MESSAGE = 'confirm pipette is leveled' | ||
|
||
type Props = {| | ||
robotName: string, | ||
mount: Mount, | ||
title: string, | ||
subtitle: string, | ||
wantedPipette: PipetteNameSpecs | null, | ||
actualPipette: PipetteModelSpecs | null, | ||
displayName: string, | ||
displayCategory: PipetteDisplayCategory | null, | ||
back: () => mixed, | ||
exit: () => mixed, | ||
|} | ||
|
||
function Status(props: Props) { | ||
const { displayName } = props | ||
const iconName = 'check-circle' | ||
const iconClass = cx(styles.confirm_icon, { | ||
[styles.success]: true, | ||
[styles.failure]: false, | ||
}) | ||
const message = `${displayName} connected` | ||
return ( | ||
<div className={styles.leveling_title}> | ||
<Icon name={iconName} className={iconClass} /> | ||
{message} | ||
</div> | ||
) | ||
} | ||
|
||
function ExitButton(props: Props) { | ||
const { exit } = props | ||
|
||
return ( | ||
<PrimaryButton className={styles.confirm_button} onClick={exit}> | ||
{EXIT_BUTTON_MESSAGE} | ||
</PrimaryButton> | ||
) | ||
} | ||
|
||
export function LevelPipette(props: Props) { | ||
const { title, subtitle, displayName, back } = props | ||
return ( | ||
<ModalPage | ||
titleBar={{ | ||
title: title, | ||
subtitle: subtitle, | ||
back: { onClick: back, disabled: false }, | ||
}} | ||
> | ||
<div className={styles.leveling_modal_wrapper}> | ||
<Status {...props} /> | ||
<div className={styles.leveling_instruction}> | ||
Next, level the {displayName} | ||
</div> | ||
<div className={styles.leveling_video_wrapper}> | ||
<video width="100%" autoPlay={true} loop={true}> | ||
<source src={require('./videos/calibration.webm')} /> | ||
</video> | ||
</div> | ||
<ExitButton {...props} /> | ||
</div> | ||
</ModalPage> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,7 @@ module.exports = { | |
rules.handlebars, | ||
rules.fonts, | ||
rules.images, | ||
rules.videos, | ||
], | ||
}, | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Nit: because this component is so shallow, I'd probably place the instance of
PrimaryButton
directly in theLevelPipette
component for clarity in this file. This kind of abstraction feels unnecessary. You could probably make the same argument for theStatus
component. It's not really adding branching logic, just a haven for some variable declarations.