tldraw/apps/examples/e2e/tests
Steve Ruiz 60cc0dcce3
Menu updates / fix flip / add export / remove Shape menu (#3115)
This PR:
- adds the export all menu items to the main menu
- removes the export all menu items from the dotcom menus
- removes the shape menu and reverts several changes from
https://github.com/tldraw/tldraw/pull/2782. This was not properly
reviewed (I thought it was a PR about hiding / showing menu items).
- fixes a bug with exporting (exporting JSON was not working when the
user had no selected shapes)
- fixes a bug that would prevent "flip shapes" from appearing in the
menu
- prevents export / copy actions from running if there are no shapes on
the page
- allows export / copy actions to default to all shapes on the page if
no shapes are selected

These changes have not been released in the dotcom yet. There's will be
some thrash in the APIs.

# Menu philosophy

In the menu, the **edit** submenu relates to undo/redo, plus the user's
current selection.

Menu items that relate to specific to certain shapes are hidden when not
available.

Menu items that relate to all shapes are disabled when not available.

<img width="640" alt="image"
src="https://github.com/tldraw/tldraw/assets/23072548/e467e6bb-d958-4a9a-ac19-1dada52dcfa6">

### Change Type

- [x] `major` — Bug fix

### Test

- Select no shapes (arrange / flip should not be visible)
- Select one geo shape (arrange / flip should not be visible)
- Select two geo shapes (arrange / flip should be visible)
- Select one draw shape (arrange / flip should not be visible)

### Release Notes

- Revert some changes in the menu.
2024-03-11 18:31:28 +00:00
..
export-snapshots.spec.ts-snapshots Make sure correct dark mode colours get used in exports (#2492) 2024-01-17 14:31:38 +00:00
fixtures Adding a single E2E test per menu (#2954) 2024-02-29 13:21:10 +00:00
test-canvas-events.spec.ts-snapshots Replace Atom.value with Atom.get() (#2189) 2023-11-13 11:51:22 +00:00
export-snapshots.spec.ts tldraw_final_v6_final(old version).docx.pdf (#2998) 2024-02-29 16:06:19 +00:00
test-actions-menu.spec.ts Adding a single E2E test per menu (#2954) 2024-02-29 13:21:10 +00:00
test-camera.spec.ts Add playwright tests (#1484) 2023-05-30 15:28:56 +01:00
test-canvas-events.spec.ts tldraw_final_v6_final(old version).docx.pdf (#2998) 2024-02-29 16:06:19 +00:00
test-clipboard.spec.ts tldraw_final_v6_final(old version).docx.pdf (#2998) 2024-02-29 16:06:19 +00:00
test-context-menu.spec.ts Adding a single E2E test per menu (#2954) 2024-02-29 13:21:10 +00:00
test-focus.spec.ts tldraw_final_v6_final(old version).docx.pdf (#2998) 2024-02-29 16:06:19 +00:00
test-help-menu.spec.ts Adding a single E2E test per menu (#2954) 2024-02-29 13:21:10 +00:00
test-kbds.spec.ts Menu updates / fix flip / add export / remove Shape menu (#3115) 2024-03-11 18:31:28 +00:00
test-main-menu.spec.ts Adding a single E2E test per menu (#2954) 2024-02-29 13:21:10 +00:00
test-navigation-panel.spec.ts Adding a single E2E test per menu (#2954) 2024-02-29 13:21:10 +00:00
test-page-menu.spec.ts Adding a single E2E test per menu (#2954) 2024-02-29 13:21:10 +00:00
test-routes.spec.ts [fix] Routes check on e2e tests (#3022) 2024-03-02 16:42:07 +00:00
test-shapes.spec.ts E2e tests for the toolbar (#2709) 2024-02-16 14:15:00 +00:00
test-smoke.spec.ts tldraw_final_v6_final(old version).docx.pdf (#2998) 2024-02-29 16:06:19 +00:00
test-style-panel.spec.ts tldraw_final_v6_final(old version).docx.pdf (#2998) 2024-02-29 16:06:19 +00:00
test-text.spec.ts tldraw_final_v6_final(old version).docx.pdf (#2998) 2024-02-29 16:06:19 +00:00
test-toolbar.spec.ts E2E Style Panel Tests (#2878) 2024-02-23 14:37:15 +00:00