Skip to content

Commit

Permalink
Merge pull request #1925 from FarmBot/staging
Browse files Browse the repository at this point in the history
v11.0.0 - Lucky Lavander
  • Loading branch information
RickCarlino committed Aug 19, 2020
2 parents d9b233c + b6dcd3d commit 1104adf
Show file tree
Hide file tree
Showing 116 changed files with 2,649 additions and 1,725 deletions.
8 changes: 4 additions & 4 deletions db/seeds.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

if Rails.env == "development"
POINT_COUNT = 8
PLANT_COUNT = 8
Expand All @@ -13,6 +12,7 @@
tomato turnip zucchini)

[
FarmwareEnv,
Alert,
Sensor,
Peripheral,
Expand Down Expand Up @@ -60,8 +60,8 @@
Images::Create.run!(attachment_url: url,
device: u.device,
meta: { x: rand(40...970),
y: rand(40...470),
z: rand(1...300) })
y: rand(40...470),
z: rand(1...300) })
end

all_of_em = []
Expand Down Expand Up @@ -100,7 +100,7 @@
s = Sequences::Create.run!(device: u.device,
name: "Goto 0, 0, 0",
body: [{ kind: "move_absolute", args: { location: { kind: "coordinate", args: { x: 0,
y: 0, z: 0 } }, offset: { kind: "coordinate", args: { x: 0, y: 0, z: 0 } }, speed: 100 } }])
y: 0, z: 0 } }, offset: { kind: "coordinate", args: { x: 0, y: 0, z: 0 } }, speed: 100 } }])
t = Tools::Create.run!(name: "Trench Digging Tool", device: u.device)
body_txt = File.read("spec/lib/celery_script/ast_fixture4.json")
.gsub("__SEQUENCE_ID__", s[:id].to_s)
Expand Down
7 changes: 5 additions & 2 deletions db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1735,7 +1735,9 @@ CREATE TABLE public.web_app_configs (
display_map_missed_steps boolean DEFAULT false,
time_format_seconds boolean DEFAULT false,
crop_images boolean DEFAULT false,
show_camera_view_area boolean DEFAULT false
show_camera_view_area boolean DEFAULT false,
view_celery_script boolean DEFAULT false,
highlight_modified_settings boolean DEFAULT false
);


Expand Down Expand Up @@ -3393,6 +3395,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20200630190226'),
('20200704150931'),
('20200801150609'),
('20200804150609');
('20200804150609'),
('20200807182602');


2 changes: 1 addition & 1 deletion frontend/__test_support__/fake_camera_data.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CameraCalibrationData } from "../farm_designer/interfaces";
import { ImageShowFlags } from "../photos/images/shown_in_map";
import { ImageShowFlags } from "../photos/images/interfaces";

