You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/index.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
# Tableau Extensions API
2
2
3
-
The Tableau Extensions API allows developers to create dashboard extensionsand viz extensions for Tableau. Tableau extensions are web applications that can interact and communicate with Tableau. A dashboard extension can be placed in the dashboard like any other dashboard object. A Tableau viz extension creates new viz types that Tableau users can access through the worksheet Marks card.
3
+
The Tableau Extensions API allows developers to create dashboard extensions, viz extensions, and workspace extensions for Tableau. Tableau extensions are web applications that can interact and communicate with Tableau. A dashboard extension can be placed in the dashboard like any other dashboard object. A Tableau viz extension creates new viz types that Tableau users can access through the worksheet Marks card. A workspace extension runs at the workspace level and stays available as you open, close, and switch between workbooks.
4
4
5
5
:::note
6
6
7
7
If you are looking for information about how to extend Tableau calculations to include popular data science programming languages and external tools, see the [Tableau Analytics Extensions API](https://tableau.github.io/analytics-extensions-api/).
8
8
9
9
:::
10
10
11
-
The Tableau Extensions API is a JavaScript library that is organized into namespaces that contain the classes and methods for communicating with Tableau components. The Tableau Extensions API library supports both dashboard extensionsand viz extensions, although not all interfaces and methods apply to both extensions. For an overview of how the API is organized, see [Tableau Extensions API Basics](./trex_api_about.md).
11
+
The Tableau Extensions API is a JavaScript library that is organized into namespaces that contain the classes and methods for communicating with Tableau components. The Tableau Extensions API library supports dashboard extensions, viz extensions, and workspace extensions, although not all interfaces and methods apply to every extension type. For an overview of how the API is organized, see [Tableau Extensions API Basics](./trex_api_about.md).
12
12
13
13
Details on the supported platforms and hardware requirements can be found in the [Installation instructions](installation.md).
14
14
@@ -19,3 +19,5 @@ Details on the supported platforms and hardware requirements can be found in the
19
19
*[Get Started with Viz Extensions](./vizext/trex_viz_getstarted.md)
20
20
21
21
*[Get Started with Dashboard Extensions](./dashext/trex_getstarted.md)
22
+
23
+
*[Get Started with Workspace Extensions](./workspaceext/trex_workspace_getstarted.md)
Copy file name to clipboardExpand all lines: website/docs/trex_api_about.md
+37Lines changed: 37 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ The Tableau Extensions API is organized by namespaces. The type of extension you
10
10
| ----- | ------- |
11
11
| Dashboard extensions | For example, if you create and register a dashboard extension, the extension will have access to the `dashboardContent` namespace, which provides access to the dashboard object. When you have the dashboard object, you have access to all elements in the dashboard, including the worksheets, marks, filters, parameters, and data sources. |
12
12
| Viz extensions | If you create and register a viz extension, the extension will have access to the `worksheetContent` namespace, which provides access to the worksheet object. When you have the worksheet object, you have access to all elements in the worksheet, including the marks, filters, parameters, and data sources.|
13
+
| Workspace extensions | If you create and register a workspace extension, the extension runs at the workspace level rather than inside a single workbook. It can access information about the currently active workbook (which can be empty when no workbook is open) and is notified when the active workbook changes. |
13
14
14
15
## Navigating the top-level `tableau` and `extensions` namespaces
15
16
@@ -19,6 +20,14 @@ The `extensions` namespace is the namespace for Tableau extensions. A dashboard
19
20
20
21
A viz extension is another type of extension. When a extension is registered as a viz extension, it has access to the `worksheetContent` namespace, and all of the objects and classes of the worksheet. A viz extension does not have access to the `dashboardContent`.
21
22
23
+
A workspace extension is another type of extension. A workspace extension runs at the workspace level instead of inside a single workbook, so it is not bound to a specific dashboard or worksheet. It can access information about the currently active workbook and is notified when the active workbook changes.
24
+
25
+
:::warning[TODO: REVIEW]
26
+
<mark>Confirm the namespace a workspace extension uses to access workspace and workbook content (for example, <code>tableau.extensions.workspace</code>).</mark>
27
+
28
+
Flagged because: the source material is inconsistent about the workspace namespace name and notes it may not be finalized. The canonical namespace needs to be confirmed.
29
+
:::
30
+
22
31
The type of extension you have registered determines what namespaces will be available. Some namespaces, like the `settings`, `environment`, and `ui` are available to all extensions.
23
32
24
33
The `extensions` namespace has one method `initializeAsync()` that is used to initialize the extension. When this method is called, it also triggers Tableau to configure the Extensions API. Like the Tableau JavaScript API, the Extensions API follows the [CommonJS Promises/A standard](http://wiki.commonjs.org/wiki/Promises/A) for asynchronous method calls.
@@ -33,6 +42,7 @@ classDiagram
33
42
class extensions
34
43
class dashboardContent
35
44
class worksheetContent
45
+
class workspace
36
46
class environment
37
47
class settings
38
48
class ui
@@ -41,13 +51,20 @@ classDiagram
41
51
class extensions
42
52
extensions ..> dashboardContent
43
53
extensions ..> worksheetContent
54
+
extensions ..> workspace
44
55
extensions ..> environment
45
56
extensions ..> settings
46
57
extensions ..> ui
47
58
extensions: initializeAsync()
48
59
49
60
```
50
61
62
+
:::warning[TODO: REVIEW]
63
+
<mark>Confirm the workspace namespace name shown in the diagram above (currently <code>workspace</code>).</mark>
64
+
65
+
Flagged because: the source material is inconsistent about the workspace namespace name. Update the diagram once the canonical name is confirmed.
66
+
:::
67
+
51
68
## Registering and accessing dashboard extensions
52
69
53
70
The dashboard extension is one type of extension in the Tableau extensions namespace (and it is accessed using `tableau.extensions`). To register the extension, you declare the type of extension in the manifest file (`.trex`). For more information about what goes in the file, see [Tableau Manifest File](./dashext/trex_manifest.md).
The workspace extension is another type of extension in the Tableau extensions namespace (and it is accessed using `tableau.extensions`). To register the workspace extension, you specify the extension as a `workspace-extension` in the manifest file (`.trex`). For more information about what goes in the file, see [Tableau Workspace Extension Manifest File](./workspaceext/trex_workspace_manifest.md).
Unlike dashboard and viz extensions, a workspace extension runs at the workspace level and is not bound to a single workbook. After it is initialized, it has access to the namespaces that are common to all extensions, such as `tableau.extensions.environment` and `tableau.extensions.settings`. It can also access information about the currently active workbook, which can be empty when no workbook is open, and is notified when the active workbook changes.
132
+
133
+
:::warning[TODO: REVIEW]
134
+
<mark>Confirm the workspace extension initialization call and the namespace used to access workspace and workbook content.</mark>
135
+
136
+
Flagged because: the source material shows initialization with a `context: 'workspace'` option and is inconsistent about the workspace namespace name, and notes both may not be finalized. These need to be confirmed before adding a code sample here.
137
+
:::
138
+
104
139
## Using properties and methods in the `dashboard` and `worksheet` namespace
105
140
106
141
The Tableau Extensions API is similar to the Tableau Embedding API. The `dashboard` and `worksheet` class or namespace inherit from an abstract `sheet` class. You can use the [Extensions API Reference](pathname:///api/) to find the properties and methods that are available for dashboard and worksheet objects.
This walkthrough shows the basic shape of a workspace extension: an HTML page that loads the Tableau Extensions API library, initializes as a workspace extension, and reads information about the active workbook.
7
+
8
+
## The web page
9
+
10
+
Like other Tableau extensions, a workspace extension is a web page that links to the Tableau Extensions API library.
A workspace extension initializes through the same `initializeAsync()` entry point used by other extensions, identifying itself as a workspace extension.
<mark>Confirm how a workspace extension is initialized, including the exact <code>initializeAsync()</code> argument (for example, <code>{'{'} context: 'workspace' {'}'}</code>) and whether any argument is required.</mark>
41
+
42
+
Flagged because: the source material shows initialization with a `context: 'workspace'` option, but it also notes this entry point is still being finalized. The exact call signature needs to be confirmed.
43
+
:::
44
+
45
+
## Access the active workbook
46
+
47
+
After initialization, a workspace extension can read information about the currently active workbook. Because a workspace extension is not tied to a single workbook, the current workbook can be `null` when no workbook is open.
<mark>Confirm the workspace namespace name (for example, <code>tableau.extensions.workspace</code> versus <code>tableau.workspace</code>) and the members it exposes.</mark>
68
+
69
+
Flagged because: the source material is inconsistent about the namespace name and notes that the namespace may not be finalized. The canonical namespace and its API surface need to be confirmed.
70
+
:::
71
+
72
+
## Respond to workbook changes
73
+
74
+
A workspace extension can listen for changes to the active workbook so it can update as the user opens, closes, or switches workbooks.
<mark>Confirm the workbook lifecycle event names and their event payloads.</mark>
95
+
96
+
Flagged because: the source material uses two different naming styles for these events (for example, <code>workbook-opened</code> versus <code>workbookOpened</code>). The canonical event names and payload shapes need to be confirmed.
Workspace extensions are well suited to tools and utilities that need to stay available throughout a Tableau session, independent of any single workbook. The following are illustrative scenarios:
7
+
8
+
* A utility that displays information about the active workbook and updates as you switch workbooks.
9
+
10
+
* A persistent tool that tracks workbook activity across a session by responding to workbook opened, closed, and switched events.
11
+
12
+
For a minimal, end-to-end starting point, see [Create a "Hello World" Workspace Extension](./trex_workspace_create.md).
13
+
14
+
:::warning[TODO: REVIEW]
15
+
<mark>Add concrete, runnable workspace extension samples and links once they are available.</mark>
16
+
17
+
Flagged because: a public sample set for workspace extensions is not yet available, so this page currently describes scenarios rather than linking to working samples.
description: Get started with Workspace Extensions
4
+
tags: [Getting started]
5
+
---
6
+
7
+
The Tableau Extensions API allows developers to create workspace extensions, web applications that run at the workspace level of Tableau and stay available as you open, close, and switch between workbooks.
8
+
9
+
This section takes you through setting up your environment and adding a workspace extension so you can start developing your own.
10
+
11
+
:::info
12
+
13
+
**What's in a Tableau extension?**
14
+
A Tableau extension consists of an XML manifest file (`.trex`), a web page (`.html`) that uses a Tableau-provided JavaScript library, and the JavaScript file (`.js`) (or files) that contain your extension logic.
15
+
16
+
:::
17
+
18
+
### What you need to get started
19
+
20
+
If you want to create an extension or work with sample code, make sure you have followed the instructions for [installation](../installation.md).
21
+
22
+
:::warning[TODO: REVIEW]
23
+
<mark>Confirm the Tableau version requirements for workspace extensions.</mark>
24
+
25
+
Flagged because: minimum supported versions for Tableau Desktop, Server, and Cloud are release information and are not yet confirmed.
26
+
:::
27
+
28
+
### Add a workspace extension
29
+
30
+
Every Tableau extension has a manifest file (`.trex`) that describes the extension and identifies the location of the web application. To use a workspace extension, you register it for your Tableau environment and then open it when you want to use it. Once registered, a workspace extension remains available across workbooks.
31
+
32
+
:::warning[TODO: REVIEW]
33
+
<mark>Confirm the exact steps and Tableau UI entry points for registering and opening a workspace extension, and how the running extension is presented.</mark>
34
+
35
+
Flagged because: the available source material describes adding the extension and opening it from a menu, but the specific UI navigation and the way the extension is surfaced are not yet confirmed for public documentation, and depend on the open UI-model question (see the overview).
36
+
:::
37
+
38
+
## What's next?
39
+
40
+
* For information about creating a simple workspace extension, see [Create a "Hello World" Workspace Extension](./trex_workspace_create.md).
41
+
42
+
* For details on the workspace extension manifest, see [Tableau Workspace Extension Manifest File](./trex_workspace_manifest.md).
43
+
44
+
* To get familiar with the programming interface for the Extensions API, see the [API Reference](pathname:///api/).
description: Components of the workspace extension manifest file
4
+
---
5
+
6
+
The extension manifest file (`.trex`) contains metadata for the extension and is used for registration. A workspace extension uses the same manifest format as dashboard and viz extensions, but declares the extension with the `<workspace-extension>` element.
7
+
8
+
## Registering a workspace extension
9
+
10
+
To register an extension as a workspace extension, you specify the `<workspace-extension>` element in the manifest file (`.trex`).
Unlike dashboard and viz extensions, a workspace extension is not placed inside a dashboard zone or a worksheet, so its manifest does not include layout or encoding information.
17
+
18
+
:::warning[TODO: REVIEW]
19
+
<mark>Confirm the manifest wrapper element and manifest version for workspace extensions.</mark>
20
+
21
+
Flagged because: the existing dashboard and viz manifests use a `<manifest manifest-version="0.1">` root wrapper, while the workspace source material shows an `<extension-manifest manifest-version="1.0">` wrapper. The correct wrapper element and version value need to be confirmed before publishing.
The manifest fields shared with other extension types (such as `id`, `extension-version`, `name`, `description`, `author`, `source-location`, `icon`, and `min-api-version`) behave the same way as they do for dashboard extensions. For details on these shared elements, see the [Tableau Extension Manifest File](../dashext/trex_manifest.md) reference for dashboard extensions.
49
+
50
+
:::warning[TODO: REVIEW]
51
+
<mark>Confirm whether workspace extensions support any manifest elements that dashboard and viz extensions do not, or omit any that the others use.</mark>
52
+
53
+
Flagged because: only the core shared elements are confirmed from the source material; any workspace-specific manifest elements still need to be verified.
0 commit comments