* BROKEN: start of scopes for each setting
* Clean up later: mostly-functional scoped settings!
Broken command bar, unimplemented generated settings components
* Working persisted project settings in-folder
* Start working toward automatic commands and settings UI
* Relatively stable, settings-menu-editable
* Settings persistence tweaks after merge
* Custom settings UI working properly, cleaner types
* Allow boolean command types, create Settings UI for them
* Add support for option and string Settings input types
* Proof of concept settings from command bar
* Add all settings to command bar
* Allow settings to be hidden on a level
* Better command titles for settings
* Hide the settings the settings from the commands bar
* Derive command defaultValue from *current* settingsMachine context
* Fix generated settings UI for 'options' type settings
* Pretty settings modal 💅
* Allow for rollback to parent level setting
* fmt
* Fix tsc errors not related to loading from localStorage
* Better setting descriptions, better buttons
* Make displayName searchable in command bar
* Consolidate constants, get working in browser
* Start fixing tests, better types for saved settings payloads
* Fix playwright tests
* Add a test for the settings modal
* Add AtLeast to codespell ignore list
* Goofed merge of codespellrc
* Try fixing linux E2E tests
* Make codespellrc word lowercase
* fmt
* Fix data-testid in Tauri test
* Don't set text settings if nothing changed
* Turn off unimplemented settings
* Allow for multiple "execution-done" messages to have appeared in snapshot tests
* Try fixing up snapshot tests
* Switch from .json to .toml settings file format
* Use a different method for overriding the default units
* Try to force using the new common storage state in snapshot tests
* Update tests to use TOML
* fmt and remove console logs
* Restore units to export
* tsc errors, make snapshot tests use TOML
* Ensure that snapshot tests use the basicStorageState
* Re-organize use of test.use()
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Update snapshots one more time since lighting changed
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Fix broken "Show in folder" for project-level settings
* Fire all relevant actions after settings reset
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Properly reset the default directory
* Hide settings by platform
* Actually honor showDebugPanel
* Unify settings hiding logic
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* fix first extrusion snapshot
* another attempt to fix extrustion snapshot
* Rerun test suite
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* trigger CI
* more extrusion stuff
* Replace resetSettings console log with comment
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
* Bump ts lib
* Make engine background color driven by theme setting
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Force snapshots to dark mode, fix theme init
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Don't assume we have engineCommandManager in CameraControls,
because for some reason it's being loaded before engineConnection in test environments?
* Merge branch 'main' into change-bg-color
* Replace optional chaining with this.engineCommandManager
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Okay now all snapshot tests are actually in dark mode
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* trigger ci
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
* always enter edit mode
* initial blocking of extra code-mirror updates
* dry out code
* rejig selections
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* clean up
* stream clean up
* update export
* sketch mode can be entered and exited for extrude faces
But has bugs
* startSketchOn working in some cases, editsketch animation working but not orientation of instersection plane etc
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)"
This reverts commit 406fca4c55.
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* remove comment
* add sketch on face e2e test
* tweenCamToNegYAxis should respect reduced motion
* initial sketch on face working with test
* remove temporary toolbar button and xState flow
* un-used vars
* snapshot test tweak
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* type tidy up
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)"
This reverts commit c39b8ebf95.
* Revert "A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)"
This reverts commit fecf6f490a.
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* rename
* sketch on sketch on sketch
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* typo
* startSketchOn Endcaps
end works, start is weird still
* clear selections for entity_ids that are not recognised
* fix sketch on end cap of second order extrustion
* tiny clean up
* fix sketch on close segment/face
* clean up 'lastCodeMirrorSelectionUpdatedFromScene'
* add code mode test for sketchOnExtrudedFace
* make end cap selection more robust
* update js artifacts for extrudes
* update kcl docs
* clean up
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Add new exportFile icon
* Isolate exportFromEngine command
* Naive initial export command
* Update types to accept functions for arg defaultValue, required, and options
* Make existing helper functions and configs work with new types
* Make UI components work with new types
support resolving function values and conditional logic
* Add full export command to command bar
* Replace ExportButton with thin wrapper on cmd bar command
* fmt
* Fix stale tests and bugs found by good tests
* fmt
* Update src/components/CommandBar/CommandArgOptionInput.tsx
* Update snapshot tests and onboarding wording
* Move the panel open click into doExport
* Don't need to input storage step in export tests anymore
* Remove console logs, fmt, select options if we need to
* Increase test timeout
---------
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* pull out network indicator logic
* rename callbacks
* re-execute on reconnection
* make sure tool bar is disabled on start up
* clean up
* node safety
* disable toolbar buttons properly
* grey scale action icon icons dodgy
* test tweaks
* Revert "grey scale action icon icons dodgy"
This reverts commit c3d12a0f05.
* Disable modeling commands when network is bad (#1486)
* Disable modeling commands when network is bad
* disabel on execute too
* fmt
---------
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
* disable playwright snapshots temporarily
* disable export test instead
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
---------
Co-authored-by: Frank Noirot <frank@zoo.dev>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* solve a couple of scene scale bugs
* Some cam fixes (#1520)
* rotate and zoom basics working
* intergrate mouse guards, and add pan
* implement orthographic camera again
* implement switch to perspective camera again
* migrate dollyzoom
* make pan robust for differnt FOV and orthographic cam
* tween to quaternion and default plane selection working with quirks
* fix pan
It the up and right was derived from the camera's up, which is a static [0,0,1] not the camera's current cameras real up, which aligns itself as best to [0,0,1] but is not that especially when looking straight up or down, and the pan felt very awkward in these vertical look sintuations
* fix raycastRing to use new camera
* fix tween to quaternion for camera lock situations
And get all playwright tests passing
* fix up CamToggle, even thought this component is not setup properly to use react properties from our scene class
* add animation to cameras back in
* first big clean up of sceneInfra
* move more cam stuff out of sceneInfra
* clean up mouse guard logic
* clean up camera change callbacks
* fix some sitations where animation to xy doesn't work great
* needs to take the target into consideration
* last bits of clean up
* more clean up
* make vitest happ
* fix up remaining interaction guards
* make scrolling less sensative for trackpads
* remove debug cube
* fix snapshot tests
* test that fails for when to enable extrude and sketch features
* add fix to make test pass
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Rename GlobalStateContext to SettingsAuthContext
* Naive initial impl of settings persistence to file system
* Update app identifier in tauri config
* Add "show in folder" tauri command
* Load from and save to file system in Tauri app
* Add documents drive to tauri permission scope
* Add recursive prop to default dir selection dialog
* Add success toast to web restore defaults action
* Add a way to validate read-in settings
* Update imports to use separate settings lib file
* Validate localStorage-loaded settings, combine error message
* Add a e2e test for validation
* Clean up state state bugs
* Reverse validation looping so new users don't error
* update settingsMachine typegen to remove conflicts
* Fmt
* Fix TS errors
* rename for clarity
* typo
* make coverage happ+
somewhat pointless since we don't use coverage because its not complete with both vitest and playwright
* local storage issue
* fmt
* fix
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* updates
Signed-off-by: Jess Frazelle <github@jessfraz.com>
* make tsc happ
* better error msg
* fix control point issue
* basic code gen working for tangentialArc
* partical fix for move with arcs
* tangential arc move
* fix
* make eslint rules less annoying
* inital refactor of some xstate stuff
* more old tangential arc clean up stuff
* more tweaks
* add testing
* tweak xstate inspect
* temp remove test
* update formating for less conflicts
* fix state machine layout after merge
* shrug, something weird with xstate typegen
* renaming some xstate events
* tweak numbers to make CI playwright happ
* CI hacks
* more CI hacks
* more CI hacks
* new hack strategy
* run tests agian
* make cmd bar less flaky
* ci hacks
* CI hacks
* CI hacks
* CI hacks
* clean up
* fix
* still have constraint stuff to deal with
* progress on move rules
* update source ranges after no execute code-mod
* typo
* mvp working
* hide show sketch overlay
* match scaling
* update arrow head style
* animate line tool
* bypass xstate for animations, much smoother
* add new segment working with refactor needed for setup paper sketch
* refactor setup paper sketch
* tangantialArcTo drag animations working
* tangential arc polish
* cargo fmt
* clippy
* more clippy
* mock canvas
* last of clippy?
* typo
* more clippy stuff
* move util function so they are shareable with typescript
* migrate a bunch to rust and only rust
* add arc center point for draft tangential ac
* clippy tweak
* delete uneeded test
* Rough start to scaling arrow heads.
The tangent arrow heads are basically nuked and replaced while the
straight line sections are just rotated and repositioned, this means they
miss out on updating scaling number after a screen size changes.
Needs fixing
* fix bug with tool tips
* fix draft line start position
Having drag the end of teh path before selecting a tooltip would result in the draft line starting where the path used to end, stale data
* some progress with pan maybe
* fmt
* inital camera sync working
For perspective camera at least
* change three.js to use z-up
* add grid
* orthographic camera working with polish items TODO
* fix zoom level when swapping camera
* fix up camera/orbit changing on cam change (pan wasn't being respected)
* tidy up
* use orbit target instead of assuming scene center
* dynamic fov working
* animate orthographic to perspective and reverse
* fix import
* temp fix for batch commands
* initial client side scene sketch working
* remove hover log
* FOV adjust fix
* fix comment
* tear down sketch and small tweaks
* some progress with camera tweening
* combine dollyZoom engine commands
see
https://github.com/KittyCAD/modeling-api/compare/kurt-perspective-settings?expand=1
and
https://github.com/KittyCAD/engine/compare/kurt-perspective-settings?expand=1
* make tests happy (mocks)
* fix tween to vertical/camera-up bug
* tween to each axis with hacky solutions in there
* fix startSketchOn planes
* tidy startSketchOn
* tweening okay for now I think
* get sketching on default planes working
* allow editing on all default planes
* clean up enter and exit sketch logic
* tidy
* tidy
* remove more default plane stuff
* start of draft line
* remove some annoying parts of the paper.js implementation
* fix drag than equip line bug
* comment
* don't animate on skech tear down since it's used for draft line
* remove more default plane shit
* style draft line
* refine dashed line
* draft line set up and tear down mostly happy
* add on click logic ready for draft lines
* sketch mode with drag and draft mode working solidly now, straight segments only
* default planes match colors, hover and select still TODO
* hover and click logic working for default planes
Now just need the code mode to fire to 'startSketchOn(...)'
* select default planes
* remove some logs
* fix update infinite loop
* start of orbitControls port to Franks control guards
* hiding scenes at different times
* scene hide on camera move should be respected by scroll zoom
* basic hover working
* Hook up user camera settings to ClientSideScene (#1334)
* Refactor to not import utilities from Router.tsx
* Stop tracking changes or formatting *.typegen.ts
* Hook up cameraControls to ClientSideScene
* Remove camera controls toggle from temp debug panel
---------
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
* add select segment moves cursor
* highlight segments yellow on hover
* cursor ranges effect 2d line colors
* fix constrainst i.e. make sure the sketch is rejiged
* selecting nothing should remove selections
* remove hardcoded strings
* update get_tangential_arc_to_info rust util
* initial drawing of tangential arcs in client scene
* fix tangentialArc arrow head direction
* correct userData types for tangential arcs
* get tangential arc updates working
Doesn't include draging the head of the tangential arc itself yet
* spot of clean up
* make selections work with tangential arcs
* get draft tangential segment animated
* fix initial click weirdness for adding new tangential line
* couple tweaks
* add grace pixels /threshold to raycast
* redo arc dashes so that they spawn from the ccenter of the arc
* fix multi drag bug
* fmt
* add temp solution for close
* add default axis hover colors, still needs select logic
* selection of axis works, just with out selection color
* get axis selection colors working
* fix outdate source ranges after drag problem
* update moreNodePathFromSourceRange
* fix ts-rs issue/workaround
* fix default plane weirdness
* fix tangential arc rounding issue
* review clean up part 1
* review clean up part 2
Big state-diagram cull
* clippy
* typo
* clippy
* fix xstate types with typegen
* fix types
* clippy
* catch error
* fix test import issue
Not sure exactly what was happening but guessing circular import that vite didn't like
* add axis/plane info to sketch group tests
* case changes because of rs-ts bug, can probably revert this later
* start of playwright test fixes
* reduce geo complexity for straight segments
* fix cam adjust tests
* Revert "Clean up vite build warnings (#1332)"
This reverts commit c1f661ab52.
* selection e2e test fixed<
* remove camToggle to allow playwright tests to pass
* remove drag test
too brittle and needs to be redone from the ground up anyway
* trigger CI
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* fix last test
* clean up part 3
* clean up part 4
* clean up part 5
* clean up sketch enter exit logic
* fix engine side selections
* default plane should not be selected form 'onDragEnd'
i.e. rotating the camera should not mean the user acidently selects a plane
* clean up state diagram around animating to sketch mode
Embracing that the animation is async and puting the interdiate steps in the state diagram clean up some logic and solved some bugs at the same time
* add test for multiple sketches
* typo
* make highlight more robust
* type tweak
* scale segmenst with distance from camera so they have a consistent pixel size/ screenspace size
* Jess's advice
* tsc and fmt
* clean up part 6
remove integer from xstate names
* clean up part 7
* integrate sequency in to camera moves
* fix tests
* update snapshot e2e
* small snapshot change
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* trigger ci
* Fix HomeLoaderData types
* update std stuff
* update kittycad rs client lib
---------
Signed-off-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: Jess Frazelle <github@jessfraz.com>
Co-authored-by: Frank Noirot <frank@kittycad.io>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Tweak toaster look and feel
* Add icons, tweak plus icon names
* Rename commandBarMeta to commandBarConfig
* Refactor command bar, add support for icons
* Create a tailwind plugin for aria-pressed button state
* Remove overlay from behind command bar
* Clean up toolbar
* Button and other style tweaks
* Icon tweaks follow-up: make old icons work with new sizing
* Delete unused static icons
* More CSS tweaks
* Small CSS tweak to project sidebar
* Add command bar E2E test
* fumpt
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* fix typo in a comment
* Fix icon padding (built version only)
* Update onboarding and warning banner icons padding
* Misc minor style fixes
* Get Extrude opening and canceling from command bar
* Iconography tweaks
* Get extrude kind of working
* Refactor command bar config types and organization
* Move command bar configs to be co-located with each other
* Start building a state machine for the command bar
* Start converting command bar to state machine
* Add support for multiple args, confirmation step
* Submission behavior, hotkeys, code organization
* Add new test for extruding from command bar
* Polish step back and selection hotkeys, CSS tweaks
* Loading style tweaks
* Validate selection inputs, polish UX of args re-editing
* Prevent submission with multiple selection on singlular arg
* Remove stray console logs
* Tweak test, CSS nit, remove extrude "result" argument
* Fix linting warnings
* Show Ctrl+/ instead of ⌘K on all platforms but Mac
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Add "Enter sketch" to command bar
* fix command bar test
* Fix flaky cmd bar extrude test by waiting for engine select response
* Cover both button labels '⌘K' and 'Ctrl+/' in test
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* update select logic for axis
* add abs Y and X constraints
* make selection tests much more thorough including axis selections
* fmt
* tweak
* tweak
* add snap to XY constraints
* side just for screenshot diffs
* update angle constraint to allow axis seleciton
* fix bux in absY constraint
* add sorting to constraintns
* add issue to TODO
* Revert "side just for screenshot diffs"
This reverts commit aae7874859.
* fix number because something must have updated in the engine
* typo
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* Revert "add sorting to constraintns"
This reverts commit 36054a4069.
* A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu)
* triggre CI
---------
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Fix Github Actions 'annotations' in PRs
Fixes#383
* Fix the React Hooks complains, and _app for rust
* Revert "Fix the React Hooks complains, and _app for rust"
This reverts commit 4a2ff925e5.
* Add back prettier fix and rust _app
* Fmt
* More annotation fixes
* More non-hooks fixes
* Rollback with eslint rule
* Add APPLE_TEAM_ID secret
* Revert "Add APPLE_TEAM_ID secret"
This reverts commit 346aaff5f4.
* More fixes
* migrate selection types
* extract selection event into selections.ts
* move code-mirror selection functions into selections.ts
* move more selection logit out of code mirror and engine connection
* add selection functions pure
* tidy up naming
* write a novel about how selections work
* final comments
* nuke fixIdMappings
* update readme
* remove sourceRangeMap as it was redundant
repeated state already covered by the artifactMap
* bug fix, name conflict
* bug fix
* update artifact map when sketch is first created
* update artifact map for line generation too
* fmt
* update move state to allow selections
* allow for selection of vertices
some what hacky, but better than nothing
* unnecessary react hook dependency
* generic react linting
* move working for non-execute case
* block partial contrained things too for now