Skip to content

Commit 51ac411

Browse files
committed
fix: terminal integ tests working in windows
1 parent 47227f8 commit 51ac411

8 files changed

Lines changed: 267 additions & 121 deletions

File tree

docs/API-Reference/command/Commands.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,12 @@ Toggles code inspection
530530
## VIEW\_TOGGLE\_PROBLEMS
531531
Toggles problems panel visibility
532532

533+
**Kind**: global variable
534+
<a name="VIEW_TERMINAL"></a>
535+
536+
## VIEW\_TERMINAL
537+
Opens the terminal panel
538+
533539
**Kind**: global variable
534540
<a name="TOGGLE_LINE_NUMBERS"></a>
535541

docs/API-Reference/view/PanelView.md

Lines changed: 69 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ const PanelView = brackets.getModule("view/PanelView")
1414
* [.isVisible()](#Panel+isVisible) ⇒ <code>boolean</code>
1515
* [.registerCanBeShownHandler(canShowHandlerFn)](#Panel+registerCanBeShownHandler) ⇒ <code>boolean</code>
1616
* [.canBeShown()](#Panel+canBeShown) ⇒ <code>boolean</code>
17+
* [.registerOnCloseRequestedHandler(handler)](#Panel+registerOnCloseRequestedHandler)
18+
* [.requestClose()](#Panel+requestClose) ⇒ <code>Promise.&lt;boolean&gt;</code>
1719
* [.show()](#Panel+show)
1820
* [.hide()](#Panel+hide)
21+
* [.focus()](#Panel+focus) ⇒ <code>boolean</code>
1922
* [.setVisible(visible)](#Panel+setVisible)
2023
* [.setTitle(newTitle)](#Panel+setTitle)
2124
* [.destroy()](#Panel+destroy)
@@ -49,8 +52,7 @@ Determines if the panel is visible
4952
<a name="Panel+registerCanBeShownHandler"></a>
5053

5154
### panel.registerCanBeShownHandler(canShowHandlerFn) ⇒ <code>boolean</code>
52-
Registers a call back function that will be called just before panel is shown. The handler should return true
53-
if the panel can be shown, else return false and the panel will not be shown.
55+
Registers a call back function that will be called just before panel is shown. The handler should return trueif the panel can be shown, else return false and the panel will not be shown.
5456

5557
**Kind**: instance method of [<code>Panel</code>](#Panel)
5658
**Returns**: <code>boolean</code> - true if visible, false if not
@@ -65,6 +67,24 @@ if the panel can be shown, else return false and the panel will not be shown.
6567
Returns true if th panel can be shown, else false.
6668

6769
**Kind**: instance method of [<code>Panel</code>](#Panel)
70+
<a name="Panel+registerOnCloseRequestedHandler"></a>
71+
72+
### panel.registerOnCloseRequestedHandler(handler)
73+
Registers an async handler that is called before the panel is closed via user interaction (e.g. clicking thetab close button). The handler should return `true` to allow the close, or `false` to prevent it.
74+
75+
**Kind**: instance method of [<code>Panel</code>](#Panel)
76+
77+
| Param | Type | Description |
78+
| --- | --- | --- |
79+
| handler | <code>function</code> \| <code>null</code> | An async function returning a boolean, or null to clear the handler. |
80+
81+
<a name="Panel+requestClose"></a>
82+
83+
### panel.requestClose() ⇒ <code>Promise.&lt;boolean&gt;</code>
84+
Requests the panel to hide, invoking the registered onCloseRequested handler first (if any).If the handler returns false, the panel stays open. If it returns true or no handler isregistered, `hide()` is called.
85+
86+
**Kind**: instance method of [<code>Panel</code>](#Panel)
87+
**Returns**: <code>Promise.&lt;boolean&gt;</code> - Resolves to true if the panel was hidden, false if prevented.
6888
<a name="Panel+show"></a>
6989

7090
### panel.show()
@@ -77,6 +97,13 @@ Shows the panel
7797
Hides the panel
7898

7999
**Kind**: instance method of [<code>Panel</code>](#Panel)
100+
<a name="Panel+focus"></a>
101+
102+
### panel.focus() ⇒ <code>boolean</code>
103+
Attempts to focus the panel. Override this in panels that support focus(e.g. terminal). The default implementation returns false.
104+
105+
**Kind**: instance method of [<code>Panel</code>](#Panel)
106+
**Returns**: <code>boolean</code> - true if the panel accepted focus, false otherwise
80107
<a name="Panel+setVisible"></a>
81108

82109
### panel.setVisible(visible)
@@ -102,8 +129,7 @@ Updates the display title shown in the tab bar for this panel.
102129
<a name="Panel+destroy"></a>
103130

104131
### panel.destroy()
105-
Destroys the panel, removing it from the tab bar, internal maps, and the DOM.
106-
After calling this, the Panel instance should not be reused.
132+
Destroys the panel, removing it from the tab bar, internal maps, and the DOM.After calling this, the Panel instance should not be reused.
107133

108134
**Kind**: instance method of [<code>Panel</code>](#Panel)
109135
<a name="Panel+getPanelType"></a>
@@ -171,6 +197,18 @@ The editor holder element, passed from WorkspaceManager
171197
## \_recomputeLayout : <code>function</code>
172198
recomputeLayout callback from WorkspaceManager
173199

200+
**Kind**: global variable
201+
<a name="_defaultPanelId"></a>
202+
203+
## \_defaultPanelId : <code>string</code> \| <code>null</code>
204+
The default/quick-access panel ID
205+
206+
**Kind**: global variable
207+
<a name="_$addBtn"></a>
208+
209+
## \_$addBtn : <code>jQueryObject</code>
210+
The "+" button inside the tab overflow area
211+
174212
**Kind**: global variable
175213
<a name="EVENT_PANEL_HIDDEN"></a>
176214

@@ -193,24 +231,25 @@ type for bottom panel
193231
<a name="MAXIMIZE_THRESHOLD"></a>
194232

195233
## MAXIMIZE\_THRESHOLD : <code>number</code>
196-
Pixel threshold for detecting near-maximize state during resize.
197-
If the editor holder height is within this many pixels of zero, the
198-
panel is treated as maximized. Keeps the maximize icon responsive
199-
during drag without being overly sensitive.
234+
Pixel threshold for detecting near-maximize state during resize.If the editor holder height is within this many pixels of zero, thepanel is treated as maximized. Keeps the maximize icon responsiveduring drag without being overly sensitive.
200235

201236
**Kind**: global constant
202237
<a name="MIN_PANEL_HEIGHT"></a>
203238

204239
## MIN\_PANEL\_HEIGHT : <code>number</code>
205-
Minimum panel height (matches Resizer minSize) used as a floor
206-
when computing a sensible restore height.
240+
Minimum panel height (matches Resizer minSize) used as a floorwhen computing a sensible restore height.
241+
242+
**Kind**: global constant
243+
<a name="PREF_BOTTOM_PANEL_MAXIMIZED"></a>
244+
245+
## PREF\_BOTTOM\_PANEL\_MAXIMIZED
246+
Preference key for persisting the maximize state across reloads.
207247

208248
**Kind**: global constant
209249
<a name="init"></a>
210250

211-
## init($container, $tabBar, $tabsOverflow, $editorHolder, recomputeLayoutFn)
212-
Initializes the PanelView module with references to the bottom panel container DOM elements.
213-
Called by WorkspaceManager during htmlReady.
251+
## init($container, $tabBar, $tabsOverflow, $editorHolder, recomputeLayoutFn, defaultPanelId)
252+
Initializes the PanelView module with references to the bottom panel container DOM elements.Called by WorkspaceManager during htmlReady.
214253

215254
**Kind**: global function
216255

@@ -221,30 +260,24 @@ Called by WorkspaceManager during htmlReady.
221260
| $tabsOverflow | <code>jQueryObject</code> | The scrollable area holding tab elements. |
222261
| $editorHolder | <code>jQueryObject</code> | The editor holder element (for maximize height calculation). |
223262
| recomputeLayoutFn | <code>function</code> | Callback to trigger workspace layout recomputation. |
263+
| defaultPanelId | <code>string</code> | The ID of the default/quick-access panel. |
224264

225265
<a name="exitMaximizeOnResize"></a>
226266

227267
## exitMaximizeOnResize()
228-
Exit maximize state without resizing (for external callers like drag-resize).
229-
Clears internal maximize state and resets the button icon.
268+
Exit maximize state without resizing (for external callers like drag-resize).Clears internal maximize state and resets the button icon.
230269

231270
**Kind**: global function
232271
<a name="enterMaximizeOnResize"></a>
233272

234273
## enterMaximizeOnResize()
235-
Enter maximize state during a drag-resize that reaches the maximum
236-
height. No pre-maximize height is stored because the user arrived
237-
here via continuous dragging; a sensible default will be computed if
238-
they later click the Restore button.
274+
Enter maximize state during a drag-resize that reaches the maximumheight. No pre-maximize height is stored because the user arrivedhere via continuous dragging; a sensible default will be computed ifthey later click the Restore button.
239275

240276
**Kind**: global function
241277
<a name="restoreIfMaximized"></a>
242278

243279
## restoreIfMaximized()
244-
Restore the container's CSS height to the pre-maximize value and clear maximize state.
245-
Must be called BEFORE Resizer.hide() so the Resizer reads the correct height.
246-
If not maximized, this is a no-op.
247-
When the saved height is near-max or unknown, a sensible default is used.
280+
Restore the container's CSS height to the pre-maximize value and clear maximize state.Must be called BEFORE Resizer.hide() so the Resizer reads the correct height.If not maximized, this is a no-op.When the saved height is near-max or unknown, a sensible default is used.
248281

249282
**Kind**: global function
250283
<a name="isMaximized"></a>
@@ -266,3 +299,16 @@ Hides every open bottom panel tab in a single batch
266299

267300
**Kind**: global function
268301
**Returns**: <code>Array.&lt;string&gt;</code> - The IDs of panels that were open (useful for restoring later).
302+
<a name="getActiveBottomPanel"></a>
303+
304+
## getActiveBottomPanel() ⇒ [<code>Panel</code>](#Panel) \| <code>null</code>
305+
Returns the currently active (visible) bottom panel, or null if none.
306+
307+
**Kind**: global function
308+
<a name="showNextPanel"></a>
309+
310+
## showNextPanel() ⇒ <code>boolean</code>
311+
Cycle to the next open bottom panel tab. If the container is hiddenor no panels are open, does nothing and returns false.
312+
313+
**Kind**: global function
314+
**Returns**: <code>boolean</code> - true if a panel switch occurred

docs/API-Reference/view/PluginPanelView.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ const PluginPanelView = brackets.getModule("view/PluginPanelView")
1414
* [.isVisible()](#Panel+isVisible) ⇒ <code>boolean</code>
1515
* [.registerCanBeShownHandler(canShowHandlerFn)](#Panel+registerCanBeShownHandler) ⇒ <code>boolean</code>
1616
* [.canBeShown()](#Panel+canBeShown) ⇒ <code>boolean</code>
17+
* [.registerOnCloseRequestedHandler(handler)](#Panel+registerOnCloseRequestedHandler)
18+
* [.requestClose()](#Panel+requestClose) ⇒ <code>Promise.&lt;boolean&gt;</code>
1719
* [.show()](#Panel+show)
1820
* [.hide()](#Panel+hide)
1921
* [.setVisible(visible)](#Panel+setVisible)
@@ -49,8 +51,7 @@ Determines if the panel is visible
4951
<a name="Panel+registerCanBeShownHandler"></a>
5052

5153
### panel.registerCanBeShownHandler(canShowHandlerFn) ⇒ <code>boolean</code>
52-
Registers a call back function that will be called just before panel is shown. The handler should return true
53-
if the panel can be shown, else return false and the panel will not be shown.
54+
Registers a call back function that will be called just before panel is shown. The handler should return trueif the panel can be shown, else return false and the panel will not be shown.
5455

5556
**Kind**: instance method of [<code>Panel</code>](#Panel)
5657
**Returns**: <code>boolean</code> - true if visible, false if not
@@ -65,6 +66,24 @@ if the panel can be shown, else return false and the panel will not be shown.
6566
Returns true if th panel can be shown, else false.
6667

6768
**Kind**: instance method of [<code>Panel</code>](#Panel)
69+
<a name="Panel+registerOnCloseRequestedHandler"></a>
70+
71+
### panel.registerOnCloseRequestedHandler(handler)
72+
Registers an async handler that is called before the panel is closed via user interaction.The handler should return `true` to allow the close, or `false` to prevent it.
73+
74+
**Kind**: instance method of [<code>Panel</code>](#Panel)
75+
76+
| Param | Type | Description |
77+
| --- | --- | --- |
78+
| handler | <code>function</code> \| <code>null</code> | An async function returning a boolean, or null to clear the handler. |
79+
80+
<a name="Panel+requestClose"></a>
81+
82+
### panel.requestClose() ⇒ <code>Promise.&lt;boolean&gt;</code>
83+
Requests the panel to hide, invoking the registered onCloseRequested handler first (if any).If the handler returns false, the panel stays open. If it returns true or no handler isregistered, `hide()` is called.
84+
85+
**Kind**: instance method of [<code>Panel</code>](#Panel)
86+
**Returns**: <code>Promise.&lt;boolean&gt;</code> - Resolves to true if the panel was hidden, false if prevented.
6887
<a name="Panel+show"></a>
6988

7089
### panel.show()

0 commit comments

Comments
 (0)