From 775ec4b957d9e426e6ccfbc966b6cb5824089e80 Mon Sep 17 00:00:00 2001 From: Ian London Date: Wed, 20 Mar 2019 17:10:27 -0400 Subject: [PATCH] feat(protocol-designer): update transfer form design (#3221) * update Transfer form design * expand use of i18n in PD forms * add colon and capitalization by default for form component labels via CSS --- .../components/ConfigurePipette/ConfigForm.js | 2 +- components/src/forms/CheckboxField.js | 12 +- components/src/forms/FormGroup.js | 4 +- components/src/forms/InputField.js | 6 +- components/src/forms/RadioGroup.js | 7 +- components/src/forms/forms.css | 5 + protocol-designer/src/components/FilePage.js | 11 +- .../src/components/IngredientsList/index.js | 3 +- .../LiquidPlacementForm.js | 4 +- .../components/LiquidsPage/LiquidEditForm.js | 4 +- .../src/components/StepEditForm/ButtonRow.js | 6 +- .../components/StepEditForm/StepEditForm.css | 107 ++++++++----- .../StepEditForm/fields/BlowoutLocation.js | 2 +- .../StepEditForm/fields/DisposalVolume.js | 14 +- .../fields/FlowRate/FlowRateInput.js | 9 +- .../StepEditForm/fields/Path/Path.js | 2 +- .../components/StepEditForm/fields/Pipette.js | 3 +- .../StepEditForm/fields/TipPosition/index.js | 2 +- .../components/StepEditForm/fields/Volume.js | 7 +- .../fields/WellOrder/WellOrderInput.css | 4 + .../fields/WellOrder/WellOrderModal.js | 4 +- .../StepEditForm/fields/WellOrder/index.js | 18 ++- .../WellSelection/WellSelectionInput.js | 6 +- .../forms/MoveLiquid/SourceDestFields.js | 150 +++++++++--------- .../forms/MoveLiquid/SourceDestHeaders.js | 60 +++++++ .../StepEditForm/forms/MoveLiquid/index.js | 97 ++++++++--- .../src/components/forms/forms.css | 4 - .../modals/FilePipettesModal/index.js | 3 +- .../src/localization/en/application.json | 5 + .../src/localization/en/form.json | 39 +++-- 30 files changed, 384 insertions(+), 216 deletions(-) create mode 100644 protocol-designer/src/components/StepEditForm/forms/MoveLiquid/SourceDestHeaders.js diff --git a/app/src/components/ConfigurePipette/ConfigForm.js b/app/src/components/ConfigurePipette/ConfigForm.js index 0981905d8c1..d73b0e84845 100644 --- a/app/src/components/ConfigurePipette/ConfigForm.js +++ b/app/src/components/ConfigurePipette/ConfigForm.js @@ -170,7 +170,7 @@ export default class ConfigForm extends React.Component { {this.props.showHiddenFields && ( diff --git a/components/src/forms/CheckboxField.js b/components/src/forms/CheckboxField.js index 5aa57460474..f0186390ef6 100644 --- a/components/src/forms/CheckboxField.js +++ b/components/src/forms/CheckboxField.js @@ -13,6 +13,8 @@ type Props = { value?: boolean, /** classes to apply */ className?: string, + /** classes to apply to inner label text div */ + labelTextClassName?: ?string, /** name of field in form */ name?: string, /** label text for checkbox */ @@ -27,12 +29,12 @@ type Props = { export default function CheckboxField (props: Props) { const error = props.error != null - const labelClassName = cx( + const outerClassName = cx( styles.form_field, props.className, {[styles.checkbox_disabled]: props.disabled}) - const innerClassName = cx( + const innerDivClassName = cx( styles.checkbox_icon, { [styles.error]: error, @@ -40,8 +42,8 @@ export default function CheckboxField (props: Props) { }) return ( -