[improvement] quick actions (#1922)
This PR: - improves the quick actions bar, enabling undo / redo actions when the eraser is selected. - for actions that effect selected shapes, calling the action when the select tool is not selected will select the select tool and run the action - actions that effect selected shapes are hidden from the menu when the select tool is not selected ### Change Type - [x] `major` ### Test Plan 1. Select the eraser tool, the undo / redo buttons should still be there. 1. Select two shapes 2. Select the draw tool 3. The menu should not display most options, e.g. cut or paste, but should display undo / redo 4. Press Shift+H 5. The shapes should not move, but the select tool should be selected again ### Release Notes - Improve the menu / kbds behavior when select tool is not active
This commit is contained in:
parent
386a2396d1
commit
b6ebe1e274
9 changed files with 387 additions and 251 deletions
|
@ -97,6 +97,7 @@ test.describe('Shape Tools', () => {
|
|||
})
|
||||
|
||||
test('creates shapes clickable tools', async () => {
|
||||
await page.keyboard.press('v')
|
||||
await page.keyboard.press('Control+a')
|
||||
await page.keyboard.press('Backspace')
|
||||
expect(await getAllShapeTypes(page)).toEqual([])
|
||||
|
@ -124,6 +125,7 @@ test.describe('Shape Tools', () => {
|
|||
|
||||
// Reset for next time
|
||||
await page.mouse.click(0, 0) // to ensure we're not focused
|
||||
await page.keyboard.press('v') // go to the select tool
|
||||
await page.keyboard.press('Control+a')
|
||||
await page.keyboard.press('Backspace')
|
||||
}
|
||||
|
@ -162,6 +164,7 @@ test.describe('Shape Tools', () => {
|
|||
|
||||
// Reset for next time
|
||||
await page.mouse.click(0, 0) // to ensure we're not focused
|
||||
await page.keyboard.press('v')
|
||||
await page.keyboard.press('Control+a')
|
||||
await page.keyboard.press('Backspace')
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue