Преглед изворни кода

HUE-3576 [editor] Snippet resizer is wonky when error is present

Johan Ahlen пре 9 година
родитељ
комит
bb898b1b7c

+ 2 - 1
desktop/core/src/desktop/static/desktop/js/ko.hue-bindings.js

@@ -1389,6 +1389,7 @@
       var $target = $(options.target);
       var $resizer = $(element);
       var $rightPanel = $(".right-panel");
+      var $execStatus = $resizer.prev('.snippet-execution-status');
 
       var lastEditorSize = $.totalStorage('hue.editor.editor.size') || 128;
       var editorHeight = Math.floor(lastEditorSize / 16);
@@ -1416,7 +1417,7 @@
         start: options.onStart ? options.onStart : function(){},
         drag: function (event, ui) {
           autoExpand = false;
-          var currentHeight = ui.offset.top + $rightPanel.scrollTop() - 120;
+          var currentHeight = ui.offset.top + $rightPanel.scrollTop() - (125 + $execStatus.outerHeight(true));
           $target.css("height", currentHeight + "px");
           ace().resize();
           ui.offset.top = 0;

+ 2 - 2
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -1076,12 +1076,12 @@ ${ hueIcons.symbols() }
         <div class="bar" data-bind="style: {'width': (errors().length > 0 ? 100 : Math.max(1,progress())) + '%'}"></div>
       </div>
     </div>
-    <div class="snippet-error-container alert alert-error alert-error-gradient" data-bind="visible: errors().length > 0">
+    <div class="snippet-error-container alert alert-error alert-error-gradient" style="margin-bottom: 0" data-bind="visible: errors().length > 0">
       <ul class="unstyled" data-bind="foreach: errors">
         <li data-bind="text: message"></li>
       </ul>
     </div>
-    <div class="snippet-error-container alert alert-error alert-error-gradient" data-bind="visible: status() == 'canceled'">
+    <div class="snippet-error-container alert alert-error alert-error-gradient" style="margin-bottom: 0" data-bind="visible: status() == 'canceled'">
       <ul class="unstyled">
         <li>${ _("The statement was canceled.") }</li>
       </ul>