Skip to content

Commit e40ef11

Browse files
authored
Merge pull request #390 from tableau/dev
Update docs for v1.5 library; doc bug fixes
2 parents 729264a + 8c5e58a commit e40ef11

File tree

7 files changed

+98
-12
lines changed

7 files changed

+98
-12
lines changed

_config.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,11 @@ github: [metadata]
2323
kramdown:
2424
toc_levels: 1..3
2525

26+
gems: [jekyll-mermaid]
27+
mermaid: https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js
28+
2629
# Exclude
27-
exclude: ['node_modules', 'Examples']
30+
exclude: ['node_modules', 'Examples', 'vendor']
31+
2832

2933

_includes/head.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,13 @@
1414
<script src="{{ site.baseurl }}/assets/js/redirect-to-search.js"></script>
1515
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
1616
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
17+
<script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
18+
<script>
19+
mermaid.initialize({
20+
startOnLoad:true,
21+
sequence: { showSequenceNumbers: true },
22+
});
23+
</script>
24+
1725

1826
{% if jekyll.environment == "production" %}{% include analytics.html %}{% endif %}

docs/trex_debugging.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ This command enables remote debugging of extensions for this session of Tableau.
100100

101101
## Debugging Tableau Desktop using Chrome/Chromium
102102

103-
After you install the Chromium browser and enable debugging in Tableau, you can start debugging your extension.
103+
After you install the Chrome (or Chromium) browser and enable debugging in Tableau, you can start debugging your extension.
104104

105105
1. Open the dashboard with the extension you want to debug in Tableau.
106106
2. Start Chromium and set the URL to [`http://localhost:8696`](http://localhost:8696)
@@ -115,9 +115,24 @@ Note that you can only debug one extension, or instance of an extension, at a ti
115115

116116
---
117117

118-
## Debugging loading and initialization issues
118+
## Debugging loading and initialization issues (Tableau 2021.1 and later)
119119

120-
It can be difficult to hit breakpoints that occur during the loading of your page because of the remote debugging process. To help with this, you can select a menu option that causes your extension to wait to load until you trigger it to proceed.
120+
If you need to troubleshoot or debug issues that prevent your extension from loading or initializing, you can set breakpoints that trigger when your JavaScript code is loaded.
121+
122+
1. Start the debugging session as described in [Debugging Tableau Desktop using Chrome/Chromium](#debugging-tableau-desktop-using-chromechromium).
123+
124+
1. Click the **Sources** tab in Chrome/Chromium, under **Event Listener Breakpoints**, click **Script** and enable the **Script First Statement** breakpoint. You just have to do this one time.
125+
126+
1. In Tableau Desktop, select the extension in the dashboard and click **Reload** from the **More Options** shortcut menu. <br/>
127+
The debugger will pause each time the first statement of a script runs, allowing you to debug the startup process.
128+
129+
1. To get to your JavaScript code, click **Continue** several times. After your JavaScript is loaded, you can set a breakpoint in your startup code.
130+
131+
---
132+
133+
## Debugging loading and initialization issues (Tableau 2020.4 and earlier)
134+
135+
It can be difficult to hit breakpoints that occur during the loading of your page because of the remote debugging process, and because of the way loading was handled prior to Tableau 2021.1. To help with this, you can select a menu option that causes your extension to wait to load until you trigger it to proceed.
121136

122137
1. Select the extension in the dashboard and select **Debug Options** > **Pause Before Loading** from the shortcut menu.
123138
2. Reload your extension. Select **Reload** from the shortcut menu.

docs/trex_error_handling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Errors that are returned from the Extensions API are custom Tableau error object
1313

1414
## Using Extensions API error codes
1515

16-
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]({{site.baseurl}}/docs/enums/errorcodes.html).
16+
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]({{site.baseurl}}/docs/enums/tableau.errorcodes.html){:target="_blank"}.
1717

1818
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.
1919

docs/trex_manifest.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ title: Tableau Extension Manifest File
33
layout: docs
44
---
55

