Guptaarnav 2024 10 28 (#4341)

* accessing toast error correctly

* wrapping try-catch around fs.stat on cli arg

* implemented array push

* changing arg execution order for sketch arc

* addressing sketchFromKclValue error for Sketches in Uservals

* addressing 'update to He inside a test not wrapped in act(...' error

* yarn fmt fix

* implemented polygon stdlib function

* changing polygon inscribed arg description in docs

* addressing cargo clippy warning

* Add tangential arc unavailable reason tooltip

* fixing tsc errors

* preventing hidden dirs from showing up as projects and prohibits renaming projects as hidden

* adding unit test for desktop listProjects

* showing no completions when last typed word is a number

* fmt

* Make clippy happy

* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)

* yarn tsc fix: added missing toast import in Home.tsx

* A snapshot a day keeps the bugs away! 📷🐛 (OS: windows-latest)

* regenerating markdown docs for incoming merge from main

---------

Co-authored-by: arnav <arnav@agupta.org>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
49fl
2024-10-28 20:52:51 -04:00
committed by GitHub
parent 81279aa4e8
commit 7103ded32a
28 changed files with 17111 additions and 27 deletions

View File

@ -39,6 +39,9 @@ export type ToolbarItem = {
description: string
links: { label: string; url: string }[]
isActive?: (state: StateFrom<typeof modelingMachine>) => boolean
disabledReason?:
| string
| ((state: StateFrom<typeof modelingMachine>) => string | undefined)
}
export type ToolbarItemResolved = Omit<
@ -349,6 +352,11 @@ export const toolbarConfig: Record<ToolbarModeName, ToolbarMode> = {
(!isEditingExistingSketch(state.context) &&
!state.matches({ Sketch: 'Tangential arc to' })) ||
pipeHasCircle(state.context),
disabledReason: (state) =>
!isEditingExistingSketch(state.context) &&
!state.matches({ Sketch: 'Tangential arc to' })
? "Cannot start a tangential arc because there's no previous line to be tangential to. Try drawing a line first or selecting an existing sketch to edit."
: undefined,
title: 'Tangential Arc',
hotkey: (state) =>
state.matches({ Sketch: 'Tangential arc to' }) ? ['Esc', 'A'] : 'A',