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

refactor(app): add and use deck map component in interventionmodal #15570

Merged
merged 9 commits into from
Jul 5, 2024

Conversation

sfoster1
Copy link
Member

@sfoster1 sfoster1 commented Jul 2, 2024

Adds DeckMapContent to intervention modal. This is a small wrapper around one of two different kinds of deck map:

  • A labware-rendering map that is also capable of rendering highlights around some labware, used in some selection screens in error recovery
  • A deck config style block map that supports clicking on some of the blocks to select them, used in some selection screens in the drop tip wizard (and thus in error recovery)

Stories for the deckmap are on storybook, where it's rendered side-by-side with the standin since it is only destined to be used in a two-column layout.

Extra fun changes:

  • Use the ODD text size args for all slot labels in BaseDeck, because otherwise they are completely unreadable once the deckmap gets to small. I think this looks a lot better everywhere, and is actually readable when the deckmap is small, so let's go with it; may want to come back and make these something more specific on desktop
  • Error recovery has a RecoveryMap, a large data structure that is core to the wizard flow and defines how users move between steps and screens. Error recovery also had a RecoveryMap, which was a component for rendering a deckmap, and a useRecoveryMapUtils, a hook for getting that component's arguments. Now it uses the DeckMapContent component above directly, and useDeckMapUtils, a hook for getting that component's arguments
  • There's something about the deck config style map that isn't quite right and I think that it's because of this: https://opentrons.atlassian.net/browse/EXEC-513

Review requests:

  • i'm pretty sure what I did to drop tip will work but it might be reasonably called somewhat gross. this is all somewhat gross though, so c'est la vie
  • the deckmap slot labels do not render right in firefox at these sizes. if you're looking at storybook, you're going to have to use chrome
  • fix an issue that was preventing ER wizard from being displayed on ODD
    Testing, todo:
  • error recovery
  • drop tip in error recovery
  • drop tip outside of error recovery

Closes EXEC-501

@sfoster1 sfoster1 requested a review from a team as a code owner July 2, 2024 21:27
@sfoster1 sfoster1 requested review from mjhuff and removed request for a team July 2, 2024 21:27
},
]

const CONSOLE_LOG_ON_SELECT = (location: ModuleLocation): void => {
Copy link
Contributor

Choose a reason for hiding this comment

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

nice!

@@ -44,7 +44,7 @@ export function useRunPausedSplash(
showERWizard: boolean
): boolean {
// Don't show the splash when desktop ER wizard is active.
return !(!isOnDevice && showERWizard)
return isOnDevice && !showERWizard
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you!

modulesOnDeck: RunCurrentModulesOnDeck[]
labwareOnDeck: RunCurrentLabwareOnDeck[]
highlightLabwareEventuallyIn: string[]
kind: 'intervention'
Copy link
Contributor

Choose a reason for hiding this comment

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

just want to make sure we always want the kind to be intervention?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah. in this case we do because this is only picked up by error recovery use cases which always use that style of deck map. the deck config style is only used by the drop tip wiz

Copy link
Contributor

@TamarZanzouri TamarZanzouri left a comment

Choose a reason for hiding this comment

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

code changes look really good! so much cleaner! I posted a question but besides that looks great

We're probably going to use this a lot more now that we'll have a bunch
of content components that live in TwoColumn, so let's make StandIn reusable.
add deckmap fixtures and such

more deckmap changes
This should be a visually indistinguishable reimplementation.
Two places in error recovery, refactoring as we go.

One big change was that there was a bunch of stuff called RecoveryMap as
in recovery (deck) map, but recovery also has the Recovery Map, the big
data structure that holds how all the steps of error recovery flow
together. This is very confusing, so now what used to be
RecoveryMap (component, utils) is now DeckMap.
@sfoster1 sfoster1 merged commit 1578adf into edge Jul 5, 2024
48 checks passed
@sfoster1 sfoster1 deleted the exec-501-deckmap-content branch July 5, 2024 20:01
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

2 participants