Skip to content

Commit cb74737

Browse files
authored
Merge pull request #419 from d45/d45_docs_1_7
Added what's new for v1.7
2 parents ccc8afd + 63c746f commit cb74737

File tree

3 files changed

+54
-3
lines changed

3 files changed

+54
-3
lines changed

docs/trex_events.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ layout: docs
55

66
Using the Extensions API, you can listen for events on objects, such as worksheets, parameters, and settings. The Tableau Extension API supports a range of events and provides methods for adding and removing event listeners. To manage the event listener, each object has an *event listener manager*. The manager provides a way to add or remove multiple events on objects independently.
77

8-
In the Extensions API, the `sheet` is an abstract class that both `dashboard` and `worksheet` inherit from. Note that `sheet` inherits from the `EventListenerManager` (as do `parameter` and `settings` objects). You can add event listeners on individual sheets in a dashboard. However, you can't add an event listener on the entire dashboard itself. If you have an event listener, when the specified event is raised, the callback method you provide is called to handle the event. You can use event listeners to trigger specific actions based upon worksheet interactions.
8+
In the Extensions API, the `sheet` is an abstract class that both `dashboard` and `worksheet` inherit from. Note that `sheet` inherits from the `EventListenerManager` (as do `parameter` and `settings` objects). You can add event listeners on the dashboard and on individual sheets. If you have an event listener, when the specified event is raised, the callback method you provide is called to handle the event. You can use event listeners to trigger specific actions based upon worksheet interactions.
99

1010
For example, a marks selection event can be raised for a particular sheet in a dashboard. Each event contains an anonymous object with information pertaining to that event, such as the type or name of event and object the event occurred on.
1111
Listening to an event is done by calling the `addEventListener(eventType, callback)` method and passing in a callback function to handle the event.
@@ -20,7 +20,7 @@ the method throws an exception. The following table shows the event types suppor
2020
| Worksheet | `FilterChanged` , `MarkSelectionChanged` |
2121
| Parameter | `ParameterChanged` |
2222
| Settings | `SettingsChanged` |
23-
| Dashboard | None available |
23+
| Dashboard | `DashboardLayoutChanged` , `WorkbookFormattingChanged` |
2424

2525

2626
## Add an event listener

