Skip to content

Commit

Permalink
chore(app): dont show stacked icon when showing labware on a module (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
TamarZanzouri authored Feb 14, 2025
1 parent da09753 commit 832d939
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,7 @@ export function LabwareListItem(
adapterName: bottomLabwareName,
} = getLocationInfoNames(topLabwareId, commands)

const isStacked =
labwareQuantity > 1 ||
bottomLabwareId !== topLabwareId ||
moduleModel != null
const isStacked = labwareQuantity > 1 || bottomLabwareId !== topLabwareId

const { i18n, t } = useTranslation('protocol_setup')
const [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,15 @@ export function SetupLabwareMap({
const protocolModulesInfo = getProtocolModulesInfo(protocolAnalysis, deckDef)

const modulesOnDeck = protocolModulesInfo.map(module => {
const isLabwareStacked =
module.nestedLabwareId != null && module.nestedLabwareDef != null
const {
topLabwareId,
topLabwareDefinition,
topLabwareDisplayName,
} = getTopLabwareInfo(module.nestedLabwareId ?? '', loadLabwareCommands)

const isLabwareStacked =
module.nestedLabwareId != null && module.nestedLabwareId !== topLabwareId

return {
moduleModel: module.moduleDef.model,
moduleLocation: { slotName: module.slotName },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,15 @@ export function LabwareMapView(props: LabwareMapViewProps): JSX.Element {
: {}

const modulesOnDeck = attachedProtocolModuleMatches.map(module => {
const { moduleDef, nestedLabwareDef, nestedLabwareId, slotName } = module
const isLabwareStacked = nestedLabwareId != null && nestedLabwareDef != null
const { moduleDef, nestedLabwareId, slotName } = module
const { topLabwareId, topLabwareDefinition } = getTopLabwareInfo(
module.nestedLabwareId ?? '',
loadLabwareCommands
)

const isLabwareStacked =
nestedLabwareId != null && nestedLabwareId !== topLabwareId

return {
moduleModel: moduleDef.model,
moduleLocation: { slotName },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,7 @@ function RowLabware({
matchedModule.attachedModuleMatch.moduleType === HEATERSHAKER_MODULE_TYPE
? matchedModule.attachedModuleMatch
: null
const isStacked =
topLabwareQuantity > 1 || adapterName != null || matchedModule != null
const isStacked = topLabwareQuantity > 1 || adapterName != null

let slotName: string = slot
let location: JSX.Element = <DeckInfoLabel deckLabel={slotName} />
Expand Down

0 comments on commit 832d939

Please sign in to comment.