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

feat(app): create ODD protocol setup page #12071

Merged
merged 7 commits into from
Jan 31, 2023
Merged

Conversation

brenthagen
Copy link
Contributor

Overview

the first pass on the Protocol Setup page - the page hosts screens for instruments, modules, labware, etc and functional play and cancel buttons. The page is reached from the "Run protocol" button on the protocol details page, which creates a run. there are a few TODOs pending other pieces coming together. Components and styling are not final but close to what's currently in figma.

re RCORE-486

Screen Shot 2023-01-26 at 3 53 34 PM

Screen Shot 2023-01-26 at 3 51 00 PM

Test Plan

  • smoke tested running protocols with and without modules on local emulated OT-3, OT-3 dev kit, OT-2 robot, and local simulated OT-2
  • added initial unit tests for Protocol Setup page, to be supplemented as functionality is added and finalized

Changelog

  • Create ODD protocol setup page

Review requests

  • look over general approach and structure of ProtocolSetup component
  • try out loading the setup page with a protocol or two and seeing if anything breaks - functionality isn't complete, but ideally we won't whitescreen. i've seen a couple 409s from stop requests.

Risk assessment

low

creates the ProtocolSetup page that shows basic protocol information, hosts specific setup screens
(e.g. Modules), and can play/cancel a run.

re RCORE-486
@brenthagen brenthagen requested a review from a team as a code owner January 26, 2023 22:23
@brenthagen brenthagen removed the request for review from a team January 26, 2023 22:23
@codecov
Copy link

codecov bot commented Jan 26, 2023

Codecov Report

Merging #12071 (e13afe8) into edge (2cd7948) will decrease coverage by 0.03%.
The diff coverage is 55.26%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #12071      +/-   ##
==========================================
- Coverage   73.99%   73.97%   -0.03%     
==========================================
  Files        2197     2198       +1     
  Lines       60839    60912      +73     
  Branches     6456     6477      +21     
==========================================
+ Hits        45017    45058      +41     
- Misses      14300    14317      +17     
- Partials     1522     1537      +15     
Flag Coverage Δ
app 72.42% <54.66%> (-0.09%) ⬇️
components 65.31% <100.00%> (+0.02%) ⬆️
labware-library 49.74% <ø> (ø)
protocol-designer 45.89% <ø> (ø)
step-generation 88.46% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
app/src/App/OnDeviceDisplayApp.tsx 50.00% <ø> (+5.55%) ⬆️
app/src/pages/OnDeviceDisplay/ProtocolDetails.tsx 18.00% <0.00%> (-2.00%) ⬇️
app/src/pages/OnDeviceDisplay/ProtocolSetup.tsx 58.82% <58.82%> (ø)
app/src/atoms/buttons/BackButton.tsx 100.00% <100.00%> (ø)
components/src/ui-style-constants/colors.ts 100.00% <100.00%> (ø)

Copy link
Member

@shlokamin shlokamin left a comment

Choose a reason for hiding this comment

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

code lgtm! left comments about using colors from our ui constants since some of the colors will probably stay the same. might be worth just using em now so we wont have to come back and convert them later.

sweet to see this coming together, great work. its very motivating to me, i hope it is to you too!

Comment on lines -111 to +107
path: '/protocols/:protocolId/:runId/setup',
path: '/protocols/:runId/setup',
Copy link
Member

Choose a reason for hiding this comment

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

😁

// TODO(bh, 2022-12-7): finish styling when designs finalized
export function BackButton(): JSX.Element {
export function BackButton({
onClick,
Copy link
Member

Choose a reason for hiding this comment

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

nice, i like this!

Comment on lines 59 to 61
ready: 'rgba(4, 170, 101, 0.2)',
'not ready': '#FCF0D8',
general: '#E0E0E0',
Copy link
Member

Choose a reason for hiding this comment

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

this is fine for now until design gets finalized, but any reason some of these are both hex + rgba?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

just transcribing directly from figma. may have already changed

>
{status !== 'general' ? (
<Icon
color={status === 'ready' ? '#04AA65' : '#F09D20'}
Copy link
Member

Choose a reason for hiding this comment

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

these colors will almost certainly change, but we've got these colors as style constants (successEnabled, and warningEnabled) if u wanna use em

return (
<Btn
alignItems={ALIGN_CENTER}
border="2px solid #BF0000"
Copy link
Member

Choose a reason for hiding this comment

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

same deal here with errorEnabled

onClick={onClose}
aria-label="close"
>
<Icon color="#BF0000" name="ot-close" size="2rem" />
Copy link
Member

Choose a reason for hiding this comment

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

same deal here with errorEnabled

return (
<Btn
alignItems={ALIGN_CENTER}
backgroundColor={disabled ? '#8F8F8F' : '#006CFA'}
Copy link
Member

Choose a reason for hiding this comment

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

same thing here re: constants

Comment on lines 46 to 48
detail?: string
// second line of detail text
subDetail?: string
Copy link
Member

Choose a reason for hiding this comment

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

might be worth changing these to accept null so you don't have to fallback to undefined in your ternaries


return (
<>
{/* Protocol Setup Header */}
Copy link
Member

Choose a reason for hiding this comment

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

more hex colors in this file that we've got in constants

@brenthagen brenthagen merged commit 4bb83ae into edge Jan 31, 2023
y3rsh added a commit that referenced this pull request Feb 7, 2023
* edge: (116 commits)
  feat(system-server): add sqlite database and barebones HTTP server (#12085)
  feat(ot3): add enableOT3FirmwareUpdates feature flag to gate firmware update functionality. (#12102)
  feat(app): add bare bones hardware section to protocol details (#12099)
  feat(app): Support failed calibrations in the calibration wizard (#12092)
  refactor(docs): clean up Versioning page (#12084)
  refactor(robot-server): Make run and protocol limits configurable at launch (#12094)
  feat(app): add robotServerVersion to display the current robot software version (#12096)
  fix(hardware): do not track tip motor positions (#12093)
  feat(engine): allow calibrateGripper command to save calibration data (#12046)
  feat(app, api-client, react-api-client): delete POC TLC calibration data from overflow menu (#12075)
  fix(api): actually update OT3 instrument calibration offset in cache instrument (#12089)
  fix(robot-server): correct the data returned from instruments endpoint (#12067)
  feat(api): add thermocycler plate lift to hardware controller (#12068)
  fix(app): reference moduleId from result not params (#12077)
  feat(app): create ODD protocol setup page (#12071)
  refactor(api): Deprecate presses and increment args when using PAPI pick_up_tip (#12079)
  fix(ot3): handle multiple responses for a tip action request (#12083)
  refactor(api): touch tip implementation for PAPIv2 engine core (#12053)
  refactor(app): Remove ssid parameter from OnDeviceRouteParams (#11930)
  fix(api): fix broken test in the api hardware controller (#12080)
  ...
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.

2 participants