Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions website/docs/core/trex_format.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ To help your dashboard extension match the look and feel of the dashboard in whi

## Apply Tableau classes to HTML elements

Starting with the Dashboard Extensions API v1.7 library, and supported with Tableau 2021.4 or later, you can apply workbook formatting styles by specifying the class on the HTML elements in your extension. The specific Tableau classes to use are defined in the [`ClassNameKey`](pathname:///api/enums/tableau.classnamekey.html) enum.
Starting with the Dashboard Extensions API v1.7 library, and supported with Tableau 2021.4 or later, you can apply workbook formatting styles by specifying the class on the HTML elements in your extension. The specific Tableau classes to use are defined in the [`ClassNameKey`](pathname:///api/enums/ClassNameKey.html) enum.

| HTML style (string literal) | ClassNameKey enum|
| :------------ | :---------- |
Expand Down Expand Up @@ -91,4 +91,4 @@ For more information about using event listeners, see [Events and Event Handling

* To see a working sample dashboard extension that uses workbook formatting, see the JavaScript [Formatting](https://github.com/tableau/extensions-api/tree/main/Samples/Dashboard/Formatting) sample in the Samples folder, or the TypeScript [Formatting](https://github.com/tableau/extensions-api/tree/main/Samples-Typescript/Dashboard/Formatting) sample in the Samples-Typescript folder.

* For information about accessing the formatting styles in a workbook, see [workbookFormatting](pathname:///api/interfaces/environment.html#workbookformatting) in the API reference documentation.
* For information about accessing the formatting styles in a workbook, see [workbookFormatting](pathname:///api/interfaces/Environment.html#workbookformatting) in the API reference documentation.
4 changes: 2 additions & 2 deletions website/docs/core/trex_multiple_dialogs.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ You can't display these other dialog boxes or windows directly when the user sel

* Determine where to place the controls to display the popup windows. For example, in your main extension window, or in the configuration dialog. Add the controls (buttons, toolbars) to your extension HTML code to create the additional dialog boxes or popup windows.

* Use the [`displayDialogAsync()`](pathname:///api/interfaces/ui.html#displaydialogasync) method to display the popup window. You would probably call the `displayDialogAsync()` method from a wrapper that gets triggered when the user clicks a button or icon in a toolbar. In your extension JavaScript or TypeScript code, define your popup windows: the `popupURL`, the dialog style, and dimensions, and any initial payload you want to send to the popup window. And provide any necessary code for handling the payload that's returned from the popup window.
* Use the [`displayDialogAsync()`](pathname:///api/interfaces/UI.html#displaydialogasync) method to display the popup window. You would probably call the `displayDialogAsync()` method from a wrapper that gets triggered when the user clicks a button or icon in a toolbar. In your extension JavaScript or TypeScript code, define your popup windows: the `popupURL`, the dialog style, and dimensions, and any initial payload you want to send to the popup window. And provide any necessary code for handling the payload that's returned from the popup window.

Like the configuration popup, the URL of the additional popup windows must belong to the same domain as the parent extension. The relative paths must resolve to the directory, or a child directory, of the extension. Root-relative paths aren’t allowed. For example, `./config.html` or `config.html` are allowed, but not the root-relative path `/config.html`.

* In your HTML and JavaScript code for your popup window, call the [`initializeDialogAsync()`](pathname:///api/interfaces/extensions.html#initializedialogasync) method and add code to process the initial payload, if you’re using it. In addition to whatever features you want the popup window to do, add a control (for example, a Save button) that you can attach to the `closeDialog()` method. The `closeDialog()` method safely closes the dialog box and returns the payload to the calling extension (or window).
* In your HTML and JavaScript code for your popup window, call the [`initializeDialogAsync()`](pathname:///api/interfaces/Extensions.html#initializedialogasync) method and add code to process the initial payload, if you’re using it. In addition to whatever features you want the popup window to do, add a control (for example, a Save button) that you can attach to the `closeDialog()` method. The `closeDialog()` method safely closes the dialog box and returns the payload to the calling extension (or window).

* If you have more than one popup window, you must create a system for tracking the state of each popup window. For example, calling `displayDialogAsync()` method for an already-open dialog box throws an error. And if you only want one popup window open at a time, and you don't want them to be modal, you must track which popup is open and which popup is queued up. A simple Map or Flag variable can accomplish this tracking.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/core/trex_tableau_viz.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ Now that you have seen the basic steps for adding a Tableau Viz to a dashboard e

* For information about the Tableau Viz version 1 and version 2 `inputSpec` and all the options for specifying the visualization, see [Tableau Viz Reference](../trex_tableau_viz_ref.md).

* Review the [`tableau.extensions.createVizImageAsync`](pathname:///api/interfaces/extensions#createvizimageasync) method for information about the API.
* Review the [`tableau.extensions.createVizImageAsync`](pathname:///api/interfaces/Extensions#createvizimageasync) method for information about the API.

* Check out the [Tableau Viz Sample - VizImage](https://github.com/tableau/extensions-api/tree/main/Samples/Dashboard/VizImage) and see how it works. Examine the source code to find out ways you can incorporate Tableau Viz into your own dashboard extensions.

Expand Down
2 changes: 1 addition & 1 deletion website/docs/debug/trex_error_handling.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Errors that are returned from the Extensions API are custom Tableau error object

## Using Extensions API error codes

The Extensions API wraps the standard error object with an `errorCode` property. You can use this error code for debugging or troubleshooting your extension. Any time you encounter an error when you are running your extension, you can look at this `errorCode` to determine the cause. See [Error Codes](pathname:///api/enums/tableau.errorcodes.html).
The Extensions API wraps the standard error object with an `errorCode` property. You can use this error code for debugging or troubleshooting your extension. Any time you encounter an error when you are running your extension, you can look at this `errorCode` to determine the cause. See [Error Codes](pathname:///api/enums/ErrorCodes.html).

As you create your extension, you want to be sure to catch potential error conditions. For example, you should validate user input and make use of `try` ... `catch` statements. The Extensions API makes use of JavaScript promises. You can use the `.catch` method to field the errors that could be returned in the promise and any subsequent `.then` methods.

Expand Down
Loading
Loading