Skip to content

Commit ed9b520

Browse files
committed
fix: docusaurus build break
1 parent 8959c81 commit ed9b520

3 files changed

Lines changed: 113 additions & 11 deletions

File tree

docs/API-Reference/view/SidebarTabs.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ cached jQuery/DOM references held by extensions remain valid.
3333
* [.removeTab(id)](#module_view/SidebarTabs..removeTab) ⇒ <code>boolean</code>
3434
* [.setActiveTab(id)](#module_view/SidebarTabs..setActiveTab)
3535
* [.getActiveTab()](#module_view/SidebarTabs..getActiveTab) ⇒ <code>string</code>
36-
* [.getAllTabs()](#module_view/SidebarTabs..getAllTabs) ⇒ <code>Array.&lt;{id: string, label: string, iconClass: string, priority: number}&gt;</code>
36+
* [.TabDescriptor](#module_view/SidebarTabs..TabDescriptor) ⇒ <code>Array.&lt;TabDescriptor&gt;</code>
3737

3838
<a name="module_view/SidebarTabs..SIDEBAR_TAB_FILES"></a>
3939

@@ -146,9 +146,18 @@ tab, hides all others.
146146
Get the currently active tab id.
147147

148148
**Kind**: inner method of [<code>view/SidebarTabs</code>](#module_view/SidebarTabs)
149-
<a name="module_view/SidebarTabs..getAllTabs"></a>
149+
<a name="module_view/SidebarTabs..TabDescriptor"></a>
150150

151-
### view/SidebarTabs.getAllTabs() ⇒ <code>Array.&lt;{id: string, label: string, iconClass: string, priority: number}&gt;</code>
151+
### view/SidebarTabs.TabDescriptor ⇒ <code>Array.&lt;TabDescriptor&gt;</code>
152152
Get an array of all registered tab descriptors.
153153

154-
**Kind**: inner method of [<code>view/SidebarTabs</code>](#module_view/SidebarTabs)
154+
**Kind**: inner typedef of [<code>view/SidebarTabs</code>](#module_view/SidebarTabs)
155+
**Properties**
156+
157+
| Name | Type | Description |
158+
| --- | --- | --- |
159+
| id | <code>string</code> | Unique tab identifier |
160+
| label | <code>string</code> | Display text shown in the tab bar |
161+
| iconClass | <code>string</code> | Icon class string |
162+
| priority | <code>number</code> | Sort priority (lower = further left) |
163+

docs/API-Reference/widgets/NotificationUI.md

Lines changed: 93 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,43 @@ const NotificationUI = brackets.getModule("widgets/NotificationUI")
66
<a name="module_widgets/NotificationUI"></a>
77

88
## widgets/NotificationUI
9-
The global NotificationUI can be used to create popup notifications over dom elements or generics app notifications.A global `window.EventManager` object is made available in phoenix that can be called anytime after AppStart.This global can be triggered from anywhere without using require context.## Usage### Simple exampleFor Eg. Let's say we have to create a popup notification over the HTML element with ID `showInfileTree`.We can do this with the following
9+
The global NotificationUI can be used to create popup notifications over dom elements or generics app notifications.
10+
11+
A global `window.EventManager` object is made available in phoenix that can be called anytime after AppStart.
12+
This global can be triggered from anywhere without using require context.
13+
14+
## Usage
15+
### Simple example
16+
For Eg. Let's say we have to create a popup notification over the HTML element with ID `showInfileTree`.
17+
We can do this with the following
1018

1119
**Example**
12-
```jsconst NotificationUI = brackets.getModule("widgets/NotificationUI");// or use window.NotificationUI global object has the same effect.let notification = NotificationUI.createFromTemplate("Click me to locate the file in file tree", "showInfileTree",{});notification.done(()=>{ console.log("notification is closed in ui.");})```### Advanced exampleAnother advanced example where you can specify html and interactive components in the notification
20+
```js
21+
const NotificationUI = brackets.getModule("widgets/NotificationUI");
22+
// or use window.NotificationUI global object has the same effect.
23+
let notification = NotificationUI.createFromTemplate("Click me to locate the file in file tree", "showInfileTree",{});
24+
notification.done(()=>{
25+
console.log("notification is closed in ui.");
26+
})
27+
```
28+
### Advanced example
29+
Another advanced example where you can specify html and interactive components in the notification
1330
**Example**
14-
```js// note that you can even provide an HTML Element node with// custom event handlers directly here instead of HTML text.let notification1 = NotificationUI.createFromTemplate( "<div>Click me to locate the file in file tree</div>", "showInfileTree",{ allowedPlacements: ['top', 'bottom'], dismissOnClick: false, autoCloseTimeS: 300 // auto close the popup after 5 minutes });// do stuffnotification1.done((closeReason)=>{ console.log("notification is closed in ui reason:", closeReason);})```The `createFromTemplate` API can be configured with numerous options. See API options below.
31+
```js
32+
// note that you can even provide an HTML Element node with
33+
// custom event handlers directly here instead of HTML text.
34+
let notification1 = NotificationUI.createFromTemplate(
35+
"<div>Click me to locate the file in file tree</div>", "showInfileTree",{
36+
allowedPlacements: ['top', 'bottom'],
37+
dismissOnClick: false,
38+
autoCloseTimeS: 300 // auto close the popup after 5 minutes
39+
});
40+
// do stuff
41+
notification1.done((closeReason)=>{
42+
console.log("notification is closed in ui reason:", closeReason);
43+
})
44+
```
45+
The `createFromTemplate` API can be configured with numerous options. See API options below.
1546

1647
* [widgets/NotificationUI](#module_widgets/NotificationUI)
1748
* [.API](#module_widgets/NotificationUI..API)
@@ -20,6 +51,7 @@ The global NotificationUI can be used to create popup notifications over dom ele
2051
* [.createFromTemplate(title, template, [elementID], [options])](#module_widgets/NotificationUI..createFromTemplate) ⇒ <code>Notification</code>
2152
* [.createToastFromTemplate(title, template, [options])](#module_widgets/NotificationUI..createToastFromTemplate) ⇒ <code>Notification</code>
2253
* [.showToastOn(containerOrSelector, template, [options])](#module_widgets/NotificationUI..showToastOn) ⇒ <code>Notification</code>
54+
* [.showHUD(iconClass, label, [options])](#module_widgets/NotificationUI..showHUD) ⇒ <code>Notification</code>
2355

2456
<a name="module_widgets/NotificationUI..API"></a>
2557

@@ -60,7 +92,21 @@ Closing notification reason.
6092
<a name="module_widgets/NotificationUI..createFromTemplate"></a>
6193

6294
### widgets/NotificationUI.createFromTemplate(title, template, [elementID], [options]) ⇒ <code>Notification</code>
63-
Creates a new notification popup from given template.The template can either be a string or a jQuery object representing a DOM node that is *not* in the current DOM.Creating a notification popup```js// note that you can even provide an HTML Element node with// custom event handlers directly here instead of HTML text.let notification1 = NotificationUI.createFromTemplate( "<div>Click me to locate the file in file tree</div>", "showInfileTree",{ allowedPlacements: ['top', 'bottom'], dismissOnClick: false, autoCloseTimeS: 300 // auto close the popup after 5 minutes });```
95+
Creates a new notification popup from given template.
96+
The template can either be a string or a jQuery object representing a DOM node that is *not* in the current DOM.
97+
98+
Creating a notification popup
99+
100+
```js
101+
// note that you can even provide an HTML Element node with
102+
// custom event handlers directly here instead of HTML text.
103+
let notification1 = NotificationUI.createFromTemplate(
104+
"<div>Click me to locate the file in file tree</div>", "showInfileTree",{
105+
allowedPlacements: ['top', 'bottom'],
106+
dismissOnClick: false,
107+
autoCloseTimeS: 300 // auto close the popup after 5 minutes
108+
});
109+
```
64110

65111
**Kind**: inner method of [<code>widgets/NotificationUI</code>](#module_widgets/NotificationUI)
66112
**Returns**: <code>Notification</code> - Object with a done handler that resolves when the notification closes.
@@ -75,7 +121,20 @@ Creates a new notification popup from given template.The template can either be
75121
<a name="module_widgets/NotificationUI..createToastFromTemplate"></a>
76122

77123
### widgets/NotificationUI.createToastFromTemplate(title, template, [options]) ⇒ <code>Notification</code>
78-
Creates a new toast notification popup from given title and html message.The message can either be a string or a jQuery object representing a DOM node that is *not* in the current DOM.Creating a toast notification popup```js// note that you can even provide an HTML Element node with// custom event handlers directly here instead of HTML text.let notification1 = NotificationUI.createToastFromTemplate( "Title here", "<div>Click me to locate the file in file tree</div>", { dismissOnClick: false, autoCloseTimeS: 300 // auto close the popup after 5 minutes });```
124+
Creates a new toast notification popup from given title and html message.
125+
The message can either be a string or a jQuery object representing a DOM node that is *not* in the current DOM.
126+
127+
Creating a toast notification popup
128+
129+
```js
130+
// note that you can even provide an HTML Element node with
131+
// custom event handlers directly here instead of HTML text.
132+
let notification1 = NotificationUI.createToastFromTemplate( "Title here",
133+
"<div>Click me to locate the file in file tree</div>", {
134+
dismissOnClick: false,
135+
autoCloseTimeS: 300 // auto close the popup after 5 minutes
136+
});
137+
```
79138

80139
**Kind**: inner method of [<code>widgets/NotificationUI</code>](#module_widgets/NotificationUI)
81140
**Returns**: <code>Notification</code> - Object with a done handler that resolves when the notification closes.
@@ -89,7 +148,15 @@ Creates a new toast notification popup from given title and html message.The me
89148
<a name="module_widgets/NotificationUI..showToastOn"></a>
90149

91150
### widgets/NotificationUI.showToastOn(containerOrSelector, template, [options]) ⇒ <code>Notification</code>
92-
Shows a small, transient inline toast notification inside a given DOM container.The toast is centered at the bottom of the container and auto-dismisses.```jsNotificationUI.showToastOn(document.getElementById("my-panel"), "Hello!", { autoCloseTimeS: 5, dismissOnClick: true});```
151+
Shows a small, transient inline toast notification inside a given DOM container.
152+
The toast is centered at the bottom of the container and auto-dismisses.
153+
154+
```js
155+
NotificationUI.showToastOn(document.getElementById("my-panel"), "Hello!", {
156+
autoCloseTimeS: 5,
157+
dismissOnClick: true
158+
});
159+
```
93160

94161
**Kind**: inner method of [<code>widgets/NotificationUI</code>](#module_widgets/NotificationUI)
95162
**Returns**: <code>Notification</code> - Object with a done handler that resolves when the toast closes.
@@ -100,3 +167,23 @@ Shows a small, transient inline toast notification inside a given DOM container.
100167
| template | <code>string</code> \| <code>Element</code> | HTML string or DOM Element for the toast content. |
101168
| [options] | <code>Object</code> | optional, supported options: * `autoCloseTimeS` - Time in seconds after which the toast auto-closes. Default is 5. * `dismissOnClick` - If true, clicking the toast dismisses it. Default is true. |
102169

170+
<a name="module_widgets/NotificationUI..showHUD"></a>
171+
172+
### widgets/NotificationUI.showHUD(iconClass, label, [options]) ⇒ <code>Notification</code>
173+
Shows a large, centered HUD overlay (like macOS volume/brightness indicator) with an icon and label.
174+
The HUD fades in/out and auto-dismisses. Only one HUD is shown at a time — calling this while a
175+
previous HUD is visible replaces it instantly.
176+
177+
```js
178+
NotificationUI.showHUD("fa-solid fa-magnifying-glass-plus", "110%");
179+
```
180+
181+
**Kind**: inner method of [<code>widgets/NotificationUI</code>](#module_widgets/NotificationUI)
182+
**Returns**: <code>Notification</code> - Object with a done handler that resolves when the HUD closes.
183+
184+
| Param | Type | Description |
185+
| --- | --- | --- |
186+
| iconClass | <code>string</code> | Font Awesome class string for the icon (e.g. "fa-solid fa-magnifying-glass-plus"). |
187+
| label | <code>string</code> | Text to display below the icon (e.g. "110%"). |
188+
| [options] | <code>Object</code> | optional, supported options: * `autoCloseTimeS` - Time in seconds after which the HUD auto-closes. Default is 1. |
189+

src/view/SidebarTabs.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,13 @@ define(function (require, exports, module) {
460460

461461
/**
462462
* Get an array of all registered tab descriptors.
463-
* @return {Array.<{id: string, label: string, iconClass: string, priority: number}>}
463+
* @typedef {Object} TabDescriptor
464+
* @property {string} id - Unique tab identifier
465+
* @property {string} label - Display text shown in the tab bar
466+
* @property {string} iconClass - Icon class string
467+
* @property {number} priority - Sort priority (lower = further left)
468+
*
469+
* @return {Array<TabDescriptor>}
464470
*/
465471
function getAllTabs() {
466472
return _tabs.map(function (tab) {

0 commit comments

Comments
 (0)