this.setState({ showFile: true, showEdit: false, selectedTab: tabs.file })}
diff --git a/frontend/src/js/constants/Constants.js b/frontend/src/js/constants/Constants.js
index 4469346..8a0f84c 100644
--- a/frontend/src/js/constants/Constants.js
+++ b/frontend/src/js/constants/Constants.js
@@ -1,5 +1,114 @@
const ONE_VAR_PLOTS = ["boxfill", "isofill", "isoline"] // meshfill can be either 1 or 2
const TWO_VAR_PLOTS = ["vector", "3d_vector", "streamline"]
+const JOYRIDE_STEPS = [
+ {
+ title: 'Welcome to vCDAT!',
+ text: 'The following tour will help guide you through the basic features of vCDAT. '.concat(
+ 'Click "Next" to continue the tour.'
+ ),
+ selector: '.joyride',
+ position: 'top',
+ type: 'click',
+ style: {
+ arrow: {
+ display: 'none'
+ },
+ skip: {
+ color: '#f04'
+ },
+ }
+ },
+ {
+ title: 'Plot Parts',
+ text: 'There are three parts to any given plot. Variables, a Graphics Method, and a Template.'.concat(
+ ' Each of these can be dragged and dropped into a cell.'
+ ),
+ selector: '#left-side-bar',
+ position: 'right',
+ type: 'click',
+ style: {
+ hole: {
+ marginTop: "-1px"
+ }
+ }
+ },
+ {
+ title: 'Variables',
+ text: 'Use the AddEdit and '.concat(
+ 'Delete buttons to modify what variables are loaded. ',
+ 'In order to edit or delete a variable, ',
+ 'click on it to Select it first. ',
+ 'Graphics Methods and Templates can be edited in the same manner.'
+ ),
+ selector: '.var-list-container',
+ position: 'right',
+ type: 'click',
+ },
+ {
+ title: 'Graphics Methods',
+ text: 'Graphics Methods define what the plot itself should look like. '.concat(
+ 'Select one to edit the colormap, projection, and more.'
+ ),
+ selector: '.gm-list-container',
+ position: 'right',
+ type: 'click',
+ },
+ {
+ title: 'Templates',
+ text: 'Templates define how the plot is presented. '.concat(
+ 'They control everything about the labels and axes as well as the size and location of the plots inside a cell.'
+ ),
+ selector: '.template-list-container',
+ position: 'right',
+ type: 'click',
+ },
+ {
+ title: 'Spreadsheet',
+ text: 'The spreadsheet is made up of Cells. Each cell provides areas to drop variables, '.concat(
+ 'graphics methods and templates, as well as an area to drop these items to create a new plot within the cell. ',
+ 'Clicking on a cell will select it.'
+ ),
+ selector: '.spreadsheet-div',
+ position: 'top',
+ type: 'click',
+ },
+ {
+ title: 'Spreadsheet Toolbar',
+ text: 'The spreadsheet toolbar controls how many rows and columns of cells should be in a given sheet. It also allows for creating and switching between sheets.',
+ selector: '.spreadsheet-toolbar',
+ position: 'right',
+ type: 'click',
+ style: {
+ hole: {
+ marginTop: "-1px"
+ }
+ }
+ },
+ {
+ title: 'Inspecting Plots',
+ text: 'When a cell is selected, each plot inside the cell is listed here. '.concat(
+ 'Use this window to inspect and change things such as the variables or templates that define the plot, ',
+ 'as well as remove plots when there is more than one in a cell.'
+ ),
+ selector: '.plot-inspector-container',
+ position: 'right',
+ type: 'click',
+ },
+ {
+ title: 'Tools',
+ text: 'The tools section contains various tools and actions that you may find useful. '.concat(
+ 'Add Plot will add an additional plot to a cell. ',
+ 'Use this as an overlay or as an in-cell side-by-side comparison.',
+ 'Clear Cell will reset the cell back to the default. ',
+ 'This can be undone if you accidentally click it with the undo button.',
+ 'Colormap Editor will open a window for creating, editing, and applying colormaps.'
+ ),
+ selector: '.tools-container',
+ position: 'right',
+ type: 'click',
+ },
+]
+export { JOYRIDE_STEPS }
export { ONE_VAR_PLOTS }
export { TWO_VAR_PLOTS }
diff --git a/frontend/src/js/containers/AppContainer.jsx b/frontend/src/js/containers/AppContainer.jsx
index 37a9b38..f68d9f9 100644
--- a/frontend/src/js/containers/AppContainer.jsx
+++ b/frontend/src/js/containers/AppContainer.jsx
@@ -1,26 +1,85 @@
-import React from 'react';
+import React, { Component } from 'react';
import TopBar from './TopBar/TopBar.jsx'
import LeftSideBar from './LeftSideBar.jsx';
-import RightSideBar from './RightSideBar.jsx';
import SpreadsheetContainer from './SpreadsheetContainer/SpreadsheetContainer.jsx';
import { ActionCreators as UndoActionCreators } from 'redux-undo';
import { connect } from 'react-redux';
import { DragDropContext } from 'react-dnd';
import HTML5Backend from 'react-dnd-html5-backend';
import { ToastContainer } from 'react-toastify';
+import { JOYRIDE_STEPS } from '../constants/Constants.js'
+import Joyride from 'react-joyride'
+import 'react-joyride/lib/react-joyride.scss'
/* global jQuery */
-var AppContainer = React.createClass({
- propTypes: {
- undo: React.PropTypes.func,
- redo: React.PropTypes.func,
- undoEnabled: React.PropTypes.bool,
- redoEnabled: React.PropTypes.bool
- },
+class AppContainer extends Component{
+ constructor(props){
+ super(props)
+ this.state = {
+ jr_steps: JOYRIDE_STEPS,
+ jr_run: false,
+ jr_auto_start: false,
+ }
+ this.startTour = this.startTour.bind(this)
+ this.handleJoyrideEvents = this.handleJoyrideEvents.bind(this)
+ }
+
+ componentDidMount(){
+
+ }
+
+ startTour(){
+ if(this.joyride){
+ this.setState({jr_run: true})
+ }
+ }
+
+ handleJoyrideEvents(event){
+ console.log(event)
+ if(!event){
+ console.log("jr event was undefined")
+ return
+ }
+ switch(event.type){
+ case "step:after":
+ if(event.action !== "close"){
+ return // Only continue to reset on a close action
+ }
+ // falls through.
+ case "overlay:click":
+ case "finished":
+ this.setState({jr_run: false},() => {
+ this.joyride.reset(false) // pass .reset(false) so it does not start the tour again immediately
+ })
+ return
+ case "error:target_not_found":
+ console.warn("Joyride element missing on step ", event.index)
+ }
+
+ }
+
render() {
return (