Skip to content

Commit

Permalink
Merge branch 'tableau:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
d45 authored Jun 20, 2024
2 parents 5d331d9 + 9ba3a50 commit 5aa1484
Show file tree
Hide file tree
Showing 659 changed files with 389,690 additions and 94,743 deletions.
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Issue report
about: Create a report or request for help
title: ''
labels: ''
assignees: ''

---

**Describe the issue**

A clear and concise description of what the issue is.

**Version information:**
- Tableau version: (or note if using Tableau Online)
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Steps to reproduce (please include a code snippet, if possible):**
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

A clear and concise description of what you expected to happen.

**Screenshots and workbook**

If possible, attach a workbook with sample data add/or screenshots to help explain your problem.

**NOTE:** Be careful not to post user names, passwords, auth tokens or any other private or sensitive information.
29 changes: 29 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

# NOTE: There are no necessary tests to run for this repo
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm run build
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,14 @@ node_modules/
_site/
node_modules/
npm-debug.log
package-lock.json

# Ignore webpack generated files
dist/

.DS_Store

# ignore local npmrc files
.npmrc

# Ignore IDE specific files
.idea
6 changes: 6 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
No content was found at this location.<br/>
If you are trying a sandbox sample, you need to use the sandbox server.<br/>
<br/>
npm run start-sandbox<br/>
<br/>
See the readme for more information.
125 changes: 0 additions & 125 deletions Gemfile.lock

This file was deleted.

83 changes: 67 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,87 @@

![Image of Flex the T-Rex](./assets/flex.png)


## Why the Tableau Extensions API?
The Extensions API lets you do more without leaving Tableau. Build Tableau extensions that can interact and communicate with Tableau, and embed them directly in your workbooks.

The Extensions API lets you do more without leaving Tableau. Build Tableau dashboard and viz extensions that can interact and communicate with Tableau, and embed them directly in your workbooks.

* Build viz extensions to create new viz types that Tableau users can access through the worksheet Marks card.


<img src="./assets/sm_sankey.png" width="200" height="100">


* Build dashboard extensions to add new features and functionality to Tableau that users can access through the dashboard.

<img src="./Tutorial/Dashboard/assets/Part_3.gif" width="200" height="100">


## Setup and Running Samples

