diff --git a/services/web/app/views/project/editor/file-tree.pug b/services/web/app/views/project/editor/file-tree.pug index 98984cbe26..b7927fbb71 100644 --- a/services/web/app/views/project/editor/file-tree.pug +++ b/services/web/app/views/project/editor/file-tree.pug @@ -4,6 +4,8 @@ aside.editor-sidebar.full-size( ng-show="ui.view != 'history' || !history.isV2" vertical-resizable-panes=user.alphaProgram && "outline-resizer" vertical-resizable-panes-toggled-externally-on=user.alphaProgram && "outline-toggled" + vertical-resizable-panes-min-size=user.alphaProgram && "32" + vertical-resizable-panes-max-size=user.alphaProgram && "75%" ) .file-tree( vertical-resizable-top=user.alphaProgram diff --git a/services/web/frontend/js/ide/directives/verticalResizablePanes.js b/services/web/frontend/js/ide/directives/verticalResizablePanes.js index 1c9bc2decb..d11ae3badf 100644 --- a/services/web/frontend/js/ide/directives/verticalResizablePanes.js +++ b/services/web/frontend/js/ide/directives/verticalResizablePanes.js @@ -10,7 +10,7 @@ const layoutOptions = { paneSelector: '[vertical-resizable-bottom]', paneClass: 'vertical-resizable-bottom', resizerClass: 'vertical-resizable-resizer', - resizerCursor: 'row-resize', + resizerCursor: 'ns-resize', size: 'auto', resizable: true, closable: false, @@ -24,7 +24,9 @@ const layoutOptions = { export default App.directive('verticalResizablePanes', localStorage => ({ restrict: 'A', link(scope, element, attrs) { - let name = attrs.verticalResizablePanes + const name = attrs.verticalResizablePanes + const minSize = attrs.verticalResizablePanesMinSize + const maxSize = attrs.verticalResizablePanesMaxSize let storedSize = null let manualResizeIncoming = false @@ -79,6 +81,14 @@ export default App.directive('verticalResizablePanes', localStorage => ({ }) } + if (maxSize) { + layoutOptions.south.maxSize = maxSize + } + + if (minSize) { + layoutOptions.south.minSize = minSize + } + // The `drag` event fires only when the user manually resizes the panes; the `resize` event fires even when // the layout library internally resizes itself. In order to get explicit user-initiated resizes, we need to // listen to `drag` events. However, when the `drag` event fires, the panes aren't yet finished sizing so we diff --git a/services/web/frontend/stylesheets/app/editor/file-tree.less b/services/web/frontend/stylesheets/app/editor/file-tree.less index 71c56124c9..b0908662a2 100644 --- a/services/web/frontend/stylesheets/app/editor/file-tree.less +++ b/services/web/frontend/stylesheets/app/editor/file-tree.less @@ -11,6 +11,7 @@ .editor-sidebar { display: flex; flex-direction: column; + background-color: @file-tree-bg; } .file-tree { @@ -31,7 +32,6 @@ flex-direction: column; flex-grow: 1; overflow-y: auto; - background-color: @file-tree-bg; &.no-toolbar { top: 0; diff --git a/services/web/frontend/stylesheets/app/editor/outline.less b/services/web/frontend/stylesheets/app/editor/outline.less index 0dee4f1540..74fb47e471 100644 --- a/services/web/frontend/stylesheets/app/editor/outline.less +++ b/services/web/frontend/stylesheets/app/editor/outline.less @@ -156,6 +156,8 @@ &:hover, &:focus { outline: 0; + } + &:hover { background-color: @file-tree-item-hover-bg; } } diff --git a/services/web/frontend/stylesheets/components/vertical-resizable-panes.less b/services/web/frontend/stylesheets/components/vertical-resizable-panes.less index 3f4694c068..f167835de1 100644 --- a/services/web/frontend/stylesheets/components/vertical-resizable-panes.less +++ b/services/web/frontend/stylesheets/components/vertical-resizable-panes.less @@ -18,4 +18,8 @@ .vertical-resizable-resizer-disabled { pointer-events: none; + opacity: 0.5; + &::after { + opacity: 0.5; + } }