Skip to content

Commit 20f7b88

Browse files
authored
Merge pull request #557 from d45/gh-pages
Merging fixes, etc. from gh-pages-dev
2 parents 2e51b52 + 911bea0 commit 20f7b88

25 files changed

+164
-173
lines changed

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ Github Actions are configured to automatically test for changes.
3030
For simple typo or wording fixes, you don't need a peer review - feel free to just go ahead and merge.
3131
For actual new content, we encourage to get at least one peer review.
3232

33-
The released or production documentation is served from the `main` branch.
34-
Changes or updates should first be checked into the `dev` branch and then merged to `main` when ready for public release.
33+
The released or production documentation is served from the `gh-pages` branch.
34+
Changes or updates should first be checked into the `gh-pages-dev` branch and then merged to `gh-pages` when ready for public release.
3535

3636
### Deployment
3737

38-
As soon as your pull request to https://github.com/tableau/test-extensions-api is merged to `main`, the new web page will be deployed automatically within a couple of minutes.
38+
As soon as your pull request to https://github.com/tableau/extensions-api is merged to `gh-pages`, the new web page will be deployed automatically within a couple of minutes.
3939

4040
### View the docs
4141

4242
| Branch | URL |
4343
|---- |---- |
44-
| `dev` | [https://d45.github.io/test-extensions-api/dev](https://d45.github.io/test-extensions-api/dev) |
45-
| `main` | [https://d45.github.io/test-extensions-api](https://d45.github.io/test-extensions-api/) |
44+
| `dev` | [https://tableau.github.io/extensions-api/gh-pages-dev](https://tableau.github.io/extensions-api/gh-pages-dev) |
45+
| `main` | [https://tableau.github.io/textensions-api](https://tableau.github.io/extensions-api/) |
8.57 KB
Loading
15.2 KB
Loading
15.7 KB
Loading

website/docs/core/trex_configure.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ $(document).ready(function () {
8080
// This uses the window.location.origin property to retrieve the scheme, hostname, and
8181
// port where the parent extension is currently running, so this string doesn't have
8282
// to be updated if the extension is deployed to a new location.
83-
const popupUrl = `${window.location.origin}/Samples/UINamespace/uiNamespaceDialog.html`;
83+
const popupUrl = `${window.location.origin}/Samples/Dashboard/UINamespace/uiNamespaceDialog.html`;
8484
//
8585
// ...
8686
// initial payload string value, `defaultIntervalInMin` set
@@ -135,4 +135,4 @@ In your code to close the popup window, you must pass a *non-empty* string value
135135

136136
```
137137

138-
To better understand how to use the context menu or configuration window, and to see it in action, check out the [UINamespace](https://github.com/tableau/extensions-api/tree/master/Samples/UINamespace?=target="_blank") sample.
138+
To better understand how to use the context menu or configuration window, and to see it in action, check out the [UINamespace](https://github.com/tableau/extensions-api/tree/master/Samples/Dashboard/UINamespace?=target="_blank") sample.

website/docs/core/trex_events.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ In most cases, you can create an event listener by chaining the methods to the s
4343
// ...
4444
```
4545

46-
For more information, check out the sample extension, [Filtering](https://github.com/tableau/extensions-api/tree/main/Samples/Filtering).
46+
For more information, check out the sample extension, [Filtering](https://github.com/tableau/extensions-api/tree/main/Samples/Dashboard/Filtering).

website/docs/core/trex_format.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,6 @@ For more information about using event listeners, see [Events and Event Handling
8989

9090
## What's Next
9191

92-
* To see a working sample dashboard extension that uses workbook formatting, see the JavaScript [Formatting](https://github.com/tableau/extensions-api/tree/main/Samples/Formatting) sample in the Samples folder, or the TypeScript [Formatting](https://github.com/tableau/extensions-api/tree/main/Samples-Typescript/Formatting) sample in the Samples-Typescript folder.
92+
* 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.
9393

9494
* For information about accessing the formatting styles in a workbook, see [workbookFormatting](pathname:///api/interfaces/environment.html#workbookformatting) in the API reference documentation.

website/docs/core/trex_tableau_viz.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ Now that you have seen the basic steps for adding a Tableau Viz to a dashboard e
198198

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

201-
* Check out the [Tableau Viz Sample - VizImage](https://github.com/tableau/extensions-api/tree/main/Samples/VizImage) and see how it works. Examine the source code to find out ways you can incorporate Tableau Viz into your own dashboard extensions.
201+
* 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.
202202

203203
---
204204

website/docs/core/trex_typescript.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ In the HTML code for the extensions, the JavaScript files are referenced. The fo
8989

9090
```html
9191
<!-- Extensions Library (this will be hosted on a CDN eventually) -->
92-
<script src="../../lib/tableau.extensions.1.latest.js"></script>
92+
<script src="../../../lib/tableau.extensions.1.latest.js"></script>
9393

9494
<!-- The extension code (webpack) -->
95-
<script src="../../dist/datasources.js"></script>
95+
<script src="../../../dist/datasources.js"></script>
9696
```
9797

9898
## Related resources

website/docs/dashext/trex_create.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ For convenience, you might want to create a folder for your "Hello World" dashbo
2828
The manifest file (`EXTENSION-NAME.trex`) is an XML file that describes the extension and provides information to register the extension with Tableau. For a description of the contents of this file, see [Elements of the manifest file](trex_manifest#elements-of-the-manifest-file).
2929

3030
1. In the `HelloDemo` folder (or where ever you want to put your files), create a manifest file for your extension.
31-
Name the manifest file for your extension (for example, `HelloExtension` and save it with the file name extension `.trex`.
31+
Name the manifest file for your extension (for example, `HelloExtension`) and save it with the file name extension `.trex`.
3232

3333
2. Copy the following XML code into your new file. Make sure that the `<?xml ...>` declaration appears as the first element in the file (line 1, column 1). Any blank spaces in front of the declaration will cause an error when you load the extension.
3434

@@ -123,7 +123,7 @@ Your web application must include an HTML page. This page should link to the Ext
123123

124124
The sample code includes a link to the JavaScript library (`tableau.extensions.1.latest.js`), which is available in the `/lib` folder. The sample code also includes links to jQuery and Bootstrap libraries.
125125

126-
3. If necessary, adjust the relative path to the Extensions API JavaScript library (`tableau.extensions.1.latest.js`), which is available in the `/lib` folder.
126+
3. If necessary, adjust the relative path to the Extensions API JavaScript library (`tableau.extensions.1.latest.js`), which is available in the `/lib` folder.
127127

128128
```html
129129

@@ -242,8 +242,8 @@ You can also use the Tableau log files to identify issues, see [Use Log files to
242242

243243
## What's next?
244244

245-
- For more information about how you can use the Extensions API, go look at the [Samples](https://github.com/tableau/extensions-api/tree/master/Samples/) or follow the [Tutorial](https://github.com/tableau/extensions-api/tree/master/Tutorial/) and learn how to build a dashboard extension, step by step.
245+
- For more information about how you can use the Extensions API to create dashboard extensions, go look at the [Samples](https://github.com/tableau/extensions-api/tree/master/Samples/Dashboard/) or follow the [Tutorial](https://github.com/tableau/extensions-api/tree/master/Tutorial/Dashboard) and learn how to build a dashboard extension, step by step.
246246

247-
- Get familiar with the programming interface of the Extensions API, see <a href="../docs/index.html" target="_blank">API Reference</a>.
247+
- Get familiar with the programming interface of the Extensions API, see [API Reference](pathname:///api/).
248248

249249

website/docs/dashext/trex_examples.md

+40-27
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ The best way to learn how to build your own extensions is to look at the sample
77

88
- To download the Extensions API SDK, if you have not already done so, see [Get Started](./trex_getstarted).
99

10-
- You can browse the sample code for the dashboard extensions in the [Samples](https://github.com/tableau/extensions-api/tree/master/Samples?=target="_blank") and the [Tutorial](https://github.com/tableau/extensions-api/tree/master/Tutorial?=target="_blank") folders on GitHub.
10+
- You can browse the sample code for the dashboard extensions in the [Samples](https://github.com/tableau/extensions-api/tree/master/Samples/Dashboard?=target="_blank") and the [Tutorial](https://github.com/tableau/extensions-api/tree/master/Tutorial/Dashboard?=target="_blank") folders on GitHub.
1111

12-
- You can also create dashboard extensions using TypeScript. See the TypeScript sample code in [Samples-TypeScript](https://github.com/tableau/extensions-api/tree/master/Samples-Typescript?=target="_blank") on GitHub.
12+
- You can also create dashboard extensions using TypeScript. See the TypeScript dashboard sample code in [Samples-TypeScript](https://github.com/tableau/extensions-api/tree/master/Samples-Typescript/Dashboard?=target="_blank") on GitHub.
1313

1414
- You can also check out the dashboard extensions from the community, see [Community Extensions](pathname:///community/).
1515

@@ -20,47 +20,47 @@ The following instructions assume that you have already downloaded and extracted
2020

2121
### About the dashboard extension samples
2222

23-
The dashboard extension samples are in the `Samples` folder. There is also a step-by-step tutorial you can follow in the `Tutorial` folder.
23+
The dashboard extension samples are in the `Samples/Dashboard` folder. There is also a step-by-step tutorial you can follow in the `Tutorial` folder.
2424

25-
The [Samples-Typescript](https://github.com/tableau/extensions-api/tree/master/Samples-Typescript) folder shows how you can use the Extensions API type definitions to create extensions in TypeScript. For more information, see [Use TypeScript with the Extensions API](../core/trex_typescript).
25+
The [Samples-Typescript](https://github.com/tableau/extensions-api/tree/master/Samples-Typescript/Dashboard) folder shows how you can use the Extensions API type definitions to create extensions in TypeScript. For more information, see [Use TypeScript with the Extensions API](../core/trex_typescript).
2626

2727

2828

2929

30-
- **[DataSources](https://github.com/tableau/extensions-api/tree/master/Samples/DataSources?=target="_blank")**
30+
- **[DataSources](https://github.com/tableau/extensions-api/tree/master/Samples/Dashboard/DataSources?=target="_blank")**
3131

3232
Shows how to use the `getDataSourcesAsync` function to find the names of the data sources for each worksheet in the dashboard. Like the Filtering sample, the DataSources sample makes use the `Promise.all` function to combine the promises from the asynchronous calls together, and then waits for them to resolve.
3333

34-
- **[Filtering](https://github.com/tableau/extensions-api/tree/master/Samples/Filtering?=target="_blank")**
34+
- **[Filtering](https://github.com/tableau/extensions-api/tree/master/Samples/Dashboard/Filtering?=target="_blank")**
3535

3636
Demonstrates how to use the `getFiltersAsync` function to find and display the active filters in the dashboard and calls the `addEventListener` function to set a `FilterChanged` event on each workbook in the dashboard. Any time a filter value is changed, the extension refreshes the table that displays the active filters.
3737

38-
- **[Parameters](https://github.com/tableau/extensions-api/tree/master/Samples/Parameters?=target="_blank")**
38+
- **[Parameters](https://github.com/tableau/extensions-api/tree/master/Samples/Dashboard/Parameters?=target="_blank")**
3939

4040
Finds and displays all the parameters in the dashboard and then sets an event listener that waits for a parameter to change, which triggers a refresh.
4141

42-
- **[Settings](https://github.com/tableau/extensions-api/tree/master/Samples/Settings?=target="_blank")**
42+
- **[Settings](https://github.com/tableau/extensions-api/tree/master/Samples/Dashboard/Settings?=target="_blank")**
4343

4444
Uses the `settings` namespace to save settings (key-value pairs) for the extension. Demonstrates how you can save settings for each instance of an extension, which enables sharing common views of a workbook.
4545

46-
- **[UINamespaces](https://github.com/tableau/extensions-api/tree/master/Samples/UINamespace?=target="_blank")**
46+
- **[UINamespaces](https://github.com/tableau/extensions-api/tree/master/Samples/Dashboard/UINamespace?=target="_blank")**
4747

4848
Demonstrates how you can use the `UI` namespace to create a modal dialog box (or popup) that runs another extension, which allows users to interact and change the settings for the parent extension. This sample controls the background auto-refresh interval for data sources in a dashboard.
4949

5050

51-
- **[Tutorial](https://github.com/tableau/extensions-api/tree/master/Tutorial?=target="_blank")**
51+
- **[Tutorial](https://github.com/tableau/extensions-api/tree/master/Tutorial/Dashboard?=target="_blank")**
5252

5353
Walks you through the step-by-step process of creating and refining an extension that displays a summarized table of the currently selected marks.
5454

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

5757
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](../core/trex_typescript).
5858

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

6161
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](../core/trex_tableau_viz).
6262

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

6565
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.
6666

@@ -94,16 +94,18 @@ To install the `http-server`on your computer globally and to also start the serv
9494
```cli
9595
npm install http-server -g && http-server -p PORT
9696
```
97+
9798
If you have already installed `http-server`, you can start the server directly:
9899

99100
```cli
100101
http-server -p PORT
101-
```
102+
```
103+
102104
The port you use for the web server also has to match the port specified in the manifest file (`.trex`) for the server.
103105

104106
```html
105107
<source-location>
106-
<url>http://localhost:PORT/samples/parameters/parameters.html</url>
108+
<url>http://localhost:PORT/Samples/Dashboard/parameters/parameters.html</url>
107109
</source-location>
108110

109111
```
@@ -117,7 +119,7 @@ After you start the web server to host the sample extensions, you can try the ex
117119
1. Start Tableau and open a workbook that has a dashboard, or open a workbook and create a new dashboard.
118120
2. In the dashboard, under **Objects**, select **Extension** and drag it on to the dashboard.
119121
3. In the **Choose an Extension** dialog box, click **My Extensions**.
120-
4. Browse to the directory where the samples are located. For example, if you downloaded or cloned the GitHub repository, go to `\extensions-api\Samples`.
122+
4. Browse to the directory where the samples are located. For example, if you downloaded or cloned the GitHub repository, go to `\extensions-api\Samples\Dashboard`.
121123
5. Select one of the folders for the samples and open the `.trex` file (for example, `DataSources.trex`). <br/>
122124
Every Tableau extension has a manifest file (`.trex`) that describes the extension and identifies the location of the web application.
123125

@@ -129,6 +131,8 @@ The extension should appear in the dashboard. Play around with the extension. E
129131

130132
The TypeScript samples show how you can write your source code in TypeScript and then use the Extensions API type definitions to compile (or transpile) the code into JavaScript. The samples use Node.js and webpack to build the extensions. These instructions assume that you have cloned or downloaded the Extensions API GitHub repository.
131133

134+
### Build the samples
135+
132136
1. Go to the `extensions-api` folder.
133137
1. Install the web server components:
134138

@@ -139,24 +143,33 @@ The TypeScript samples show how you can write your source code in TypeScript and
139143
1. Build the TypeScript samples:
140144

141145
```cli
142-
npm run build
146+
npm run build
143147
```
144148

145149
Run lint with the semistandard package.
146150

147151
```cli
148-
npm run lint
152+
npm run lint
149153
```
150154

151155
1. Compile and start the HTTP server for the extensions. This command also watches the source file directories and automatically builds the samples when you make changes.
152156

153-
```cli
154-
npm run dev
155-
```
157+
```cli
158+
npm run dev
159+
```
160+
161+
### Try the samples
162+
163+
1. Start Tableau and open a workbook that has a dashboard, or open a workbook and create a new dashboard.
164+
165+
1. In the dashboard, under **Objects**, select **Extension** and drag it on to the dashboard.
166+
167+
1. In the **Choose an Extension** dialog box, click **My Extensions**.
168+
169+
1. Browse to the directory where the samples are located and add one of the extensions to the dashboard.
170+
171+
For example, if you downloaded or cloned the GitHub repository, go to `\extensions-api\Samples-Typescript\Dashboard`. The folder contains the TypeScript versions of the Datasources, Filtering, and Parameters samples.
172+
173+
### Build your own extensions using TypeScript
156174

157-
1. Try the samples.
158-
- Start Tableau and open a workbook that has a dashboard, or open a workbook and create a new dashboard.
159-
- In the dashboard, under **Objects**, select **Extension** and drag it on to the dashboard.
160-
- In the **Choose an Extension** dialog box, click **My Extensions**.
161-
- Browse to the directory where the samples are located. For example, if you downloaded or cloned the GitHub repository, go to `\extensions-api\Samples-Typescript`. The folder contains the TypeScript versions of the Datasources, Filtering, and Parameters samples.
162-
- If you want to experiment with your own TypeScript code for extensions, you can use the same infrastructure that the TypeScript samples use. Create a folder in the **Samples-Typescript** directory and then add your extension source files. Add an entry to the `webpack.config.js` file for your extension TypeScript file. Update the path to your extension in the `.trex` file. Build and run your extension using the same commands you use to build the samples. For more information, see [Use TypeScript with the Extensions API](../core/trex_typescript).
175+
If you want to experiment with your own TypeScript code for extensions, you can use the same infrastructure that the TypeScript samples use. Create a folder in the **Samples-Typescript** directory and then add your extension source files. Add an entry to the `webpack.config.js` file for your extension TypeScript file. Update the path to your extension in the `.trex` file. Build and run your extension using the same commands you use to build the samples. For more information, see [Use TypeScript with the Extensions API](../core/trex_typescript).

0 commit comments

Comments
 (0)