diff --git a/packages/xod-client/src/core/styles/components/App.scss b/packages/xod-client/src/core/styles/components/App.scss new file mode 100644 index 00000000..5d0f7e88 --- /dev/null +++ b/packages/xod-client/src/core/styles/components/App.scss @@ -0,0 +1,13 @@ +#App { + display: flex; + flex-direction: column; + flex-wrap: nowrap; + + position: absolute; + z-index: 1; + + top: 0; + right: 0; + bottom: 0; + left: 0; +} diff --git a/packages/xod-client/src/core/styles/components/Debugger.scss b/packages/xod-client/src/core/styles/components/Debugger.scss index 18a46218..43d03a97 100644 --- a/packages/xod-client/src/core/styles/components/Debugger.scss +++ b/packages/xod-client/src/core/styles/components/Debugger.scss @@ -16,7 +16,7 @@ position: absolute; z-index: 10; bottom: 0; - height: 200px; + height: 196px; width: 100%; color: $sidebar-color-text; diff --git a/packages/xod-client/src/core/styles/components/Editor.scss b/packages/xod-client/src/core/styles/components/Editor.scss new file mode 100644 index 00000000..c097f32a --- /dev/null +++ b/packages/xod-client/src/core/styles/components/Editor.scss @@ -0,0 +1,7 @@ +.Editor { + flex-grow: 1; + + display: flex; + flex-direction: row; + align-items: stretch; +} diff --git a/packages/xod-client/src/core/styles/components/Inspector.scss b/packages/xod-client/src/core/styles/components/Inspector.scss index f26c8465..8e5ae614 100644 --- a/packages/xod-client/src/core/styles/components/Inspector.scss +++ b/packages/xod-client/src/core/styles/components/Inspector.scss @@ -1,3 +1,7 @@ +.Inspector-container { + min-height: 0; + min-width: 0 +} .Inspector { display: block; @@ -18,19 +22,19 @@ padding: 14px 17px; color: $input-color-border; // TODO: separate color? cursor: default; - + .nodeName, .patchName { color: $color-canvas-selected; // TODO: separate color? } } - + .nodeType { padding-left: 16px; color: $sidebar-color-text; font-size: $font-size-s; cursor: default; } - + .nodeHelp { display: block; position: absolute; @@ -40,13 +44,13 @@ height: 24px; border-radius: 50%; background-color: $input-color-bg; - + &:hover { background-color: #555555; box-shadow: 0 0 3px 0 rgba(0,0,0,0.5); } } - + .nodeHelpIcon { display: block; width: 24px; @@ -177,6 +181,8 @@ .inspectorTextInput { font-family: $font-family-condensed; + min-width: 100%; + max-width: 100%; width: 100%; height: 8em; } diff --git a/packages/xod-client/src/core/styles/components/PatchWrapper.scss b/packages/xod-client/src/core/styles/components/PatchWrapper.scss index a3669b93..57dc3f4d 100644 --- a/packages/xod-client/src/core/styles/components/PatchWrapper.scss +++ b/packages/xod-client/src/core/styles/components/PatchWrapper.scss @@ -1,6 +1,10 @@ +.PatchWrapper-container { + flex-grow: 1; + position: relative; +} .PatchWrapper { position: absolute; - top: 30px; + top: 0; right: 0; bottom: 0; left: 0; @@ -11,4 +15,4 @@ box-shadow: none; outline: none; } -} \ No newline at end of file +} diff --git a/packages/xod-client/src/core/styles/components/Sidebar.scss b/packages/xod-client/src/core/styles/components/Sidebar.scss index b3b7bb9f..7b33c0e2 100644 --- a/packages/xod-client/src/core/styles/components/Sidebar.scss +++ b/packages/xod-client/src/core/styles/components/Sidebar.scss @@ -1,11 +1,13 @@ .Sidebar { - position: absolute; width: $sidebar-width; - height: 100%; + display: flex; + flex-direction: column; + flex-wrap: nowrap; background: $sidebar-color-bg; & > * { + flex: 1; border-bottom: 1px solid $sidebar-color-border; } @@ -15,4 +17,4 @@ padding: 10px 20px 4px 0; color: $sidebar-color-text; } -} \ No newline at end of file +} diff --git a/packages/xod-client/src/core/styles/components/Suggester.scss b/packages/xod-client/src/core/styles/components/Suggester.scss index 2bde2cf5..315debad 100644 --- a/packages/xod-client/src/core/styles/components/Suggester.scss +++ b/packages/xod-client/src/core/styles/components/Suggester.scss @@ -2,6 +2,7 @@ position: absolute; left: 50%; top: 5%; + z-index: 10; width: 400px; margin: 0 0 0 -200px; diff --git a/packages/xod-client/src/core/styles/components/Workarea.scss b/packages/xod-client/src/core/styles/components/Workarea.scss index 98aa54b2..adcf5257 100644 --- a/packages/xod-client/src/core/styles/components/Workarea.scss +++ b/packages/xod-client/src/core/styles/components/Workarea.scss @@ -1,7 +1,10 @@ -.Workarea { - position: absolute; - left: 0; - right: 0; - height: 100%; - margin-left: 200px; +.Workarea-container { + flex-grow: 1; +} + +.Workarea { + position: relative; + height: 100%; + display: flex; + flex-direction: column; } diff --git a/packages/xod-client/src/core/styles/main.scss b/packages/xod-client/src/core/styles/main.scss index 3b0768d5..4f3c2d72 100644 --- a/packages/xod-client/src/core/styles/main.scss +++ b/packages/xod-client/src/core/styles/main.scss @@ -13,11 +13,13 @@ 'base/base'; @import + 'components/App', 'components/BackgroundLayer', 'components/Button', 'components/Breadcrumbs', 'components/Comment', 'components/Debugger', + 'components/Editor', 'components/Inspector', 'components/Helpbar', 'components/Link', diff --git a/packages/xod-client/src/editor/components/Inspector.jsx b/packages/xod-client/src/editor/components/Inspector.jsx index 93ccf7a3..3c9293d1 100644 --- a/packages/xod-client/src/editor/components/Inspector.jsx +++ b/packages/xod-client/src/editor/components/Inspector.jsx @@ -4,6 +4,7 @@ import $ from 'sanctuary-def'; import React from 'react'; import { Patch } from 'xod-project'; import { $Maybe } from 'xod-func-tools'; +import CustomScroll from 'react-custom-scroll'; import { SELECTION_ENTITY_TYPE } from '../constants'; @@ -16,6 +17,12 @@ import { RenderableSelection } from '../../types'; import sanctuaryPropType from '../../utils/sanctuaryPropType'; +// ============================================================================= +// +// Sub-components +// +// ============================================================================= + const InspectorMessage = ({ text }) => (