Skip to content

Commit a349d33

Browse files
authored
Merge pull request #634 from tableau/gh-pages-dev
Added info about using multiple popup dialog boxes
2 parents 003a92d + 77fa547 commit a349d33

7 files changed

Lines changed: 1170 additions & 54 deletions

File tree

website/docs/Interaction_Guidelines/ux_controls_ui_patterns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ Dropdown controls allow multiple options to be expanded from a menu. Dropdowns h
191191
| --- | --- |
192192
| **Outline** | The outline style is the primary variation that should be used. It can be used by itself, on forms, or within dialogues. |
193193
| **Line**<br/>(label optional) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; | Line style dropdowns are useful in areas that have cramped vertical space. This dropdown style can be stacked within panels to avoid a boxy wireframe feel. While the label is optional, we encourage using it to better inform users about the category of items. |
194-
| **Text** | This style allows the user to access options from a dropdown or flyout menu. This style works well in tool and start bars, as well as in dialogs and menus. |
194+
| **Text** | This style allows the user to access options from a dropdown or flyout menu. This style works well in tool and start bars, as well as in dialogs and menus. |
195195
| **Icon** | The icon style works best in small regions such as tool bars, and is great for switches that have several options. |
196196

197197
&nbsp;

website/docs/core/trex_configure.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
---
2-
title: Add a Configuration Popup Dialog
2+
title: Add a Configuration Popup Dialog Box
33
description: How to add a configuration dialog box to the extension
44
---
55

6-
If you want users to be able to configure settings for your extension, you can use an optional callback function when you initialize your dashboard or viz extension. The callback function creates a configuration option that can be used to open a popup window (a modal dialog box) for your extension. You can use this popup window to allow users to set and save settings for the extension.
6+
If you want users to be able to configure settings for your extension, you can use an optional callback function when you initialize your dashboard or viz extension. The callback function creates a configuration option that can be used to open a popup window (dialog box) for your extension. The Extensions API supports different dialog box styles: modal, modeless, or window. You can use the dialog box to allow users to set and save settings for the extension. Starting with Tableau 2026.1 (and the v1.16 library), you can create multiple dialog boxes and send messages between them.
77

8+
:::info
9+
10+
By design, there can be only one context configuration popup window or dialog box. For information about creating and using multiple popup dialog boxes or window, see [Add a Multiple Popup Dialog Boxes](trex_multiple_dialogs.md).
11+
12+
:::
813

914
## Add the context menu to the `.trex` file
1015

11-
The first step is to add the `<context-menu>` option to the extension's manifest file (`.trex`). The `<context-menu>` element only contains one item: `<configure-context-menu-item />`.
16+
The first step is to add the `<context-menu>` option to the extension's manifest file (`.trex`). The `<context-menu>` element only contains one item: `<configure-context-menu-item />`.
1217

13-
* The context menu option must follow the `<icon>` and `<permissions>` elements in the manifest file in the `<dashboard-extension>` or `<worksheet-extension>` section:
18+
* The context menu option must follow the `<icon>` and `<permissions>` elements in the manifest file in the `<dashboard-extension>` or `<worksheet-extension>` section:
1419

1520
```xml
1621
<!-- add to <dashboard-extension> or <worksheet-extension> section
@@ -36,7 +41,6 @@ with adding a `<context-menu>` item to the manifest, adds a new **Format Extensi
3641

3742
When the user selects the context menu item, or selects **Format Extensions** button, the configuration function you specified is executed.
3843

39-
4044
**Dashboard extensions configuration menu**
4145

4246
![](../assets/extension_configure_menu.png)
@@ -69,7 +73,6 @@ $(document).ready(function () {
6973

7074

7175

72-
7376
function configure() {
7477
// ... code to configure the extension
7578
// for example, set up and call displayDialogAsync() to create the configuration window
@@ -82,9 +85,11 @@ $(document).ready(function () {
8285
// to be updated if the extension is deployed to a new location.
8386
const popupUrl = `${window.location.origin}/Samples/Dashboard/UINamespace/uiNamespaceDialog.html`;
8487
//
88+
// Specify the style of dialog box: modal, modeless, or window
89+
let dialogStyle = tableau.DialogStyle.Modeless;
8590
// ...
8691
// initial payload string value, `defaultIntervalInMin` set
87-
tableau.extensions.ui.displayDialogAsync(popupUrl, defaultIntervalInMin, { height: 500, width: 500 }).then((closePayload) => {
92+
tableau.extensions.ui.displayDialogAsync(popupUrl, defaultIntervalInMin, { height: 500, width: 500, dialogStyle }).then((closePayload) => {
8893
// The promise is resolved when the dialog has been expectedly closed, meaning that
8994
// the popup extension has called tableau.extensions.ui.closeDialog.
9095
// ...

0 commit comments

Comments
 (0)