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): add bare bones hardware section to protocol details #12099

Merged
merged 7 commits into from
Feb 6, 2023

Conversation

shlokamin
Copy link
Member

Overview

This PR adds a bare bones hardware section to the protocol details page. Will update implementation when @brenthagen finishes breaking out logic from useProtocolDetailsForRun which is why theres no test coverage for the hook i made. I'll add some unit tests for the components though.

closes RCORE-582

Test Plan

I added a few protocols to my dev robot, opened them in the protocol details page on ODD app, and verified that the page rendered the correct info.

Review requests

Add some protocols to your dev robot and look at the protocol details hardware tab. make sure the right info shows up:

Screen Shot 2023-02-03 at 11 48 42 AM

Risk assessment

Low

@shlokamin shlokamin requested review from a team as code owners February 3, 2023 17:27
@codecov
Copy link

codecov bot commented Feb 3, 2023

Codecov Report

Merging #12099 (5092238) into edge (27a1e2a) will increase coverage by 0.06%.
The diff coverage is 52.50%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #12099      +/-   ##
==========================================
+ Coverage   73.97%   74.04%   +0.06%     
==========================================
  Files        2198     2201       +3     
  Lines       60912    61147     +235     
  Branches     6477     6579     +102     
==========================================
+ Hits        45058    45274     +216     
- Misses      14317    14325       +8     
- Partials     1537     1548      +11     
Flag Coverage Δ
app 72.71% <52.50%> (+0.29%) ⬆️
react-api-client 83.46% <ø> (+0.40%) ⬆️

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

Impacted Files Coverage Δ
...pp/src/pages/OnDeviceDisplay/ProtocolDashboard.tsx 25.00% <ø> (ø)
app/src/pages/Protocols/hooks/index.ts 7.14% <7.14%> (ø)
...rc/pages/OnDeviceDisplay/ProtocolDetails/index.tsx 13.33% <16.66%> (ø)
...pages/OnDeviceDisplay/ProtocolDetails/Hardware.tsx 95.00% <95.00%> (ø)
...c/pages/OnDeviceDisplay/RobotSettingsDashboard.tsx 64.28% <0.00%> (-10.72%) ⬇️
.../organisms/Devices/hooks/useDeckCalibrationData.ts 88.88% <0.00%> (-1.12%) ⬇️
...nt/src/calibration/useDeleteCalibrationMutation.ts 100.00% <0.00%> (ø)
.../organisms/Devices/hooks/useCalibrationTaskList.ts 96.34% <0.00%> (+1.14%) ⬆️
...isms/Devices/HistoricalProtocolRunOverflowMenu.tsx 90.16% <0.00%> (+5.16%) ⬆️
...ngsCalibration/CalibrationDetails/OverflowMenu.tsx 84.12% <0.00%> (+8.41%) ⬆️
... and 2 more

@@ -20,7 +20,7 @@ import { TempODDMenu } from '../pages/OnDeviceDisplay/TempODDMenu'
import { RobotDashboard } from '../pages/OnDeviceDisplay/RobotDashboard'
import { RobotSettingsDashboard } from '../pages/OnDeviceDisplay/RobotSettingsDashboard'
import { ProtocolDashboard } from '../pages/OnDeviceDisplay/ProtocolDashboard'
import { ProtocolDetails } from '../pages/OnDeviceDisplay/ProtocolDetails'
import { ProtocolDetails } from '../pages/OnDeviceDisplay/ProtocolDetails/ProtocolDetails'
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe changing the file name from ProtocolDetails.tsx to index.tsx?

Comment on lines +8 to +11
import {
getModuleDisplayName,
getPipetteNameSpecs,
} from '@opentrons/shared-data'
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe these lines after @opentrons/components?

text-align: left;
`
const TableHeader = styled('th')`
text-transform: ${TYPOGRAPHY.textTransformUppercase};
Copy link
Contributor

Choose a reason for hiding this comment

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

From the design capitalize, but the design is mid-fi.
we don't need to change this right now.

`
const TableHeader = styled('th')`
text-transform: ${TYPOGRAPHY.textTransformUppercase};
color: ${COLORS.darkBlackEnabled};
Copy link
Contributor

Choose a reason for hiding this comment

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


const displayName =
protocolRecord?.data.metadata.protocolName ??
protocolRecord?.data.files[0].name

return (
<Flex flexDirection="column" alignItems={JUSTIFY_FLEX_START}>
<Flex flexDirection="column" padding={SPACING.spacing6}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<Flex flexDirection="column" padding={SPACING.spacing6}>
<Flex flexDirection={DIRECTION_COLUMN} padding={SPACING.spacing6}>

hardwareType: 'pipette'
pipetteName: PipetteName
mount: 'left' | 'right'
connected: true | false
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any specific reason to use true | false instead of boolean?

Copy link
Member Author

Choose a reason for hiding this comment

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

lol no, i was thinking too literally 😛

Copy link
Contributor

@koji koji left a comment

Choose a reason for hiding this comment

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

Tested this PR on a dev kit and looks good to me!
🤖

@@ -25,7 +29,7 @@ export type Pipettes = FetchPipettesResponseBody
export type FetchPipettesResponsePipette =
| {
id: string
name: string
name: PipetteName
Copy link
Member Author

Choose a reason for hiding this comment

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

@smb2268 @b-cooper i changed this type coming back from the get pipettes endpoint from string to PipetteName because i assume we just forgot to do this before. wanna make sure that sounds reasonable to y'all before i merge tho

@shlokamin shlokamin merged commit c167be3 into edge Feb 6, 2023
@shlokamin shlokamin deleted the app_add-odd-protocol-details-hardware branch February 6, 2023 18:26
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.

None yet

2 participants