# create-tableau-dashboard-extension

> This project helps create a basic Tableau dashboard extension. More information about building dashboard extensions for Tableau can be found [here](https://tableau.github.io/extensions-api/).

Latest version **0.1.4** (published 2023-05-04) · 0 weekly downloads

## Install

```sh
npm install create-tableau-dashboard-extension
pnpm add create-tableau-dashboard-extension
yarn add create-tableau-dashboard-extension
bun add create-tableau-dashboard-extension
```

Provides the command `create-tableau-dashboard-extension`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2023-05-04 |
| First published | 2022-11-04 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 16 |
| Unpacked size | 529 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | takashi.binns |

## Links

- npm: https://www.npmjs.com/package/create-tableau-dashboard-extension
- Repository: https://github.com/tableau/create-tableau-dashboard-extension
- Homepage: https://github.com/tableau/create-tableau-dashboard-extension#readme
- Issues: https://github.com/tableau/create-tableau-dashboard-extension/issues
- npm.io page: https://npm.io/package/create-tableau-dashboard-extension

## Dependencies (16)

- [g](https://npm.io/package/g.md) ^2.0.1
- [axios](https://npm.io/package/axios.md) ^1.1.3
- [chalk](https://npm.io/package/chalk.md) 4.1.2
- [react](https://npm.io/package/react.md) ^16.14.0
- [xml2js](https://npm.io/package/xml2js.md) ^0.4.23
- [gh-pages](https://npm.io/package/gh-pages.md) ^4.0.0
- [react-dom](https://npm.io/package/react-dom.md) ^16.14.0
- [web-vitals](https://npm.io/package/web-vitals.md) ^2.1.4
- [react-scripts](https://npm.io/package/react-scripts.md) ^5.0.1
- [react-toastify](https://npm.io/package/react-toastify.md) ^9.0.8
- [object-path-set](https://npm.io/package/object-path-set.md) ^1.0.2
- [@tableau/tableau-ui](https://npm.io/package/@tableau/tableau-ui.md) ^3.7.0
- [@testing-library/react](https://npm.io/package/@testing-library/react.md) ^12
- [@testing-library/jest-dom](https://npm.io/package/@testing-library/jest-dom.md) ^5.16.5
- [@testing-library/user-event](https://npm.io/package/@testing-library/user-event.md) ^12
- [@tableau/extensions-api-types](https://npm.io/package/@tableau/extensions-api-types.md) ^1.9.0

## Recent versions

- 0.1.4 (latest) — 2023-05-04
- 0.1.2 — 2022-11-04
- 0.1.1 — 2022-11-04
- 0.1.0 — 2022-11-04

## README

# Create a Tableau Dashboard Extension Starter

This project helps create a basic Tableau dashboard extension.  More information about building dashboard extensions for Tableau can be found [here](https://tableau.github.io/extensions-api/).

## Using the starter tool
To get your first Tableau dashboard extension up and running, execute the command below:

```npx create-tableau-dashboard-extension myExtensionName```

This will create a starter dashboard extension, as well as the trex file needed to run it.  After the build process completes, it will print out the command you need to start the web app.  It should be something like this:

```cd create-tableau-dashboard-extension/{myExtensionName} && npm start```

This will start up the web app, but you still need to open it in Tableau.  Open Tableau Desktop and goto any dashboard.  Drag in a Dashboard Extension object, and navigate to the trex file in your create-tableau-dashboard-extension directory. 

*Note: This tool has a dependency on ```git``` being installed, in order to pull source code for the web app.  If you haven't done so already, please [download and install git](https://git-scm.com/downloads)*

## How does this dashboard extension work?
When you run the npx command, a react web app is created with the following directory structure.  
![React app directory structure](screenshots/directory-structure.png)

### Dashboard Extension
The dashboard extension rendering is controlled by src/components/DashboardExtension.js.  It shows a prompt if the extension has not been configured, or  displays some statistics of the selected sheet.  This isn't meant to be useful, more to show how you can detect whether the extension has been configured or not.

### Config popup
The config popup window is controlled by src/components/Config.js.  The contents of the popup are just to show common input types (dropdown menus, sliders, checkboxes, etc).  None of them are actually used, except for the sheet selector dropdown.  The UI components shown are leveraging Tableau's [React UI](https://tableau.github.io/tableau-ui/) to ensure the components look like the rest of Tableau.

### Routing
One thing that may seem unusual about this web app, is that it does not use the standard react-router-dom package.  In order for a dashboard extension to qualify as a "sandboxed extension", it [cannot use standard routing](https://tableau.github.io/extensions-api/docs/trex_sandbox_test.html#requirements-for-sandboxed-extensions). Instead, this project uses the [react-app-rewired](https://www.npmjs.com/package/react-app-rewired) package to allow for multiple entry points (public/index.html & public/config.html)

---
_Source: https://npm.io/package/create-tableau-dashboard-extension · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