docs/trex_examples.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,15 @@ The [Samples-Typescript](https://github.com/tableau/extensions-api/tree/master/S
6464

6565
- **[Samples-Typescript](https://github.com/tableau/extensions-api/tree/master/Samples-Typescript?=target="_blank")**
6666

67-
The **Samples-Typscript** folder shows how you can use the Extensions API type definitions to create extensions in TypeScript. The sample extensions include TypeScript versions of the Datasources, Filtering, and Parameters samples. For more information, see [Use the TypeScript samples](#use-the-typescript-samples) and [Use TypeScript with the Extensions API]({{site.baseurl}}/docs/trex_typescript.html).
67+
The **Samples-Typescript** folder shows how you can use the Extensions API type definitions to create extensions in TypeScript. The sample extensions include TypeScript versions of many of the JavaScript samples. For more information, see [Use the TypeScript samples](#use-the-typescript-samples) and [Use TypeScript with the Extensions API]({{site.baseurl}}/docs/trex_typescript.html).
6868

6969
- **[VizImage](https://github.com/tableau/extensions-api/tree/main/Samples/VizImage?=target="_blank")**
7070

7171
Shows how you can use Tableau Viz to add visualizations to your dashboard extensions. This sample demonstrates the effects of different mark types and color palettes. For more information about Tableau Viz, see [Add Tableau Viz to Your Dashboard Extensions]({{site.baseurl}}/docs/trex_tableau_viz.html).
7272

73+
**[Formatting](https://github.com/tableau/extensions-api/tree/main/Samples/Formatting?=target="_blank")**
7374

75+
Shows how you can access the CSS formatting in the Tableau workbook and apply it to the HTML elements in your dashboard extension. Create a consistent look and feel across the extension and the dashboard.
7476

7577

7678
---

docs/trex_release-notes.md

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

14+
15+
### Tableau Dashboard Extensions API version 1.7
16+
17+
*October 2021*
18+
19+
20+
* Tableau Dashboard Extensions API library: `tableau.extensions.1.7.0.js` <br>(download or clone the Extensions API repository on [GitHub](https://github.com/tableau/extensions-api){:target="_blank"}.) <br/>
21+
22+
* Certain features in this release are only available in Tableau 2021.4 or later. Preview the features and test your extension with the latest version of Tableau in the Developer Sandbox. To gain access to the Developer Sandbox, join the [Tableau Developer Program](http://www.tableau.com/developer){:target="_blank"} and request your own Tableau Online developer site.
23+
24+
About this release:
25+
26+
* Added a new method, [`moveAndResizeDashboardObjectsAsync`]({{site.baseurl}}/docs/interfaces/dashboard.html#dashboard.html#moveandresizedashboardobjectsasync){:target="_blank"} you can use to set the position and size of one or more floating dashboard objects. This can be useful for creating overlays, annotations, popups, or dynamic layouts.
27+
28+
* Added a new method that can replay an animation in a dashboard. You can control the replay speed (`tableau.ReplaySpeedType.Slow`, `tableau.ReplaySpeedType.Normal`, or `tableau.ReplaySpeedType.Fast`). For more information see the [`replayAnimationAsync`]({{site.baseurl}}/docs/interfaces/dashboard.html#replayanimationasync){:target="_blank"} method.
29+
30+
* Dashboard extensions can now use workbook formatting by setting the appropriate class on the HTML elements. The specific Tableau classes to use are defined in the [`ClassNameKey`]({{site.baseurl}}/docs/enums/tableau.classnamekey.html){:target="_blank"} enum. To apply the formatting in the body of your HTML page, use the string literal `tableau-*` for the enum. For example, to apply the worksheet title formatting you set the `class` for the HTML element in your extension (`div`, `h2`, etc.) to `"tableau-worksheet-title"`.
31+
32+
```html
33+
<h2 class="tableau-worksheet-title">Subheader, using tableau-worksheet-title class</h2>
34+
35+
```
36+
37+
To reference the workbook formatting in places outside of the HTML body, use the enum directly (for example, `tableau.ClassNameKey.WorksheetTitle`).
38+
39+
```html
40+
<script>
41+
...
42+
someFunction(tableau.ClassNameKey.WorksheetTitle);
43+
...
44+
</script>
45+
```
46+
47+
You can access the formatting in the Tableau workbook from `tableau.extensions.environment.workbookFormatting`. The property `formattingSheets` contains the array of CSS properties for the workbook, organized by `ClassNameKey`. For more information about using workbook formatting, see the [Formatting](https://github.com/tableau/extensions-api/tree/main/Samples/Formatting){:target="_blank"} sample in the Samples folder.
48+
49+
* You can now set an event listener on changes to the dashboard layout and to the dashboard formatting. The new event types are `DashboardLayoutChanged` and `WorkbookFormattingChanged`.
50+
51+
The `DashboardLayoutChanged` event is triggered whenever a dashboard object is added, removed, repositioned or resized, or whenever the floating state, visibility, object name, or dashboard size changes. See the [DashboardLayoutChanged]({{site.baseurl}}/docs/interfaces/dashboard.html#dashboardlayoutchanged){:target="_blank"} event.
52+
53+
The `WorkbookFormattingChanged` event is triggered whenever the workbook text formatting is changed in Tableau authoring mode. This includes changes in the font, the font size, whether it is bold, italic, or underlined, and the color. For more information about workbook formatting, see [workbookFormatting]({{site.baseurl}}/docs/interfaces/environment.html#workbookformatting){:target="_blank"}.
54+
55+
* Transparency - Tableau now supports dashboard extension transparency for Sandboxed extensions. To take advantage of extension transparency, set your background style to a transparent or partially transparent color.
56+
57+
* Added a new method (`setClickThroughAsync`) that allows clicks to pass through the dashboard extension window. You can use this method in conjunction with transparency. See the [setClickThroughAsync]({{site.baseurl}}/docs/interfaces/extensions.html#setclickthroughasync){:target="_blank"} method.
58+
59+
60+
61+
62+
1463
----
1564

1665
### Tableau Dashboard Extensions API version 1.6

0 commit comments

Comments
 (0)