export const fakeCameraCalibrationData = (): CameraCalibrationData => ({
offset: { x: undefined, y: undefined },
Expand Down
11 changes: 8 additions & 3 deletions frontend/__tests__/entry_test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,22 @@ jest.mock("../i18n", () => ({
detectLanguage: jest.fn(() => Promise.resolve())
}));

jest.mock("../util/stop_ie", () => ({ stopIE: jest.fn() }));
jest.mock("../routes", () => ({ attachAppToDom: { mock: "Yeah" } }));
jest.mock("../util/stop_ie", () => ({
stopIE: jest.fn(),
temporarilyStopFrames: jest.fn()
}));

jest.mock("../routes", () => ({ attachAppToDom: jest.fn() }));

import { stopIE } from "../util/stop_ie";
import { stopIE, temporarilyStopFrames } from "../util/stop_ie";
import { detectLanguage } from "../i18n";
import I from "i18next";

describe("entry file", () => {
it("Calls the expected callbacks", async () => {
await import("../entry");

expect(temporarilyStopFrames).toHaveBeenCalled();
expect(stopIE).toHaveBeenCalled();
expect(detectLanguage).toHaveBeenCalled();
expect(I.init).toHaveBeenCalled();
Expand Down
8 changes: 4 additions & 4 deletions frontend/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,6 @@ export namespace ToolTips {
press IMPORT to import new hardware parameters to your FarmBot.`);

// Photos
export const PHOTOS =
trim(`Take and view photos with your FarmBot's camera.`);

export const WEED_DETECTOR =
trim(`Detect weeds using FarmBot's camera and display them on the
Farm Designer map.`);
Expand Down Expand Up @@ -1476,9 +1473,12 @@ export enum Actions {
SET_SEQUENCE_POPUP_STATE = "SET_SEQUENCE_POPUP_STATE",
SET_SEQUENCE_STEP_POSITION = "SET_SEQUENCE_STEP_POSITION",

// Photos
SELECT_IMAGE = "SELECT_IMAGE",
SET_IMAGE_SIZE = "SET_IMAGE_SIZE",

// Farmware
SELECT_FARMWARE = "SELECT_FARMWARE",
SELECT_IMAGE = "SELECT_IMAGE",
FETCH_FIRST_PARTY_FARMWARE_NAMES_OK = "FETCH_FIRST_PARTY_FARMWARE_NAMES_OK",
SET_FARMWARE_INFO_STATE = "SET_FARMWARE_INFO_STATE",

Expand Down
4 changes: 1 addition & 3 deletions frontend/controls/move/jog_buttons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import { JogMovementControlsProps } from "./interfaces";
import { getDevice } from "../../device";
import { buildDirectionProps } from "./direction_axes_props";
import { t } from "../../i18next_wrapper";
import {
cameraBtnProps,
} from "../../settings/fbos_settings/camera_selection";
import { cameraBtnProps } from "../../photos/capture_settings/camera_selection";
const DEFAULT_STEP_SIZE = 100;

/*
Expand Down
4 changes: 1 addition & 3 deletions frontend/controls_popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ import { buildDirectionProps } from "./controls/move/direction_axes_props";
import { ControlsPopupProps } from "./controls/move/interfaces";
import { commandErr } from "./devices/actions";
import { mapPanelClassName } from "./farm_designer/map/util";
import {
cameraBtnProps,
} from "./settings/fbos_settings/camera_selection";
import { cameraBtnProps } from "./photos/capture_settings/camera_selection";
import { t } from "./i18next_wrapper";
import { getPathArray } from "./history";

Expand Down
28 changes: 28 additions & 0 deletions frontend/css/farm_designer/farm_designer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,10 @@
}
th {
text-align: center;
label {
margin: 0;
line-height: unset !important;
}
}
.bp3-slider {
margin-left: 3rem;
Expand All @@ -801,6 +805,30 @@
input {
background: $white;
}
.fa-step-backward,
.fa-caret-left,
.fa-caret-right,
.fa-step-forward {
line-height: 1.3rem;
font-weight: bold;
vertical-align: middle;
}
.fa-caret-left,
.fa-caret-right {
font-size: 1.4rem;
}
.fa-step-backward,
.fa-step-forward {
font-size: 1rem;
}
.fa-step-backward,
.fa-caret-left {
margin-right: 1rem;
}
.fa-caret-right,
.fa-step-forward {
margin-left: 1rem;
}
}

.image-options {
Expand Down
164 changes: 122 additions & 42 deletions frontend/css/farm_designer/farm_designer_panels.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1604,14 +1604,23 @@

.photos-panel {
.panel-content {
padding-top: 4rem;
position: relative;
padding-top: 6rem;
max-height: calc(100vh - 9rem);
overflow-y: auto;
overflow-x: hidden;
label {
margin-top: 0 !important;
}
a,
button {
margin: 0.5rem;
}
.filter-search {
button {
margin: 0;
}
}
fieldset {
label {
margin-top: 0.7rem;
Expand All @@ -1624,6 +1633,106 @@
.expandable-header {
margin-top: 2rem;
}
.filters-enabled-warning {
float: right;
}
.fa-exclamation-triangle {
font-size: 1.3rem;
color: $orange;
}
.toggle-label {
margin-top: 0 !important;
margin-bottom: 1rem;
}
.fb-toggle-button {
margin-top: 0.5rem !important;
}
.photo-filter-settings {
label {
line-height: 3rem;
}
.filter-controls {
.banner {
display: none;
}
&.single-image-mode,
&.image-layer-disabled {
opacity: 0.40;
* {
pointer-events: none;
}
.banner {
display: inline-block;
position: absolute;
top: 25%;
left: -2.5%;
z-index: 10;
width: 105%;
padding: 0.5rem;
background-color: $dark_gray;
opacity: 0.90;
color: $off_white;
font-size: 1.8rem;
vertical-align: middle;
text-align: center;
}
}
}
}
.capture-settings {
.help-icon {
margin-left: 1rem;
font-size: 1.2rem;
}
.row {
margin-right: 0;
margin-top: 0.5rem;
}
label {
margin: 0;
line-height: 3rem;
font-style: normal;
}
.bp3-popover-wrapper {
display: inline;
margin-left: 0.5rem;
}
.fb-toggle-button {
margin-top: 2rem;
}
.image-size-inputs {
margin-top: 1rem;
.size-inputs {
margin-top: 1rem;
}
.input {
margin-left: 0.25rem;
margin-right: -0.75rem;
input {
height: 3rem;
}
}
}
.version-string {
display: inline;
margin-left: 1rem;
}
.capture-rotate-setting {
margin-top: 1rem;
margin-bottom: 1rem;
}
}
.imaging-data-management {
label {
line-height: 3rem;
}
.highlight-modified-toggle {
label {
margin-top: 0.5rem;
margin-left: 0.5rem;
}
}
}
}
.title-help {
font-size: 1.3rem;
Expand Down Expand Up @@ -1655,48 +1764,19 @@
margin-bottom: 0;
}
}
.title-help.photos-tooltip {
.title-help-text.open {
display: inline;
}
.title-help-text-text {
display: block;
}
.fa-question-circle {
position: relative;
top: unset;
right: unset;
}
.photos-settings {
margin-bottom: 4rem;
label {
margin-left: 0.5rem;
font-style: normal;
}
.bp3-popover-wrapper {
display: inline;
margin-left: 0.5rem;
}
.fb-toggle-button {
padding-top: unset;
margin-top: 2rem;
}
.image-size-inputs {
margin-top: 1rem;
label {
margin-top: 0;
}
.resolution {
margin-left: 0;
}
}
}
.bp3-collapse::-webkit-scrollbar {
display: none !important;
width: 0px !important;
background-color: transparent !important;
}
.highlight-modified-toggle {
label {
margin-top: 0.5rem;
margin-left: 0.5rem;
}
.disable_scrollbar::-webkit-scrollbar {
width: 0px;
background: transparent;
}
.bp3-collapse-body::-webkit-scrollbar {
display: none !important;
width: 0px !important;
background-color: transparent !important;
}
}

Expand Down
1 change: 1 addition & 0 deletions frontend/css/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,7 @@ ul {
font-weight: 300;
font-size: 1.4rem;
line-height: 2rem;
margin-top: 0;
}
li:before {
content: "";
Expand Down

0 comments on commit 1104adf

Please sign in to comment.