-
Notifications
You must be signed in to change notification settings - Fork 180
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
refactor(app): replace RobotWorkSpace in DeckThumbnail with BaseDeck #13875
Conversation
replace RobotWorkSpace with BaseDeck close RAUT-819
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## edge #13875 +/- ##
==========================================
- Coverage 70.75% 70.75% -0.01%
==========================================
Files 1629 2506 +877
Lines 54062 70592 +16530
Branches 3797 8653 +4856
==========================================
+ Hits 38254 49946 +11692
- Misses 15143 18531 +3388
- Partials 665 2115 +1450
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.
looks good so far, but we need to add liquid info also. we don't have an example BaseDeck
implementation of liquids yet - will be similar to RAUT-821
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.
with these changes, we should end up with a fairly simple <BaseDeck {...someProps} />
instance (with no children) in the render of DeckThumbnail
module.moduleDef.model === THERMOCYCLER_MODULE_V1 | ||
? { lidMotorState: 'open' } | ||
: {}, | ||
nestedLabwareDef: topLabwareDefinition, |
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.
here we want to add the well fill to the nested labware - add a prop nestedLabwareWellFill
to moduleLocations
in BaseDeck
labwareLocation: { slotName }, | ||
definition: topLabwareDefinition, | ||
topLabwareId, | ||
topLabwareDisplayName, |
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.
simliar, we want to add the well fill to the labware - add a prop wellFill
to labwareLocations
in BaseDeck
moduleInSlot.result.moduleId in initialLoadedLabwareByModuleId | ||
? initialLoadedLabwareByModuleId[moduleInSlot.result.moduleId] | ||
: null | ||
{map( |
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.
all of the children content here inside BaseDeck
should not not be needed if we are processing moduleLocations
and labwareLocations
correctly above - we should be able to use
const wellFill = getWellFillFromLabwareId(
topLabwareId ?? '',
liquids,
labwareByLiquidId
)
const labwareHasLiquid = !isEmpty(wellFill)
in those two locations above with the added well fill props
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.
@brenthagen
updated code based on your comment and one question about labwareHasLiquid
.
Do we need to add interactions that only exists in DeckView of SetupLiquidsMap
?
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 no, we don't need to add liquid hover or click interactions to DeckThumbnail. so we won't need labwareHasLiquid
in DeckThumbnail
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.
okay, thank you!
also, it would be a good idea to change the title of this PR to indicate it is only doing a replacement in DeckThumbnail |
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.
looks good, comments on slot labels and hover could be addressed in a follow on PR if wanted
Overview
replace RobotWorkSpace with BaseDeck
For LabwareInfoOverlay, the component requires
runId
sinceLabwareInfo
usesrunId
foruseLabwareOffsetForLabware
.useLabwareOffsetForLabware
usesrunId
to getmostRecentAnalysis
.close RAUT-819
Test Plan
open the above components on Desktop app and Touchscreen app
Changelog
Review requests
Risk assessment
low