Skip to content

Commit

Permalink
refactor(protocol-designer): remove unused code (#3295)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanLondon authored Apr 3, 2019
1 parent fe871a9 commit 565c50d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 130 deletions.
9 changes: 0 additions & 9 deletions protocol-designer/src/components/About.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
@import '@opentrons/components';
@import '../../../css/grid.css';

.column_1_3 {
lost-column: 1/3;
}

.column_2_3 {
lost-column: 2/3;
}

.row {
lost-utility: clearfix;
Expand Down
5 changes: 0 additions & 5 deletions protocol-designer/src/components/ProtocolEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,11 @@ import {PortalRoot as TopPortalRoot} from './portals/TopPortal'
import {SCROLL_ON_SELECT_STEP_CLASSNAME} from '../steplist/actions'
import styles from './ProtocolEditor.css'

const SelectorDebugger = process.env.NODE_ENV === 'development'
? require('../containers/SelectorDebugger').default
: () => null

const showGateModal = process.env.NODE_ENV === 'production' || process.env.OT_PD_SHOW_GATE

function ProtocolEditor () {
return (
<div>
<SelectorDebugger />
<TopPortalRoot />
{showGateModal ? <GateModal /> : null}
<div className={styles.wrapper}>
Expand Down
79 changes: 0 additions & 79 deletions protocol-designer/src/containers/SelectorDebugger.js

This file was deleted.

17 changes: 0 additions & 17 deletions protocol-designer/src/css/grid.css

This file was deleted.

19 changes: 0 additions & 19 deletions protocol-designer/src/utils/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,6 @@ import type {Wells} from '../labware-ingred/types'

export const registerSelectors = (process.env.NODE_ENV === 'development') ? require('reselect-tools').registerSelectors : (a: any) => {}

export type FormConnector<F> = (accessor: $Keys<F>) =>
// $FlowFixMe: Missing type annotation for `$Values`
{onChange: (e: SyntheticInputEvent<*>) => mixed, value: $Values<F>}

export type FormConnectorFactory<F> = (
handleChange: (accessor: F) => (e: SyntheticInputEvent<*>) => mixed,
formData: F
) => FormConnector<F>

export const formConnectorFactory = (
handleChange: (accessor: string) => (e: SyntheticInputEvent<*>) => mixed,
formData: Object
): FormConnector<*> => (accessor: string) => ({
// Uses single accessor string to pass onChange & value into form fields
// TODO Ian 2018-02-07 type error when accessor not valid ('string' is too general)
onChange: handleChange(accessor),
value: formData[accessor] || '',
})

export const uuid: () => string = uuidv1

// Collision detection for SelectionRect / SelectableLabware
Expand Down

0 comments on commit 565c50d

Please sign in to comment.