Frank Noirot 32d928ae0c Franknoirot/cmd bar (#328)
* Add XState and naive ActionBar

* Add basic dialog and combobox

* Selectable commands in command bar

* Add a few (broken) file actions

* Home commands

* Add subcommand descriptions, cleanup on navigate

* Refactor: move command creation and types to lib

* Refactor to allow any machine to add commands

* Add auth to command bar, add ability to hide cmds

* Refactor: consolidate theme utilities

* Add settings as machine and command set

* Fix: type tweaks

* Fix: only allow auth to navigate from signin

* Remove zustand-powered settings

* Fix: remove zustand settings from App

* Fix: browser infinite redirect

* Feature: allow commands to be hidden per-platform

* Fix: tsc errors

* Fix: hide default project directory from cmd bar

* Polish: transitions, css tweaks

* Feature: label current value in options settings

* Fix broken debug panel UI

* Refactor: move settings toasts to actions

* Tweak: css rounding

* Fix: set default directory recursion and reload 🐞

* Refactor: move machines to their own directory

* Fix formatting

* @Irev-Dev clean-up catches, import cleanup
2023-08-29 10:31:49 +10:00
2023-08-25 13:41:04 -07:00
2022-11-12 13:11:54 +11:00
2023-08-29 10:31:49 +10:00
2023-08-29 10:31:49 +10:00
2023-08-24 15:34:51 -07:00
2023-07-21 12:48:23 -04:00
2023-08-01 09:36:40 -05:00
2022-11-12 13:11:54 +11:00
2023-08-25 11:09:36 -07:00
2023-08-29 10:31:49 +10:00
2022-11-22 09:06:08 +11:00
2023-08-17 20:50:19 +10:00
2022-11-12 13:11:54 +11:00
2023-08-29 10:31:49 +10:00
2023-08-24 15:34:51 -07:00
2023-08-08 10:50:27 +10:00
2023-08-29 10:31:49 +10:00

Kurt demo project

live at app.kittycad.io

Not sure what to call this, it's both a language/interpreter and a UI that uses the language as the source of truth model the user build with direct-manipulation with the UI.

It might make sense to split this repo up at some point, but not the lang and the UI are all togther in a react app

Originally Presented on 10/01/2023

Video

demo-slides.pdf

To run, there are a couple steps since we're compiling rust to WASM, you'll need to have rust stuff installed, then

yarn install

then

yarn build:wasm

That will build the WASM binary and put in the public dir (though gitignored)

finally

yarn start

and yarn test you would have need to have built the WASM previously. The tests need to download the binary from a server, so if you've already got yarn start running, that will work, otherwise running

yarn simpleserver

in one terminal and

yarn test

in another.

If you want to edit the rust files, you can cd into src/wasm-lib and then use the usual rust commands, cargo build, cargo test, when you want to bring the changes back to the web-app, a fresh yarn build:wasm in the root will be needed.

Worth noting that the integration of the WASM into this project is very hacky because I'm really pushing create-react-app further than what's practical, but focusing on features atm rather than the setup.

Developing in Chrome

Chrome is in the process of rolling out a new default which blocks Third-Party Cookies. If you're having trouble logging into the modeling-app, you may need to enable third-party cookies. You can enable third-party cookies by clicking on the eye with a slash through it in the URL bar, and clicking on "Enable Third-Party Cookies".

Tauri

To spin up up tauri dev, yarn install and yarn build:wasm need to have been done before hand then

yarn tauri dev

Will spin up the web app before opening up the tauri dev desktop app. Note that it's probably a good idea to close the browser tab that gets opened since at the time of writting they can conflict.

The dev instance automatically opens up the browser devtools which can be disabled by commenting it out

To build, run yarn tauri build, or yarn tauri build --debug to keep access to the devtools.

Note that these became separate apps on Macos, so make sure you open the right one after a build 😉 image

image image (1)

Release a new version

  1. Bump the versions in the .json files by creating a Bump to v{x}.{y}.{z} PR, committing the changes from
VERSION=x.y.z yarn run bump-jsons

The PR may serve as a place to discuss the human-readable changelog and extra QA.

  1. Merge the PR

  2. Create a new release and tag pointing to the bump version commit using semantic versioning v{x}.{y}.{z}

  3. A new Action kicks in at https://github.com/KittyCAD/modeling-app/actions, uploading artifacts to the release

Description
Languages
TypeScript 64.3%
Rust 34.8%
CSS 0.4%
Python 0.1%
JavaScript 0.1%