Add sketch tools back to the command bar (#3008)

* Make machine command type names more explicit

* Prepare "change tool" event for command bar

* Make it so that state machine events can each map to multiple command configs

* Make commands with all skippable args possible

* Add back the tools to the command bar

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

* Update to use new `groupId` property name

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

* Oops didn't save this other instance of `ownerMachine`

* Add a playwright test

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
Frank Noirot
2024-07-12 16:16:26 -04:00
committed by GitHub
parent 0710f6e5f2
commit 5a5fe3bb95
25 changed files with 180 additions and 70 deletions

View File

@ -60,7 +60,7 @@ export function Toolbar({
? send('CancelSketch')
: send({
type: 'change tool',
data: 'line',
data: { tool: 'line' },
}),
{ enabled: !disableLineButton, scopes: ['sketch'] }
)
@ -75,7 +75,7 @@ export function Toolbar({
? send('CancelSketch')
: send({
type: 'change tool',
data: 'tangentialArc',
data: { tool: 'tangentialArc' },
}),
{ enabled: !disableTangentialArc, scopes: ['sketch'] }
)
@ -89,7 +89,7 @@ export function Toolbar({
? send('CancelSketch')
: send({
type: 'change tool',
data: 'rectangle',
data: { tool: 'rectangle' },
}),
{ enabled: !disableRectangle, scopes: ['sketch'] }
)
@ -263,7 +263,7 @@ export function Toolbar({
? send('CancelSketch')
: send({
type: 'change tool',
data: 'line',
data: { tool: 'line' },
})
}
aria-pressed={state?.matches('Sketch.Line tool')}
@ -293,7 +293,7 @@ export function Toolbar({
? send('CancelSketch')
: send({
type: 'change tool',
data: 'tangentialArc',
data: { tool: 'tangentialArc' },
})
}
aria-pressed={state.matches('Sketch.Tangential arc to')}
@ -323,7 +323,7 @@ export function Toolbar({
? send('CancelSketch')
: send({
type: 'change tool',
data: 'rectangle',
data: { tool: 'rectangle' },
})
}
aria-pressed={state.matches('Sketch.Rectangle tool')}