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(ODD): HiFi designs and features for the protocol details page #12330

Merged
merged 25 commits into from
Mar 28, 2023

Conversation

ewagoner
Copy link
Contributor

@ewagoner ewagoner commented Mar 21, 2023

Overview

This PR implements the designs and features found in Figma at https://www.figma.com/file/AoTLAYuWawlaWItB1umOjr/Opentrons-Flex-Touchscreen-Designs?node-id=1-212&t=Y7Cv06vknVeA2a4h-0

TODO Items:

  • Set the chip contents at the top of the page
  • Use a snackbar component to show pin/unpin result
  • Add liquid sub-page
  • Use final design for deck map sub-page
  • Use iconography on hardware sub-page
  • Hook up delete functionality

Closes RCORE-684

Test Plan

Unit tests have been added that cover the bulk of the page functionality. Storybook Stories have been created where appropriate, and verified visually. I also verified the page in both desktop mode and on the dev kit ODD.

Changelog

  • Used new tabbed buttons for navigation
  • Added medium button hifi component
  • Removed unnecessary medium rounded button component
  • Improved linting on LargeButton component
  • Added new typography for protocol header
  • Set max number of pins as an app constant
  • Generalized and styled Too Many Pins modal
  • Added back chevron icon svg
  • Applied Protocol details page hifi design
  • Applied Hardware and Labware hifi styling

Review requests

No special requests.

Risk assessment

There is no risk to current users, as this work is confined to the ODD.

@codecov
Copy link

codecov bot commented Mar 21, 2023

Codecov Report

Merging #12330 (23ab256) into edge (af6af15) will increase coverage by 0.35%.
The diff coverage is 63.63%.

Impacted file tree graph

@@            Coverage Diff             @@
##             edge   #12330      +/-   ##
==========================================
+ Coverage   73.42%   73.77%   +0.35%     
==========================================
  Files        1487     2219     +732     
  Lines       49037    61356   +12319     
  Branches     2983     6326    +3343     
==========================================
+ Hits        36005    45266    +9261     
- Misses      12578    14616    +2038     
- Partials      454     1474    +1020     
Flag Coverage Δ
app 72.51% <61.53%> (+25.79%) ⬆️
components 66.27% <100.00%> (+0.07%) ⬆️
labware-library 49.74% <ø> (ø)
protocol-designer 46.33% <ø> (ø)
react-api-client 75.78% <ø> (ø)
step-generation 88.20% <ø> (ø)

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

Impacted Files Coverage Δ
...DeviceDisplay/ProtocolDashboard/LongPressModal.tsx 48.57% <0.00%> (ø)
...pages/OnDeviceDisplay/ProtocolDetails/Hardware.tsx 94.11% <ø> (ø)
.../pages/OnDeviceDisplay/ProtocolDetails/Labware.tsx 94.11% <ø> (ø)
components/src/icons/icon-data.ts 100.00% <ø> (ø)
...rc/pages/OnDeviceDisplay/ProtocolDetails/index.tsx 66.17% <57.14%> (ø)
...src/atoms/buttons/OnDeviceDisplay/MediumButton.tsx 66.66% <66.66%> (ø)
app/src/App/constants.ts 100.00% <100.00%> (ø)
...src/atoms/buttons/OnDeviceDisplay/TabbedButton.tsx 100.00% <100.00%> (ø)
...lecules/Modal/OnDeviceDisplay/TooManyPinsModal.tsx 100.00% <100.00%> (ø)
components/src/ui-style-constants/typography.ts 100.00% <100.00%> (ø)

... and 724 files with indirect coverage changes

@ewagoner ewagoner requested review from shlokamin, b-cooper, jerader, koji and a team March 21, 2023 21:53
@ewagoner ewagoner marked this pull request as ready for review March 21, 2023 21:54
@ewagoner ewagoner requested a review from a team as a code owner March 21, 2023 21:54
@ewagoner
Copy link
Contributor Author

Screen.Recording.2023-03-21.at.11.28.22.AM.mov

@ewagoner ewagoner force-pushed the RCORE-684-protocol-details-hifi branch 2 times, most recently from 0ab3038 to f39fc6c Compare March 22, 2023 01:28
Copy link
Collaborator

@jerader jerader left a comment

Choose a reason for hiding this comment

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

