Commit Graph

191 Commits

Author SHA1 Message Date
c80dd44c59 Kurt pet issue (#216)
* use key names vars

* tweaks
2023-08-03 07:28:06 +10:00
c190122240 Add trickle_ice back (#220)
* Add trickle_ice back

* Only select from relay when provided ice servers

* Format

---------

Co-authored-by: Adam Chalmers <adam.s.chalmers@gmail.com>
2023-08-02 17:27:14 -04:00
36ea343860 fix sdp (#219)
Signed-off-by: Jess Frazelle <github@jessfraz.com>
2023-08-02 12:56:14 -07:00
1962af760c snake case fix (#221) 2023-08-03 05:51:52 +10:00
8be7805ac2 Log the Websocket events (#218) 2023-08-02 13:51:05 -05:00
64772f5c98 remove old types (#215) 2023-08-02 18:46:40 +10:00
5419039fae add client lib @kittycad/lib (#214)
* add client lib

* tsc after build

* update after spec update

* remove uneeded check

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fixes

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* fix camera drag

* fix throttle typing

* comment with link to issue

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: Jess Frazelle <github@jessfraz.com>
2023-08-02 15:41:59 +10:00
aabb88ee45 Add tests for various user profile setups to sidebar (#212)
* Add tests for various user profile setups to sidebar

* Don't show empty user image if it isn't there

* @adamchalmer review
2023-08-01 13:23:17 -04:00
7408ba50dd Fix 'cannot read property of undefined' (#211)
If a token is undefined, we should not read its source range!
2023-08-01 10:22:51 -05:00
7181ff0c33 Configurable URL for the API (#205)
* Configurable engine URL

Fixes #206

* fix import.meta problem (#210)

---------

Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
2023-08-01 09:36:40 -05:00
7ae1b66855 Fix style gaps in dark mode + sidebar updates (#208) 2023-07-31 12:08:16 -04:00
c31f1ad98b Add dark mode (#199)
* Add passive dark mode to everything but codemirror

* Add dark theme support for Codemirror

* Make theme a user setting

* Fix button text size

* guard against undefined window

* Formatting and test fix
2023-07-31 20:33:10 +10:00
894bddb369 Add user menu sidebar (#195) 2023-07-27 18:59:40 -04:00
94918ccb2e Tweak prettier (#201)
I don't think the wildcards and the {}s were being expanded as expected
in the 'scripts' section of package.json.

Also, I think the .prettierignore file is sufficient to ensure we only format
TS/JS/JSX code.
2023-07-27 12:49:53 -05:00
be7605cdef Git pre-push hook to check formatting (#200)
Add formatting check to Git pre-push hook
2023-07-27 12:13:51 -05:00
aca9b9226c Reset KCL logs (#198) 2023-07-26 18:16:20 -05:00
7312035818 Allow Prettier to format JS generated in wasm projects (#196)
Right now I'm getting ESLint errors because wasm-lib generates a JS project with semicolons.
This didn't use to matter, because `yarn prettier` applied to the Rust projects too. But
in my recent PR https://github.com/KittyCAD/untitled-lang/pull/192 I broke that.

This should fix it by ensuring the generated JS code gets formatted in a way that matches
our ESLint requirements.
2023-07-26 14:45:09 -05:00
956e4c46c1 Jest GitHub Action annotation (#194)
Jest now supports a reporter which emits GitHub Actions annotations. So if a test fails, it should annotate your PR when you view it on GitHub. See their example at https://jestjs.io/docs/configuration#github-actions-reporter

Also, use typescript for the config file.
2023-07-26 14:44:54 -05:00
0d010b60e5 Collect structured errors from parsing/executing KCL (#187)
Currently, syntax/semantic errors in the user's source code result in vanilla JS exceptions being thrown, so they show up in the console. Instead, this PR:

- Adds a new type KCLError
- KCL syntax/semantic errors when parsing/executing the source code now throw KCLErrors instead of vanilla JS exceptions.
- KCL errors are caught and logged to a new "Errors" panel, instead of the browser console.
2023-07-26 14:10:30 -05:00
6838e96723 Run yarn prettier, check it in CI (#192) 2023-07-26 11:47:18 -05:00
c2210835ea Fix use of useDismiss in onboarding (#191) 2023-07-25 11:16:52 -04:00
d1e7cb23a1 Tweak default value for onboardingStatus (#190) 2023-07-25 10:51:34 -04:00
9cd3845975 Franknoirot/add walkthrough (#189)
* Barebones onboarding triggering and resetting

* Make onboarding route-based

* Add Camera step, highlighting camera feed

* Implement redirect behavior

* Unify navigation hooks

* Formatting

* add useResizeObserver, convert to custom hook
2023-07-25 10:40:26 -04:00
ca2634d523 Adjust config to open localhost (#188) 2023-07-24 17:26:26 -04:00
48f1d5e623 Add unit setting (#183)
* Add Toggle component

* Add default units to settings

* Add defaultBaseUnit, shorten settings names

* Make debug panel use Toggle, fix colors

* add eslint-plugin-css-modules
2023-07-21 12:48:23 -04:00
87aecf7f50 Integrate sketch mode debug (#186)
integrate sketch mode debug
2023-07-21 16:53:06 +10:00
b89faa4a28 Migrate from CRA to Vite (#170)
* Basic CRA to Vite conversion

* Restore ESLint support

* Remove semicolons from vite config

* Add vite client types to tsconfig

* Migrate to Vitest for testing (not working on Mac)

* some test progress (#175)

* some test progress

* something maybe working

* remove local lib

* small clean up

* tweaks

* fix dependency

* clean up deps

* remove vitest import

* vitest config is needed even though we're not using vitest

* more tweaks to vite config

---------

Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
2023-07-21 09:25:04 +10:00
1666e17ca5 Add support for camera Pan (#182) 2023-07-20 14:08:32 -04:00
5d90c0488f port recast to rust 🦀 (#178)
* port recast to rust with massaged serialisation

* remove logs

* fix the last of white space test failures

* remove ts recastor

* clean up imports

* use serde serialise features

* unneeded async

* final clean up recast.ts

* more clean up tweaks

* improve Rust BinaryPart types

* Comments, fix warnings

* Run clippy --fix

* Remove unused variable

* serialise none_code_nodes manual to force strings to numbers

---------

Co-authored-by: Adam Chalmers <adam.s.chalmers@gmail.com>
2023-07-20 12:38:05 +10:00
11cc85a9e8 remove wrtc, can be mocked for tests (#180) 2023-07-20 11:41:05 +10:00
3383becc0f New auth with tauri (#177)
* new auth command

Signed-off-by: Jess Frazelle <github@jessfraz.com>

* updates

Signed-off-by: Jess Frazelle <github@jessfraz.com>

---------

Signed-off-by: Jess Frazelle <github@jessfraz.com>
2023-07-13 19:05:56 -07:00
4c65d5b2ef Update App icon and name (#172)
* New "peeking Kitt" icons and favicon

* Change app name within Tauri
2023-07-13 07:23:11 -04:00
59fa51d75a Add settings UI page (#171)
* Add theme colors from Figma

* Rough-in of AppHeader

* Add styled ActionButton

* Add react-router and placeholder Settings page

* Add ability to set persistent defaultDir

* Add react-hot-toast for save success message

* Add defaultProjectName setting

* Handle case of stale empty defaultDir in storage

* Wrap app in BrowserRouter

* Wrap test App in BrowserRouter

* Don't need BrowserRouter outside of testing
because we use RouterProvider
2023-07-13 07:22:08 -04:00
3fc4d71a1e move ast types into seperate ts file (#169) 2023-07-13 16:57:22 +10:00
317dc6d0b2 rough tauri auth (#167) 2023-07-11 20:34:09 +10:00
4f8fe2d155 fix id typo (#165) 2023-07-11 15:13:15 +10:00
cda301997e Get tests passing without engine connection (#155)
We can create a enginelessExecutor that can be used for many of the
executor tests that will be much more performant for tests that don't
need the engine to actually do any modeling work.
2023-07-10 15:15:07 +10:00
a70399bacf onmouse leave (#148) 2023-06-29 20:11:51 +10:00
3510abfcb9 delay execute till after stream ready (#143) 2023-06-23 14:19:15 +10:00
fb3c34d5f3 send sequence with UDP packets (#140) 2023-06-23 10:54:19 +10:00
7289965916 send mouse drag over wrtc (#139)
* send mouse drag over wrtc

* add more debugging code

* wrtc data channel working
2023-06-23 09:56:37 +10:00
2d3c73d46a asyncronise executor (#115)
* Intital async of executor

The execture now sends websocket message instead of calling functions
directly from the engine, When it does so it holds onto the id.
The engine is still returning geo/polys directly but I'm working make it
so that the UI doesn't need to know about that, so that we can switch
over the streaming ui.

Things left to do:
- it is still making both direct function calls and websockets, and the former should be removed.
- It does highlighting of segments and sourceRanges not through websockets and that needs to be fixed.
- Tests have not been adjusted for these changes.
- Selecting the head of a segment is not working correctly again yet.

* Rough engine prep changes (#135)

* rough changes for engine prep

* mouse movements working again

* connect to engine for startsketch, line, close and extrude
2023-06-22 16:43:33 +10:00
dd3117cf03 Steal Jess's mouse move code (#137)
steal Jess's mouse move code
2023-06-21 09:15:02 +10:00
efa3bc7ac6 Use trickle ICE (#136)
* Try trickle ice setup

* Fix typo

* Append auth to api.dev too
2023-06-20 16:51:12 -04:00
0858d32c1e more tauri stuff (#128) 2023-06-19 10:16:45 +10:00
e7c1554129 Mute stream by default for autoplay (#127) 2023-06-15 09:16:14 -04:00
6eaa0e0852 get release to work (#124)
* get release to work

* update skip-sign

* new strategy to avoid signing

* fix

* fix

* get ubuntu build working

* fix

* fix

* fix
v0.0.2
2023-06-08 09:52:57 +10:00
1861bb94bb Tauri setup main (#122)
* initial tauri port

* tweak build worflow
v0.0.1
2023-06-07 17:45:13 +10:00
fbee151264 Update Stream to use modeling ws (#117) 2023-05-26 17:32:31 -04:00
1fb7524da9 angled line length (#114) 2023-04-21 12:18:20 +10:00