From 7f0892d8b29a35ca86287bac7b9a54ebb608b0ea Mon Sep 17 00:00:00 2001 From: Rick Carlino Date: Tue, 7 Jan 2020 15:00:25 -0600 Subject: [PATCH 1/2] More step cosmetic fixes --- frontend/constants.ts | 2 +- frontend/css/steps.scss | 8 +++---- frontend/sequences/step_button_cluster.tsx | 23 +++++-------------- .../step_tiles/tile_emergency_stop.tsx | 2 +- frontend/sequences/step_tiles/tile_reboot.tsx | 18 ++++++++------- 5 files changed, 22 insertions(+), 31 deletions(-) diff --git a/frontend/constants.ts b/frontend/constants.ts index 52de71984d..5dc181ec3e 100644 --- a/frontend/constants.ts +++ b/frontend/constants.ts @@ -297,7 +297,7 @@ export namespace ToolTips { sequence or delete a weed after removing it.`); export const REBOOT = - trim(`Power cycle FarmBot's onboard computer or microcontroller.`); + trim(`Power cycle FarmBot's onboard computer.`); export const SET_SERVO_ANGLE = trim(`Move a servo to the provided angle. An angle of 90 degrees diff --git a/frontend/css/steps.scss b/frontend/css/steps.scss index 0beaebbd69..1d91cd6eb5 100644 --- a/frontend/css/steps.scss +++ b/frontend/css/steps.scss @@ -86,7 +86,7 @@ background: $brown; } &.send-message-step { - background: $red; + background: $brown; } &.find-home-step { background: $blue; @@ -131,7 +131,7 @@ background: $brown; } &.emergency-stop-step { - background: $brown; + background: $red; } &.reboot-step { background: $brown; @@ -188,7 +188,7 @@ background: $light_brown; } &.send-message-step { - background: $light_red; + background: $light_brown; } &.find-home-step { background: $light_blue; @@ -251,7 +251,7 @@ background: $light_brown; } &.emergency-stop-step { - background: $light_brown; + background: $light_red; } &.reboot-step { background: $light_brown; diff --git a/frontend/sequences/step_button_cluster.tsx b/frontend/sequences/step_button_cluster.tsx index bc4b003538..5a9bdc7894 100644 --- a/frontend/sequences/step_button_cluster.tsx +++ b/frontend/sequences/step_button_cluster.tsx @@ -48,16 +48,6 @@ export function StepButtonCluster(props: StepButtonProps) { color="orange"> {t("CONTROL PERIPHERAL")} , - - {t("TOGGLE PERIPHERAL")} - , - {t("SEND MESSAGE")} - , - - {t("E-STOP")} + {t("SEND MESSAGE")} , {t("REBOOT")} , + + {t("E-STOP")} + , ); - return
diff --git a/frontend/sequences/step_tiles/tile_emergency_stop.tsx b/frontend/sequences/step_tiles/tile_emergency_stop.tsx index 00d003d018..3608e9ab66 100644 --- a/frontend/sequences/step_tiles/tile_emergency_stop.tsx +++ b/frontend/sequences/step_tiles/tile_emergency_stop.tsx @@ -21,7 +21,7 @@ export function TileEmergencyStop(props: StepParams) {

- {t("Unlocking a device requires user intervention")} + {t("Unlocking a device requires user intervention.")}

diff --git a/frontend/sequences/step_tiles/tile_reboot.tsx b/frontend/sequences/step_tiles/tile_reboot.tsx index 6d77690195..ab0db3a893 100644 --- a/frontend/sequences/step_tiles/tile_reboot.tsx +++ b/frontend/sequences/step_tiles/tile_reboot.tsx @@ -5,12 +5,11 @@ import { StepWrapper, StepHeader, StepContent } from "../step_ui/index"; import { t } from "../../i18next_wrapper"; import { ALLOWED_PACKAGES, SequenceBodyItem, Reboot } from "farmbot"; import { editStep } from "../../api/crud"; -import { StepRadio } from "../step_ui/step_radio"; - -const PACKAGE_CHOICES = (): Record => ({ - "arduino_firmware": t("Just the Arduino"), - "farmbot_os": t("Entire system") -}); +// import { StepRadio } from "../step_ui/step_radio"; +// const PACKAGE_CHOICES = (): Record => ({ +// "arduino_firmware": t("Just the Arduino"), +// "farmbot_os": t("Entire system") +// }); function assertReboot(x: SequenceBodyItem): asserts x is Reboot { if (x.kind !== "reboot") { @@ -52,11 +51,14 @@ export function TileReboot(props: StepParams) { index={index} confirmStepDeletion={props.confirmStepDeletion} /> - + {t(ToolTips.REBOOT)} +

+ {/* + onChange={editTheRebootStep(props)} /> */}
; } From bc08514f7e502259d551eb22ad336c3404b26608 Mon Sep 17 00:00:00 2001 From: Rick Carlino Date: Tue, 7 Jan 2020 15:27:59 -0600 Subject: [PATCH 2/2] Update tests to account for verbiage changes --- frontend/sequences/step_tiles/__tests__/index_test.ts | 2 +- frontend/sequences/step_tiles/__tests__/tile_reboot_test.tsx | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/sequences/step_tiles/__tests__/index_test.ts b/frontend/sequences/step_tiles/__tests__/index_test.ts index f72d527650..9586d07bba 100644 --- a/frontend/sequences/step_tiles/__tests__/index_test.ts +++ b/frontend/sequences/step_tiles/__tests__/index_test.ts @@ -189,7 +189,7 @@ describe("renderCeleryNode()", () => { }, { node: { kind: "reboot", args: { package: "farmbot_os" } }, - expected: "entire system" + expected: "power cycle farmbot's onboard computer." }, { node: { kind: "check_updates", args: { package: "farmbot_os" } }, diff --git a/frontend/sequences/step_tiles/__tests__/tile_reboot_test.tsx b/frontend/sequences/step_tiles/__tests__/tile_reboot_test.tsx index 60ab6fe6ec..7ec14dfca5 100644 --- a/frontend/sequences/step_tiles/__tests__/tile_reboot_test.tsx +++ b/frontend/sequences/step_tiles/__tests__/tile_reboot_test.tsx @@ -32,8 +32,7 @@ describe("", () => { it("renders", () => { const el = render(); const verbiage = el.text(); - expect(verbiage).toContain("Entire system"); - expect(verbiage).toContain("Just the Arduino"); + expect(verbiage).toContain("Power cycle FarmBot's onboard computer."); }); it("crashes if the step is of the wrong `kind`", () => {