* Update Introduction
* Update Camera step
* Change link to expectations
Co-authored-by: Josh Gomez <114548659+jgomez720@users.noreply.github.com>
* Set outline for onboarding
* Add Streaming step
* Remove Units step
* Add default kcl script
* Add Code Editor step
* Add Parametric Modeling step
* Add Interactive Numbers step
* Update bracket to use sqrt
* Add Command K step
* Assuage @jessfraz's code itchies
* Add User Menu step
* Add Project Menu step
* Add Export step
* Improve error page to actually show error
* Update the sketch step
* Add Future Work section
* Bring back the bracket code on the final step
* Set up the code to the bracket when starting onboarding
* Fix missing import
* Don't throw away users code if not empty
* Prompt the user if they have content in their file
---------
Co-authored-by: Josh Gomez <114548659+jgomez720@users.noreply.github.com>
* Refactor: rename CADProgram to CameraSystem
* Fix buttonDownInStream always set to 0
This is problematic because the left mouse
button ID is actually 0. If no button is
pressed we should set back to undefined.
* Fix: middle mouse button ID is 1, not 3
* Add "Trackpad Friendly" camera system setting
Signed off by Frank Noirot <frank@kittycad.io>
* Allow camera configs to be lenient on first click
* Move format code button to menu item
by extending CollapsiblePanel to take an optional
menu React element.
Signed-off-by: Frank Noirot <frank@kittycad.io>
* Style tweaks
* Add shortcuts for format and cmd bar to codemirror
* Move convert to variable into code menu
Signed off by Frank Noirot <frank@kittycad.io>
* Add keyboard shortcut to convert to variable
* Remove convert to variable from toolbar
* Refactor: move TextEditor to its own component
* Set a better convertToVar shortcut
* Style and ergonomic polish for convertToVar modal
* Use named constants for shortcuts 😇
* Try yet another keyboard shortcut
* Fix formatting
* remove isShiftDown from app.tsx
---------
Signed-off-by: Frank Noirot <frank@kittycad.io>
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
* Add camera handler config object
Using definitions of camera controls of various
CAD incumbents from Onshape's onboarding.
Signed-off-by: Frank Noirot <frank@kittycad.io>
* Refactor: alphabetize settingsMachine
* Refactor: add descriptions to MouseGuards
* Refactor: don't destructure mousemove event
* Refactor: button down in stream as int, not bool
* Honor current camera control settings
* Add cameraControls to settings
* Refactor: alphabetize settings imports
* Refactor: break out cameraControls to own file
* Fix camera control setting in command bar
* Fix formatting on generated type file
* dont use "as" in App.tsx guards
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Don't use "as" in Stream.tsx
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Don't use "as" in settingsMachine.ts
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Add type to cadPrograms
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Kurt review
---------
Signed-off-by: Frank Noirot <frank@kittycad.io>
Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
* Fix: allow tooltips to overflow code pane
while keeping the same vertical and horizontal
scroll behavior that we've had.
Signed-off-by: Frank Noirot <frank@kittycad.io>
* Style tooltips in light and dark mode
* Fix: properly display autocomplete info as HTML
We were parsing it from md to html, but displaying
the parsed html as a string in the info box.
Signed-off-by: Frank Noirot <frank@kittycad.io>
* Fix z-index of command bar to show over code panel
* Let user set text wrapping in editor
* Style hover tooltips
* Fix failing tests
by not including line wrapping plugin in test mode
---------
Signed-off-by: Frank Noirot <frank@kittycad.io>
* Refactor: let Stream handle control drag status
* Fix: prevent app rerender on mouse move
By not setting the highlight range unless things
actually need to change. Setting the highlight range
still causes an app rerender, though.
Signed-off-by: Frank Noirot <frank@kittycad.io>
---------
Signed-off-by: Frank Noirot <frank@kittycad.io>
* Fix up camera step copy and pane opacity for step
* Fix broken onboarding redirect with double slash
* Fix pane height for web bug from blur filter
I found a bug with browser behavior, at least on Chrome.
If you use `backdrop-filter: blur()` at all, you can't
have any children that overflow. The browser will ignore
any attempt and make those children max full-height.
This broke our side panels after I added blur, but
only in Chrome/browser target.
Signed-off-by: Frank Noirot <frank@kittycad.io>
* Fix bug with unit system
Changing the unit system didn't also change the
base unit in the onboarding anymore. It needed
updated to use XState the same way as `/settings`
Signed-off-by: Frank Noirot <frank@kittycad.io>
* Fix AppHeader item spacing when there's no toolbar
---------
Signed-off-by: Frank Noirot <frank@kittycad.io>
* 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
* Remove scroll handling, honor zoom on drag + ctrl
* Add back ability to zoom with mouse wheel, but properly
* Add TODO for 'any' removal
* Update kittycad lib to remove 'any'
* Light mode style fixes
* Fix dismissing onboarding for nested routes
* Refactor: move export button to user side panel
* Refactor: add project data to modeling page loader
* Add new ProjectSidebarMenu
* Convert AppHeader to use ProjectSidebarMenu
* Move ExportButton to ProjectSidebarMenu
* Fix: hide default dir setting in Web
* Add DownloadAppBanner when in Prod
* Add unit tests to ProjectSidebarMenu
* Tiny CSS rounding tweak to sidebars
* Fix formatting in unit tests
* Update icons and logos to use full-color Kitt
* Fix: dim UI on camera drag, not click
* Bugfix: don't toast on every change of defaultDir
* Refactor app to live under /file/:id
* Stub out Tauri-only home page
* home reads and writes blank files to defaultDir
* Fix initial directory creation
* Make file names editable
* Refactor onboarding to use normal fns for load issues
* Feature: load and write files to and from disk
* Feature: Add file deletion, break out FileCard component
* Fix settings close URLs to be relative, button types
* Add filename and link to AppHeader
* Style tweaks: scrollbar, header name, card size
* Style: add header, empty state to Home
* Refactor: load file in route loader
* Move makePathRelative to lib to fix tests
* Fix App test
* Use '$nnn' default name scheme
* Fix type error on ActionButton
* Fix type error on ActionButton
* @adamchalmers review
* Fix merge mistake
* Refactor: rename all things "file" to "project"
* Feature: migrate to <project-name>/main.kcl setup
* Fix tsc test
* @Irev-Dev review part 1: renames and imports
* @Irev-Dev review pt 2: simplify file list refresh
* @Irev-Dev review pt 3: filter out non-projects
* @Irev-review pt 4: folder conventions + home auth
* Add sort functionality to new welcome page (#255)
* Add todo for Sentry
* Feature: settings auto-save as they are updated
* Refactor: get rid of temporary settings states
* Feature: add escape hotkey to settings
* Style: layout tweaks
* Feature: setting unit system updates base unit too
Right now, if the executor throws a KCLError (e.g. for "variable name is not defined" errors), they aren't being caught by the .catch or the try/catch block in asyncWrap. This PR fixes it.
Co-authored-by: Kurt Hutten Irev-Dev <k.hutten@protonmail.ch>
* working without clean up
* clean up dependencies
* use test not dev
* add tests for kclErrToDiagnostic
* remove jest config
* remove unneeded @ts-ignore
* Basic transparent pane styling
* HTML and static asset cleanup
* Convert to collapsibles
* Polish up DebugPanel
* Add hotkey support, remove allotment
* Remove allotment css dependency
* Merge in from main
* Add a different resizable package
* Fix tsc errors introduced by merge
* Stream has to have at least z-index of 0
* App header has to be above stream z-index
* Applied z-index to the wrong element
* Scrollable logs, disable UI while dragging
* Fix test errors from importing CSS Modules in Jest
* Persist open panes configuration
* Style tweaks and fix camera step in onboarding
* Kurt review, make click-drag handler declarative
* 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
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.
* 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>
* 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