diff --git a/.circleci/config.yml b/.circleci/config.yml index 9bf6879ce..88fc4360b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -25,7 +25,9 @@ jobs: - run: .circleci/find-screenshots-compare-commit.sh - run: echo $REG_SUIT_EXPECTED_KEY - - run: docker run -v `pwd`:`pwd` -w `pwd` -it --rm -e CI -e CIRCLE_SHA1 -e REG_SUIT_EXPECTED_KEY -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_DEFAULT_REGION cruise/webviz-ci:0.0.8 npm run ci + - run: + command: docker run -v `pwd`:`pwd` -w `pwd` -it --rm -e CI -e CIRCLE_SHA1 -e REG_SUIT_EXPECTED_KEY -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_DEFAULT_REGION cruise/webviz-ci:0.0.8 npm run ci + no_output_timeout: 30m - save_cache: paths: ["node_modules"] diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..eb2863f6e --- /dev/null +++ b/.editorconfig @@ -0,0 +1,11 @@ +# http://editorconfig.org + +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/.flowconfig b/.flowconfig index 3903f2795..59ac87b4f 100755 --- a/.flowconfig +++ b/.flowconfig @@ -12,6 +12,7 @@ dist emoji=true esproposal.class_static_fields=enable esproposal.class_instance_fields=enable +esproposal.optional_chaining=enable # Cheap workaround to make flow typechecking work across packages in the monorepo module.system.node.resolve_dirname=node_modules module.system.node.resolve_dirname=./packages diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..89822bab9 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,31 @@ +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x] + + steps: + - uses: actions/checkout@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: npm bootstrap & build + run: | + npm run bootstrap + npm run build --if-present + #npm run docs (runs webserver) + env: + CI: true + - uses: elgohr/Publish-Docker-Github-Action@v5 + with: + name: cruise-automation/webviz/webwiz:latest + registry: docker.pkg.github.com + dockerfile: Dockerfile + username: warpoe + password: ${{ secrets.GITHUB_TOKEN }} diff --git a/.vscode/settings.json b/.vscode/settings.json index ead583118..0a3d51149 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,5 @@ { "editor.formatOnSave": true, - "eslint.autoFixOnSave": true, "flow.useNPMPackagedFlow": true, "javascript.validate.enable": false, "typescript.validate.enable": false, @@ -8,6 +7,7 @@ "*.mdx": "markdown" }, "editor.codeActionsOnSave": { - "source.organizeImports": false + "source.organizeImports": false, + "source.fixAll.eslint": true } } diff --git a/README.md b/README.md index 96a2b958c..14177628b 100755 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ # [Webviz](https://webviz.io/) [](https://circleci.com/gh/cruise-automation/webviz) -**Drag and drop your own bag files into [Webviz](https://webviz.io/try/) to explore your robotics data.** +**Drag and drop your own bag files into [Webviz](https://webviz.io/app/) to explore your robotics data, or connect to a live robot or simulation using the [rosbridge_server](http://wiki.ros.org/rosbridge_suite/Tutorials/RunningRosbridge).** -**View a demo of Webviz in action [here](https://webviz.io/try/?demo).** +**View a demo of Webviz in action [here](https://webviz.io/app/?demo).** **Webviz** is a web-based application for playback and visualization of [ROS](http://www.ros.org/) [bag files](http://wiki.ros.org/Bags). This repository also contains some libraries that can be used independently to build web-based visualization tools. -- **webviz-core** ([homepage](https://webviz.io/), [tool](https://webviz.io/try), [github](https://github.com/cruise-automation/webviz/tree/master/packages/webviz-core)): A tool to inspect [ROS bags](http://wiki.ros.org/ROS/Tutorials/Recording%20and%20playing%20back%20data). +- **webviz-core** ([homepage](https://webviz.io/), [tool](https://webviz.io/app), [github](https://github.com/cruise-automation/webviz/tree/master/packages/webviz-core)): A tool to inspect [ROS bags](http://wiki.ros.org/ROS/Tutorials/Recording%20and%20playing%20back%20data). - **regl-worldview** ([homepage](https://webviz.io/worldview/), [npm](https://www.npmjs.com/package/regl-worldview), [github](https://github.com/cruise-automation/webviz/tree/master/packages/regl-worldview)): React library for rendering 2D and 3D scenes using [regl](https://github.com/regl-project/regl). - **react-key-listener** ([npm](https://www.npmjs.com/package/react-key-listener), [github](https://github.com/cruise-automation/webviz/tree/master/packages/react-key-listener)): React component for handling keyboard events, without interfering with editable fields and buttons. - **@cruise-automation/hooks** ([npm](https://www.npmjs.com/package/@cruise-automation/hooks), [github](https://github.com/cruise-automation/webviz/tree/master/packages/@cruise-automation/hooks)): A list of resusable React hooks. @@ -19,7 +19,7 @@ Please see the individual package READMEs for details on how to install and use - `npm run bootstrap` in the root directory to install dependencies. - `npm run build` to run a single build or `npm run watch` to watch and build. -- `npm run docs` to run the docs app (e.g. go to http://localhost:8080/try to open Webviz). Requires `build` to be run first. +- `npm run docs` to run the docs app (e.g. go to http://localhost:8080/app to open Webviz). Requires `build` to be run first. - `npm run storybook` to run storybook. Requires `build` to be run first. - `npm run screenshot-debug` to generate screenshots from stories. - `npm run lint` to run the linters (and `npm run lint:fix` to automatically fix issues). @@ -35,3 +35,5 @@ If you have the right permissions, you can publish: ## Contributing PRs, bug reports, and feature requests are welcome! Please observe [CONTRIBUTING.md](CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) when making a contribution. + +Note that while it's possible to fork Webviz to make your own custom version, we'd encourage you to use webviz.io/app and propose generic solutions that everyone would benefit from. Cruise also still has its own fork of Webviz, but long term we'd like to move away from that. For examples of generic features, see the Node Playground panel, using generic RViz markers in the 3d panel, streaming in bags from any cloud service, loading layouts hosted on arbitrary URLs, and so on. We'd love your creative ideas for making Webviz widely useful! diff --git a/babel.config.js b/babel.config.js index 34da8ffa9..2beb91213 100644 --- a/babel.config.js +++ b/babel.config.js @@ -9,6 +9,8 @@ module.exports = { plugins: [ "@babel/plugin-transform-modules-commonjs", "@babel/plugin-proposal-class-properties", + "@babel/plugin-proposal-nullish-coalescing-operator", + "@babel/plugin-proposal-optional-chaining", "@babel/plugin-syntax-dynamic-import", ["@babel/plugin-proposal-object-rest-spread", { useBuiltIns: true }], ], diff --git a/docs/public/app/favicon.ico b/docs/public/app/favicon.ico new file mode 100644 index 000000000..9b72dd8e6 Binary files /dev/null and b/docs/public/app/favicon.ico differ diff --git a/docs/public/app/index.html b/docs/public/app/index.html new file mode 120000 index 000000000..b06b78b73 --- /dev/null +++ b/docs/public/app/index.html @@ -0,0 +1 @@ +../../../packages/webviz-core/public/index.html \ No newline at end of file diff --git a/docs/public/index.html b/docs/public/index.html index 0d4c4550d..50b4d08e8 100644 --- a/docs/public/index.html +++ b/docs/public/index.html @@ -9,15 +9,24 @@
+ + + + -WEBVIZ