-
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(odd): menuList and MenuItem ODD support #12511
Conversation
Codecov Report
@@ Coverage Diff @@
## edge #12511 +/- ##
==========================================
+ Coverage 73.43% 73.70% +0.27%
==========================================
Files 1498 2255 +757
Lines 49066 61974 +12908
Branches 2991 6581 +3590
==========================================
+ Hits 36030 45678 +9648
- Misses 12580 14733 +2153
- Partials 456 1563 +1107
Flags with carried forward coverage won't be shown. Click here to find out more.
|
app/src/atoms/MenuList/MenuItem.tsx
Outdated
color: ${COLORS.darkBlackEnabled}; | ||
padding: ${SPACING.spacing3} 0.75rem ${SPACING.spacing3} 0.75rem; | ||
export const MenuItem: BtnComponent = styled.button<ButtonProps>` | ||
align-items: ${props => (props.isOnDevice ? ALIGN_CENTER : 'auto')}; |
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.
maybe
align-items: ${props => (props.isOnDevice ? ALIGN_CENTER : 'auto')}; | |
align-items: ${({isOnDevice}) => (isOnDevice ? ALIGN_CENTER : 'auto')}; |
background-color: ${COLORS.transparent}; | ||
color: ${COLORS.black}${COLORS.opacity50HexCode}; | ||
} | ||
|
||
@media ${RESPONSIVENESS.touchscreenMediaQuerySpecs} { |
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.
no idea how to get hover:none
on storybook, i guess to test this in storybook, you have to change this const to remove the (hover:none)
The styling on the ODD does not match the design: https://www.figma.com/file/AoTLAYuWawlaWItB1umOjr/Release%3A-Opentrons-Flex-Touchscreen-Designs?node-id=8292-140777&t=JBQTG6cB56MTBzOz-0 |
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.
lgtm! Can you make a ticket to convert app/src/pages/OnDeviceDisplay/ProtocolDashboard/LongPressModal.tsx
to use these components?
@ewagoner, i went ahead and changed |
Wow -- you are on it! Looks great on my dev kit. Thanks! |
closes RAUT-403
Overview
Change
MenuList
andMenuItem
to be used as the overflow menu in ODDScreen.Recording.2023-04-18.at.3.40.44.PM.mov
Test Plan
Review the storybooks for
MenuList
andMenuItem
and review the menu buttons in the desktop app to make sure they retain correct UI and review the Navigation menu in the ODD to make sure it has correct Ui.Changelog
MenuItem
to take inisAlert
prop and use media query, modify storybook and testMenuList
to take inisOnDevice
andOnClick
props, changebutton
prop to bechildren
and fix all usages of it in the desktop (it was only used in Module overflow menu). Modify storybook and testNavigationMenu
to useMenuItem
andMenuList
storybook/preview
Review requests
Risk assessment
low