6-
The extension manifest file (`.trex`) contains metadata for the extension and is used for registration.
7-
6+
The extension manifest file (`.trex`) contains metadata for the extension and is used for registration.
7+
88
For details about a manifest or its fields, see the [Sample Manifest File](#sample-manifest-file) and [Elements of the Manifest File](#elements-of-the-manifest-file).
99

1010

@@ -13,19 +13,19 @@ For details about a manifest or its fields, see the [Sample Manifest File](#samp
1313
* TOC
1414
{:toc}
1515

16+
---
1617

18+
## Tableau TREX Generator
1719

18-
## XSD Validation
19-
The manifest is an XML-based file. We have provided an XSD (an XML schema definition file) that can be used to validate the manifest file you have created for your extension. The XSD is available from the [Extensions API Developer Preview](https://prerelease.tableau.com/project/version/item.html?cap=52e2710a0793434d82142736c7ab3029&arttypeid={0DD668AE-472C-4E70-B465-35F7AE0DEB6D}&artid={939493D2-8000-4192-857A-67624CBCC35A}){:target="_blank"} site. You are strongly encouraged to validate your extensions manifest file before using it for the first time.
20+
To create a new manifest file (`.trex`) for your extension the easy way, use the [Tableau TREX Generator](https://trex-generator.glitch.me/){:target="_blank"} on [Glitch](https://glitch.com){:target="_blank"}. The Tableau TREX Generator allows you to create the manifest file by filing in a form. You can also upload an existing `.trex` file and use that as a starting point. You can use the generator to edit and modify your `.trex` file as needed. When you are finished, just download the file to use with your extension.
2021

2122
## Manifest Versioning
23+
2224
The versioning of the manifest is designed to be semantically simple and support compatibility. The version follows the [Major].[Minor] format. Minor upgrades are backwards compatible while major upgrades involve breaking changes.
2325

2426
## Error Reporting
25-
At start up, Tableau checks the manifest file. If any errors are found while parsing the file, Tableau writes these errors to the `log.txt` file in the `My Tableau Repository (Beta)/Logs` folder. This is the same location that Tableau Desktop uses to report other errors and activity.
26-
27-
If a workbook is saved with an extension and then later opened on another computer that does not have the extension installed, Tableau displays a message in the dashboard zone where the extension would have appeared that states the extension is not available.
2827

28+
At start up, Tableau checks the manifest file. If any errors are found while parsing the file, Tableau writes these errors to the `log.txt` file in the `My Tableau Repository/Logs` folder. This is the same location that Tableau Desktop uses to report other errors and activity.
2929

3030
## Sample Manifest File
3131

docs/trex_oauth.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,30 @@ The following outlines some of the basic steps in using a secondary window for O
3232

3333
* In response to the signal, the extension retrieves and stores the OAuth token in local storage on the client's computer. The extension can then use the access token to send subsequent requests for services from the OAuth provider.
3434

35+
---
36+
<div class="mermaid">
37+
sequenceDiagram
38+
participant User
39+
participant E as Extension (client)
40+
participant S as Server (web host)
41+
participant O as OAuth provider
42+
User->>E: Load dashboard extension
43+
E->>S: Open communication channel
44+
S-->>E: Use this socket session ID (socket.id)
45+
E->>O: Request the OAuth login page (with client ID)
46+
O-->>User: Prompt user: Allow or deny access?
47+
User->>O: Allow!
48+
O-->>S: Here's the auth code
49+
S->>O: Auth code request + client ID, client secret, session ID
50+
O-->>S: Here's the access token
51+
Note right of E: Route the access token based on session ID
52+
S->>E: This access token is for this session ID.
53+
Note right of E: Use the access token to request data
54+
55+
</div>
56+
57+
58+
3559
---
3660

3761
## An example of the OAuth code path using Socket.IO

docs/trex_release-notes.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,44 @@ layout: docs
1111
----
1212
See also: [Known Issues]({{site.baseurl}}/docs/trex_known_issues.html)
1313

14+
----
15+
16+
### Tableau Dashboard Extensions API version 1.5
17+
18+
*June 2021*
19+
20+
* Tableau Dashboard Extensions API library: `tableau.extensions.1.5.0.js` <br>(download or clone the Extensions API repository on [GitHub](https://github.com/tableau/extensions-api){:target="_blank"}.) <br/>
21+
22+
About this release:
23+
24+
* The `Filter.getFieldAsync` method now works as expected and properly returns the field. This fix requires Tableau 2019.2 and later.
25+
26+
* Show/Hide (`setZoneVisibilityAsync`) can now be applied to any dashboard zone.
27+
28+
* The `selectMarksByValueAsync` method now supports combined selection criteria types (bug fixed).
29+
30+
* The following are all improvements to the [`getSummaryDataAsync`](https://tableau.github.io/extensions-api/docs/interfaces/worksheet.html#getsummarydataasync){:target="_blank"} method:
31+
32+
* `getSummaryDataAsync` now has a smaller and faster payload.
33+
34+
* `maxRows` can be applied to `getSummaryDataAsync` to restrict the number of rows fetched.
35+
36+
* `columnsToIncludeById` can be applied to `getSummaryDataAsync` to restrict the columns fetched.
37+
38+
* `includeDataValuesOnly` or `includeFormattedValuesOnly` can be applied to `getSummaryDataAsync` to restrict the amount of information returned to what you really need.
39+
40+
* The `getSummaryColumnsInfoAsync` method is new in this release. It returns the column information for each column that will be returned in `getSummaryDataAsync`.
41+
42+
* The column information now includes the `fieldId` as well as the field name.
43+
44+
For more information about changes in this release, see [Tableau Extensions v1.5.0](https://github.com/tableau/extensions-api/releases/tag/v1.5.0){:target="_blank"}.
45+
46+
47+
1448
----
1549

1650
### Tableau 2021.1 Updates
51+
1752
*March 2021*
1853

1954
* You can now use Chrome version 80 and later to debug your dashboard extension in Tableau Desktop. If you are using Tableau 2021.1, or the latest maintenance releases of Tableau 2020.2, 2020.3, or 2020.4, you no longer need to use Chromium (version 79 or earlier) for debugging. For more information, see [Debug Extensions in Tableau Desktop]({{site.baseurl}}/docs/trex_debugging.html) and [Download the Chromium Browser]({{site.baseurl}}/docs/trex_debugging.html#download-the-chromium-browser).

0 commit comments

Comments
 (0)