Giter Club home page Giter Club logo

openspace-webguifrontend's Introduction

OpenSpace WebGUI Module

Develop

First, go get Node.js

# install dependencies
npm install
# run development app
npm start
# open gui
open http://localhost:4690

To run the development version of the gui inside OpenSpace, go to data/assets/customization/gui.asset and change the dev flag to true. Go to data/assets/util/webgui.asset to see how the ports and routes are setup.

The development gui is served at http://localhost:4690. To run the development version of the gui in a browser, go to http://localhost:4690/frontend/#/onscreen.

Components

There are several useful and reusable components to make it easier for you as the developer. Most of these general-purpose components are in src/comoponents/common.

Create a new GUI

If you are creating your own gui, you can overwrite the route onscreen with your own custom route in /src/App.jsx. An example of this can be seen in touch.profile.

Types

This is something you hear quite often:

MEH! JavaScript is the worst, there's no types or anything. Boo!!
- Some developers

It is not true. JavaScript has lots of types, but they might be a bit scary for the developers who's into strict typing.

To make this a bit easier for y'all, this web app has support for types using the Flow system. In some files, you might see a comment looking like

// @flow

This tells our transpiler Babel (that makes our modern JavaScript readable for all browsers) that this file should be type checked! A type declaration looks like

function stringReturner(a: string, bMightBeAnything): string {
  //                     ^^^^^^^^                   ^^^^^^^^
  // The interesting parts of this code snippet is higlighted above
}

For more about Flow, check out https://flow.org

Deploy

When pushed to master, a github hook will be triggered to build the gui. In the main OpenSpace repository, go to data/assets/util/webgui.asset and change the commit hash to the latest one. Make sure to test it in production mode before pushing the update to OpenSpace master, i.e. change the dev flag to false in data/assets/customization/gui.asset.

The production gui is served at http://localhost:4680. To run the production gui in a browser, go to http://localhost:4680/frontend/#/onscreen.

openspace-webguifrontend's People

Contributors

ylvaselling avatar weirdrubberduck avatar micahnyc avatar emiax avatar alexanderbock avatar dependabot[bot] avatar creaticdd avatar liuloppan avatar eriksunden avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.