I left a few clean up comments and questions. Looking good so far! Looks great on the simulator.

app/src/App/constants.ts Show resolved Hide resolved
app/src/assets/localization/en/protocol_info.json Outdated Show resolved Hide resolved
app/src/atoms/buttons/OnDeviceDisplay/LargeButton.tsx Outdated Show resolved Hide resolved
app/src/pages/OnDeviceDisplay/ProtocolDetails/Hardware.tsx Outdated Show resolved Hide resolved
app/src/pages/OnDeviceDisplay/ProtocolDetails/index.tsx Outdated Show resolved Hide resolved
app/src/pages/OnDeviceDisplay/ProtocolDetails/index.tsx Outdated Show resolved Hide resolved
components/src/ui-style-constants/typography.ts Outdated Show resolved Hide resolved
lineHeight={TYPOGRAPHY.lineHeight28}
paddingLeft={SPACING.spacing5}
>
{getHardwareLocation(hardware, t)}
Copy link
Collaborator

@jerader jerader Mar 22, 2023

Choose a reason for hiding this comment

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

not sure if there is a separate ticket to address this but the UI for the hardware locations don't match what is in figma. Slots should only say the number with the border around them and mounts should be capitalized.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if there is a separate ticket or not, but this is the same thing I asked about a couple of weeks ago re: the Labware Setup screen. I was going to make a function to map from the old "slots 1-12" format to the "a1, a2, ... etc" format but I believe the decision was to hold off on that until we just get the expected format from the backend. As of right now both the module setup and labware setup screens are also displaying locations as "slot #"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not a separate ticket yet (that I know of) but it is one of the TODO items in the PR description that I plan on spinning off into new tickets when this gets merged.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Got it, thanks yall! The change will need to be added to the Liquids setup screen as well.

lineHeight={TYPOGRAPHY.lineHeight28}
paddingLeft={SPACING.spacing5}
>
{getHardwareLocation(hardware, t)}
Copy link
Contributor

@koji koji Mar 22, 2023

Choose a reason for hiding this comment

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

For mount, the design uses Right Mount so probably we would need to add textTransform to StyledText.

textTransform={TYPOGRAPHY. textTransformCapitalize}

Screenshot 2023-03-22 at 11 05 51 AM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's not just that -- the design shows iconography and other sugar, so I left the contents of this table as a TODO item on this PR.

'protocol_details:creation_method'
)}: ${getCreationMethod(protocolType)}`}</StyledText>
<Flex alignItems={ALIGN_CENTER} maxHeight="3.75rem" minWidth="15.6875rem">
<NewPrimaryBtn
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use small button?

now the button link to small button.
Screenshot 2023-03-22 at 11 54 30 AM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe. Yesterday, Figma called this a "custom CTA" so that's what I made. I'll see if I can use the common component instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

Jethary is addressing feedback from Mel so you can leave this now, but please leave the comment.

@koji
Copy link
Contributor

koji commented Mar 22, 2023

TabbedButton focus still shows outline. Do you plan to update TabbedButton in a following PR?

@ewagoner
Copy link
Contributor Author

ewagoner commented Mar 23, 2023

TabbedButton focus still shows outline. Do you plan to update TabbedButton in a following PR?

I saw that conversation in slack today. I'll fix both TabbedButton and MediumButton as a separate commit to this PR, since I'm here already using them both.

Edit: I didn't have the errant box shadow in the MediumButton, so I just fixed the TabbedButton.

@ewagoner ewagoner force-pushed the RCORE-684-protocol-details-hifi branch 2 times, most recently from 898ab2a to 6879b6e Compare March 23, 2023 03:55
@ewagoner
Copy link
Contributor Author

I've addressed all the feedback on this PR. I do want to try to refactor the MediumButton to make it in line with this comment on the SmallButton PR: #12340 (review)

@ewagoner
Copy link
Contributor Author

I think this is finally good to go, again, for real this time. Re-requesting reviews!

@ewagoner ewagoner force-pushed the RCORE-684-protocol-details-hifi branch from 22468d9 to 23ab256 Compare March 28, 2023 15:33
@ewagoner ewagoner merged commit 4fbb96a into edge Mar 28, 2023
@ewagoner ewagoner deleted the RCORE-684-protocol-details-hifi branch March 28, 2023 16:59
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

4 participants