-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(protocol-designer): merge top level routes into Designer rou…
…te (#16066)
- Loading branch information
Showing
23 changed files
with
121 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
protocol-designer/src/pages/Designer/DeckSetup/__tests__/DeckSetupContainer.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { it } from 'vitest' | ||
|
||
it.todo('write test for DeckSetupContainer') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './DeckSetupContainer' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
protocol-designer/src/pages/Designer/__tests__/Designer.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { it } from 'vitest' | ||
|
||
it.todo('write test for Designer') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import * as React from 'react' | ||
|
||
import { Tabs } from '@opentrons/components' | ||
|
||
import { useTranslation } from 'react-i18next' | ||
import { DeckSetupContainer } from './DeckSetup' | ||
|
||
export function Designer(): JSX.Element { | ||
const { t } = useTranslation(['starting_deck_state', 'protocol_steps']) | ||
const [tab, setTab] = React.useState<'startingDeck' | 'protocolSteps'>( | ||
'startingDeck' | ||
) | ||
const startingDeckTab = { | ||
text: t('protocol_starting_deck'), | ||
isActive: tab === 'startingDeck', | ||
onClick: () => { | ||
setTab('startingDeck') | ||
}, | ||
} | ||
const protocolStepTab = { | ||
text: t('protocol_steps:protocol_steps'), | ||
isActive: tab === 'protocolSteps', | ||
onClick: () => { | ||
setTab('protocolSteps') | ||
}, | ||
} | ||
|
||
return ( | ||
<> | ||
{/* TODO: add these tabs to the nav bar potentially? */} | ||
<Tabs tabs={[startingDeckTab, protocolStepTab]} /> | ||
{tab === 'startingDeck' ? ( | ||
<DeckSetupContainer /> | ||
) : ( | ||
<div>TODO wire this up</div> | ||
)} | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
protocol-designer/src/pages/ProtocolSteps/__tests__/ProtocolSteps.test.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
protocol-designer/src/pages/StartingDeckState/__tests__/StartingDeckState.test.tsx
This file was deleted.
Oops, something went wrong.