-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1bc2663
commit 748cbf0
Showing
22 changed files
with
274 additions
and
64 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<% # Intentionally blank %> | ||
<style> | ||
body { | ||
margin: 0; | ||
} | ||
</style> |
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
9 changes: 9 additions & 0 deletions
9
db/migrate/20240625195838_add_three_d_garden_to_web_app_config.rb
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,9 @@ | ||
class AddThreeDGardenToWebAppConfig < ActiveRecord::Migration[6.1] | ||
def up | ||
add_column :web_app_configs, :three_d_garden, :boolean, default: false | ||
end | ||
|
||
def down | ||
remove_column :web_app_configs, :three_d_garden | ||
end | ||
end |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1201,3 +1201,10 @@ | |
} | ||
} | ||
} | ||
|
||
.three-d-garden { | ||
position: relative; | ||
height: 100vh; | ||
width: 100vw; | ||
cursor: grab; | ||
} |
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
13 changes: 13 additions & 0 deletions
13
frontend/farm_designer/__tests__/three_d_garden_map_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,13 @@ | ||
import React from "react"; | ||
import { mount } from "enzyme"; | ||
import { ThreeDGardenMapProps, ThreeDGardenMap } from "../three_d_garden_map"; | ||
|
||
describe("<ThreeDGardenMap />", () => { | ||
const fakeProps = (): ThreeDGardenMapProps => ({ | ||
}); | ||
|
||
it("renders", () => { | ||
const wrapper = mount(<ThreeDGardenMap {...fakeProps()} />); | ||
expect(wrapper.html()).toContain("three-d-garden"); | ||
}); | ||
}); |
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
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,10 @@ | ||
import React from "react"; | ||
import { ThreeDGarden } from "../three_d_garden"; | ||
|
||
export interface ThreeDGardenMapProps { | ||
} | ||
|
||
export const ThreeDGardenMap = (props: ThreeDGardenMapProps) => { | ||
props; | ||
return <ThreeDGarden />; | ||
}; |
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,11 @@ | ||
jest.mock("../../util/page", () => ({ entryPoint: jest.fn() })); | ||
|
||
import { entryPoint } from "../../util"; | ||
import { Promo } from "../promo"; | ||
|
||
describe("Promo loader", () => { | ||
it("calls entryPoint", async () => { | ||
await import("../index"); | ||
expect(entryPoint).toHaveBeenCalledWith(Promo); | ||
}); | ||
}); |
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,11 @@ | ||
import React from "react"; | ||
import { shallow } from "enzyme"; | ||
import { Promo } from "../promo"; | ||
|
||
describe("<Promo />", () => { | ||
it("renders", () => { | ||
console.error = jest.fn(); | ||
const wrapper = shallow(<Promo />); | ||
expect(wrapper.html()).toContain("three-d-garden"); | ||
}); | ||
}); |
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,4 @@ | ||
import { entryPoint } from "../util"; | ||
import { Promo } from "./promo"; | ||
|
||
entryPoint(Promo); |
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,5 @@ | ||
import React from "react"; | ||
import { ThreeDGarden } from "../three_d_garden"; | ||
|
||
export const Promo = () => | ||
<ThreeDGarden />; |
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
Oops, something went wrong.