### Prerequisites
* You must have Node.js and npm installed. You can get these from [http://nodejs.org](http://nodejs.org).

### Setup
1. Copy the `.trex` files of the sample you wish to run to `~\Documents\My Tableau Repository (Beta)\Extensions` so they are available to Tableau.
2. Open a command prompt window to the location where you cloned this repo.
3. Run `npm install`.
4. Run `npm start`.
5. Launch Tableau and use the sample in a dashboard.
* You must have Node.js and npm installed. You can get these from [https://nodejs.org](https://nodejs.org).

## Submissions
We would love submissions to either the Docs or Sample code! To contribute, first sign our CLA that can be found [here](https://tableau.github.io/contributing.html). To submit a contribution, please fork the repository then submit a pull request to the `submissions` branch.
### Install Extensions API SDK Components and Start Server

## Code Style
Our sample code follows the [Semi-Standard Style](https://github.com/Flet/semistandard). If you add your own extension code to the Samples directory, you can run `npm run lint` to validate the style of your code. Please run this command before submitting any pull requests for Sample code.
1. Open a command prompt window to the location where you cloned this repo.

2. Install the Extensions API SDK components.

**npm install**

3. Build the TypeScript samples and install the Extensions API types library.

**npm run build**

4. Start the local Dashboard Extension server.

**npm start**

5. Launch Tableau and try a dashboard sample extension in a dashboard, or a viz extension in a worksheet. The dashboard and viz extension samples are located in the `Samples` folder.

>**Note** The local web server you start just serves to host the extension samples and tutorial. These extensions have URLs similar to the following: `http://localhost:8765/Samples/Dashboard/DataSources/datasources.html`.
> This local web server is not intended to serve the Extensions API Help pages.
> View the Help on GitHub at [https://tableau.github.io/extensions-api](https://tableau.github.io/extensions-api).
### Typescript Development

Samples written in Typescript are located in the `Samples-Typescript` folder.
If you want to use TypeScript to write your extensions, you can run a script that starts up the HTTP server and actively listens for changes to the `.ts` files located in the `Samples-Typescript` folder. You can then add your extension to the folder and use the script to transpile your extension to JavaScript.

* To start the the HTTP server and listen for changes to the `.ts` files.

**npm run dev**

For more information, see [Use TypeScript with the Extensions API](https://tableau.github.io/extensions-api/docs/core/trex_typescript).

### Sandboxed Extension Development Environment

Tableau is introducing development support for Sandboxed Extensions with Tableau 2019.3. Sandboxed Extensions run in a virtual sandbox and ensure the extension can’t make network calls outside of the hosting Tableau Server. The Extensions API SDK provides a local development environment that replicates the Tableau Hosting Cloud Service for Sandboxed Extensions. You can test your Sandboxed extensions locally with the same sandbox policies.

1. Start the local Sandboxed Extension web server.

**npm run start-sandbox**

2. Launch Tableau (Tableau 2019.3 and later) and try the sample Sandboxed dashboard extension in a dashboard. You can find the `.trex` file and sample code in the `Samples\Dashboard\UINamespace-sandboxed` folder.

For more information, see [Create and Test Sandboxed Extensions](https://tableau.github.io/extensions-api/docs/security/trex_sandbox_test).

## Contributions
Code contributions and improvements by the community are welcomed!

Contributions and improvements by the community are welcomed!
See the LICENSE file for current open-source licensing and use information.

Before we can accept pull requests from contributors, we require a signed [Contributor License Agreement (CLA)](http://tableau.github.io/contributing.html).
Before we can accept pull requests from contributors, we require a signed [Contributor License Agreement (CLA)](https://tableau.github.io/contributing.html). To submit a contribution, please fork the repository then submit a pull request to the `main` branch.

## Code Style
Our sample code follows the [Semi-Standard Style](https://github.com/Flet/semistandard) for JavaScript samples linting and [tslint](https://palantir.github.io/tslint/) for TypeScript. If you add your own extension code to the Samples or Samples-Typescript directories, you can run `npm run lint` to validate the style of your code. Please run this command before submitting any pull requests for Sample code.

`npx semistandard --fix` to fix linting issues which can be fixed automatically.

## Documentation
[Visit the project website and read the documentation here.](https://tableau.github.io/extensions-api/)


## Issues
Use [Issues](https://github.com/tableau/ProjectFrelard/issues) to log any problems or bugs you encounter in the docs or sample code.
Use [Issues](https://github.com/tableau/extensions-api/issues) to log any problems or bugs you encounter in the docs or sample code, or to discuss any proposed changes or additions.
19 changes: 19 additions & 0 deletions Samples-Typescript/Dashboard/Annotation/Annotation.trex
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest manifest-version="0.1" xmlns="http://www.tableau.com/xml/extension_manifest">
<dashboard-extension id="com.tableau.extensions.samples.annotation" extension-version="0.1.0">
<default-locale>en_US</default-locale>
<name resource-id="name"/>
<description>Annotation Sample</description>
<author name="tableau" email="[email protected]" organization="tableau" website="https://www.tableau.com"/>
<min-api-version>1.10</min-api-version>
<source-location>
<url>http://localhost:8765/Samples-Typescript/Dashboard/Annotation/annotation.html</url>
</source-location>
<icon>iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH4QgLDTYEcBRoeAAABp9JREFUeNrlm01sHEUWx//vVbs79gThjAd2iflIAkEcEARfEciBSYLEbbV8SJaDEpIAMQgkViuirA8IskKcdiEJX3G0C5dNpAVxQLIyiYw4YYIQBw4RBoMgBBIbCRtnOsx0vbcHd9sTZ3r8ge2p2bQ0B/+7unp+1dX/eX71ivL5TgAwAAQAxR/rsiYidvv2btq6ddcqVRwE8JCqgoigqgAAIvpKVbf29v51cHDwUxWRav2pWbdujcH04cU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mCC</icon>
</dashboard-extension>
<resources>
<resource id="name">
<text locale="en_US">Annotation Sample</text>
</resource>
</resources>
</manifest>
29 changes: 29 additions & 0 deletions Samples-Typescript/Dashboard/Annotation/annotation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Annotation Sample</title>
<!-- jQuery -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>

<!-- Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>

<!-- Extensions Library -->
<script src="../../../lib/tableau.extensions.1.latest.js"></script>

<!-- Our extension's code -->
<script src="../../../dist/annotation.js"></script>
</head>
<body>
<div class="container">
<h2>Annotation Sample</h2>
<p>Select marks to generate annotations.</p>
<div>
<p style="display: inline">Worksheet To Annotate:</p>
<!-- Options to select will be populated by the Extension -->
<select id="worksheet-selection" class="form-select" aria-label="Default select example" style="display: inline" disabled></select>
</div>
</div>
</body>
</html>
Loading

0 comments on commit 5aa1484

Please sign in to comment.