-
Notifications
You must be signed in to change notification settings - Fork 177
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 quick transfer tab and details view #15600
Conversation
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.
nice work! I got through a bit of reviewing so far - this is a massive pr.
app/src/organisms/QuickTransferFlow/__tests__/utils/getSelectedWellCount.test.ts
Outdated
Show resolved
Hide resolved
app/src/pages/QuickTransferDashboard/PinnedTransferCarousel.tsx
Outdated
Show resolved
Hide resolved
const pipetteDisplayName = | ||
usePipetteNameSpecs((protocolHardware as ProtocolPipette).pipetteName) | ||
?.displayName ?? '' |
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.
this is a todo in the future but since usePipetteNameSpecs
returns the v1 specs, it should be deprecated and we shouldn't use it. I think instead we should make a new util that returns the pipetteName
given the pipetteV2Specs
info
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.
yeah I thought about this -- I think we should leave as is for now to match ProtocolDetails and since v1 is already anonymized for OEM mode and we haven't done that for v2 yet. But I agree we should try to find some time in continuing work to complete the migration over to the new schema!
app/src/assets/images/on-device-display/empty_quick_transfer_dashboard.png
Outdated
Show resolved
Hide resolved
c012069
to
8b7ed0e
Compare
import { useNetworkConnection } from '../../../resources/networking/hooks/useNetworkConnection' | ||
import { NavigationMenu } from '../NavigationMenu' | ||
import { Navigation } from '..' | ||
import { when } from 'vitest-when' |
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.
this line can be moved up
// TODO(sb:7/10/24): update this wrapper to fade on both sides only when not scrolled completely to that side | ||
// This will be accomplished in PLAT-399 | ||
const CarouselWrapper = styled.div` | ||
display: flex; |
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.
display: flex; | |
display:${DISPLAY_FLEX}; |
flex-direction: ${DIRECTION_ROW}; | ||
align-items: ${ALIGN_FLEX_START}; | ||
width: 650px; | ||
overflow-x: scroll; |
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.
overflow-x: scroll; | |
overflow-x: ${OVERFLOW_SCROLL}; |
display: flex; | ||
flex-direction: ${DIRECTION_ROW}; | ||
align-items: ${ALIGN_FLEX_START}; | ||
width: 650px; |
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.
If there is no specific reason to use px
width: 650px; | |
width: 40.625rem; |
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.
app/src/organisms/QuickTransferFlow/__tests__/utils/getSelectedWellCount.test.ts
Outdated
Show resolved
Hide resolved
app/src/pages/QuickTransferDashboard/DeleteTransferConfirmationModal.tsx
Outdated
Show resolved
Hide resolved
} = { | ||
full: { | ||
fontSize: TYPOGRAPHY.fontSize32, | ||
height: '8.875rem', |
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.
I'm not sure that we need to use the same height, but I updated the height for RTP Csv file support.
height: '11.75rem', |
the following two cases too.
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.
Yeah I'm not sure either - Quick Transfer protocols won't have RTP so the previous height is probably sufficient space wise but I'll flag this for Felix to look at in design QA.
app/src/pages/QuickTransferDashboard/PinnedTransferCarousel.tsx
Outdated
Show resolved
Hide resolved
app/src/pages/QuickTransferDashboard/PinnedTransferCarousel.tsx
Outdated
Show resolved
Hide resolved
&:active { | ||
background-color: ${longpress.isLongPressed | ||
? '' | ||
: isFailedAnalysis | ||
? COLORS.red40 | ||
: COLORS.grey50}; | ||
} |
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.
I think we avoid using a nested ternary.
app/src/pages/QuickTransferDashboard/__tests__/DeleteTransferConfirmationModal.test.tsx
Outdated
Show resolved
Hide resolved
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.
I pushed this to a Flex, I was able to create and successfully run a quick transfer protocol first try! The protocolKind form data looks good and protocols are correctly being filtered and shown in their corresponding tabs.
Awesome work!
import type { ProtocolHardware, ProtocolPipette } from '../Protocols/hooks' | ||
import type { TFunction } from 'i18next' |
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.
import type { ProtocolHardware, ProtocolPipette } from '../Protocols/hooks' | |
import type { TFunction } from 'i18next' | |
import type { TFunction } from 'i18next' | |
import type { ProtocolHardware, ProtocolPipette } from '../Protocols/hooks' |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## edge #15600 +/- ##
==========================================
+ Coverage 60.12% 62.91% +2.78%
==========================================
Files 190 218 +28
Lines 10627 12829 +2202
==========================================
+ Hits 6390 8071 +1681
- Misses 4237 4758 +521
Flags with carried forward coverage won't be shown. Click here to find out more. |
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 !
Fix PLAT-231, PLAT-232, PLAT-233, PLAT-344
Overview
This PR adds all functionality needed for the quick transfer dashboard and details pages. It also addresses a discrepancy in the number of wells selected vs number of wells in the stored stateful object
Test Plan
Smoke test all added functionality - create new quick transfer, see that it shows up on the quick transfer dashboard and not the protocols dashboard, pin and unpin it, view the details page, delete it
Changelog
getSelectedWellCount
util and use it to determine more accurate volume limitationsprotocolKind
to ProtocolResource type and use this to filter between protocols and quick transfers in details tabsReview requests
Does the protocolKind type match the robot server?
Smoke test the new tab and details view including long press, pinning, unpinning, deleting etc
Risk assessment
Low, behind FF