Skip to content

Integrate React Material Workspace Layout + Add Collapsing Sidebar #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Aug 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[options]
esproposal.optional_chaining=enable
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"react-hotkeys": "^2.0.0",
"react-json-view": "^1.19.1",
"react-markdown": "^4.0.6",
"react-material-workspace-layout": "^0.1.16",
"react-monaco-editor": "^0.25.1",
"react-remove-scroll": "^2.0.4",
"react-select": "^3.0.8",
Expand Down Expand Up @@ -66,6 +67,7 @@
"devDependencies": {
"@babel/cli": "^7.2.3",
"@babel/core": "^7.2.2",
"@babel/plugin-proposal-optional-chaining": "^7.10.4",
"@storybook/addon-actions": "^5.3.14",
"@storybook/addon-links": "^5.3.14",
"@storybook/addons": "^5.3.14",
Expand All @@ -76,7 +78,7 @@
"prettier": "^2.0.5",
"raw.macro": "^0.3.0",
"react-github-btn": "^1.1.1",
"react-scripts": "^2.1.8"
"react-scripts": "^3.4.1"
},
"prettier": {
"semi": false
Expand Down
5 changes: 3 additions & 2 deletions src/Annotator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,6 @@ export const Annotator = ({
onPrevImage,
autoSegmentationOptions = { type: "autoseg" },
}: Props) => {
if (!images && !videoSrc)
return 'Missing required prop "images" or "videoSrc"'
const annotationType = images ? "image" : "video"
const [state, dispatchToReducer] = useReducer(
historyHandler(
Expand Down Expand Up @@ -152,6 +150,9 @@ export const Annotator = ({
})
}, [selectedImage])

if (!images && !videoSrc)
return 'Missing required prop "images" or "videoSrc"'

return (
<SettingsProvider>
<MainLayout
Expand Down
14 changes: 7 additions & 7 deletions src/FullImageSegmentationAnnotator/index.story.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import FullImageSegmentationAnnotator from "./"

storiesOf("FullImageSegmentationAnnotator.Basic", module)
.add("Orange 2 Class", () => (
<div style={{ width: "100vw", height: "100vh" }}>
<div style={{ width: "95vw", height: "95vh" }}>
<FullImageSegmentationAnnotator
images={[
{
Expand Down Expand Up @@ -59,7 +59,7 @@ storiesOf("FullImageSegmentationAnnotator.Basic", module)
</div>
))
.add("S3 CORS domain", () => (
<div style={{ width: "100vw", height: "100vh" }}>
<div style={{ width: "95vw", height: "95vh" }}>
<FullImageSegmentationAnnotator
images={[
{
Expand Down Expand Up @@ -90,7 +90,7 @@ storiesOf("FullImageSegmentationAnnotator.Basic", module)
</div>
))
.add("Orange 3 Class", () => (
<div style={{ width: "100vw", height: "100vh" }}>
<div style={{ width: "95vw", height: "95vh" }}>
<FullImageSegmentationAnnotator
images={[
{
Expand Down Expand Up @@ -120,7 +120,7 @@ storiesOf("FullImageSegmentationAnnotator.Basic", module)
</div>
))
.add("Hard 1, 8 Class, Simple Mode", () => (
<div style={{ width: "100vw", height: "100vh" }}>
<div style={{ width: "95vw", height: "95vh" }}>
<FullImageSegmentationAnnotator
images={[
{
Expand All @@ -135,7 +135,7 @@ storiesOf("FullImageSegmentationAnnotator.Basic", module)
</div>
))
.add("Hard 1, 8 Class", () => (
<div style={{ width: "100vw", height: "100vh" }}>
<div style={{ width: "95vw", height: "95vh" }}>
<FullImageSegmentationAnnotator
images={[
{
Expand All @@ -149,7 +149,7 @@ storiesOf("FullImageSegmentationAnnotator.Basic", module)
</div>
))
.add("Hard 2, 8 Class", () => (
<div style={{ width: "100vw", height: "100vh" }}>
<div style={{ width: "95vw", height: "95vh" }}>
<FullImageSegmentationAnnotator
images={[
{
Expand All @@ -163,7 +163,7 @@ storiesOf("FullImageSegmentationAnnotator.Basic", module)
</div>
))
.add("Hard 3, 8 Class", () => (
<div style={{ width: "100vw", height: "100vh" }}>
<div style={{ width: "95vw", height: "95vh" }}>
<FullImageSegmentationAnnotator
images={[
{
Expand Down
107 changes: 0 additions & 107 deletions src/Header/index.js

This file was deleted.

25 changes: 0 additions & 25 deletions src/Header/styles.js

This file was deleted.

54 changes: 0 additions & 54 deletions src/HeaderButton/index.js

This file was deleted.

46 changes: 0 additions & 46 deletions src/ImageMask/index.story.js

This file was deleted.

1 change: 1 addition & 0 deletions src/KeyframeTimeline/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const Container = styled("div")({
display: "flex",
flexGrow: 1,
minWidth: 240,
height: 64,
marginLeft: 16,
marginRight: 16,
})
Expand Down
Loading