Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit fc26245

Browse files
committed
Merge pull request #5391 from tjoskar/issue-5175
Gave search result panel a min-height
2 parents b6e786b + 5aff268 commit fc26245

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/search/FindInFiles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ define(function (require, exports, module) {
848848
// Initialize items dependent on HTML DOM
849849
AppInit.htmlReady(function () {
850850
var panelHtml = Mustache.render(searchPanelTemplate, Strings);
851-
searchResultsPanel = PanelManager.createBottomPanel("find-in-files.results", $(panelHtml));
851+
searchResultsPanel = PanelManager.createBottomPanel("find-in-files.results", $(panelHtml), 100);
852852

853853
$searchResults = $("#search-results");
854854
$searchSummary = $searchResults.find(".title");

src/utils/Resizer.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ define(function (require, exports, module) {
139139
* @param {!string} position Which side of the element can be dragged: one of the POSITION_* constants
140140
* (TOP/BOTTOM for vertical resizing or LEFT/RIGHT for horizontal).
141141
* @param {?number} minSize Minimum size (width or height) of the element's outer dimensions, including
142-
* border & padding. Defaults to 0.
142+
* border & padding. Defaults to DEFAULT_MIN_SIZE.
143143
* @param {?boolean} collapsible Indicates the panel is collapsible on double click on the
144144
* resizer. Defaults to false.
145145
* @param {?string} forceLeft CSS selector indicating element whose 'left' should be locked to the
@@ -162,8 +162,11 @@ define(function (require, exports, module) {
162162
elementSizeFunction = direction === DIRECTION_HORIZONTAL ? $element.width : $element.height,
163163
resizerCSSPosition = direction === DIRECTION_HORIZONTAL ? "left" : "top",
164164
contentSizeFunction = direction === DIRECTION_HORIZONTAL ? $resizableElement.width : $resizableElement.height;
165-
166-
minSize = minSize || 0;
165+
166+
if (minSize === undefined) {
167+
minSize = DEFAULT_MIN_SIZE;
168+
}
169+
167170
collapsible = collapsible || false;
168171

169172
$element.prepend($resizer);

src/view/PanelManager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ define(function (require, exports, module) {
150150
* Represents a panel below the editor area (a child of ".content").
151151
*
152152
* @param {!jQueryObject} $panel The entire panel, including any chrome, already in the DOM.
153-
* @param {number=} minSize Minimum height of panel in px; default is 0
153+
* @param {number=} minSize Minimum height of panel in px.
154154
*/
155155
function Panel($panel, minSize) {
156156
this.$panel = $panel;
@@ -187,7 +187,7 @@ define(function (require, exports, module) {
187187
*
188188
* @param {!string} id Unique id for this panel. Use package-style naming, e.g. "myextension.feature.panelname"
189189
* @param {!jQueryObject} $panel DOM content to use as the panel. Need not be in the document yet.
190-
* @param {number=} minSize Minimum height of panel in px; default is 0
190+
* @param {number=} minSize Minimum height of panel in px.
191191
* @return {!Panel}
192192
*/
193193
function createBottomPanel(id, $panel, minSize) {

0 commit comments

Comments
 (0)