tldraw/apps/dotcom/src/components
Taha 4dab25be57
Open share menu when navigating from create new shared project button (#3898)
This PR ensures that the share menu is open when navigating from the
create new shared project button.

This could be achieved by calling ```editor.addOpenMenu('share-menu')```
after ```navigate('/new')``` , but that opens the menu on the local
editor first so you get a flash of that before the multiplayer editor
loads.

Instead I've used the state prop on the Navigate component/function to
pass a property called shouldOpenShareMenu.

If the user presses the back button to return to the local editor
instance then the open state of the share menu is preserved, which is
actually something we don't want in this case. Not sure how to deal with
that without adding a ton more complexity, is it worth it?

### Change Type

<!--  Please select a 'Scope' label ️ -->

- [ ] `sdk` — Changes the tldraw SDK
- [x] `dotcom` — Changes the tldraw.com web app
- [ ] `docs` — Changes to the documentation, examples, or templates.
- [ ] `vs code` — Changes to the vscode plugin
- [ ] `internal` — Does not affect user-facing stuff

<!--  Please select a 'Type' label ️ -->

- [ ] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [x] `improvement` — Improving existing features
- [ ] `chore` — Updating dependencies, other boring stuff
- [ ] `galaxy brain` — Architectural changes
- [ ] `tests` — Changes to any test code
- [ ] `tools` — Changes to infrastructure, CI, internal scripts,
debugging tools, etc.
- [ ] `dunno` — I don't know


### Test Plan

1. Click create new shared project from the file menu
2. Share menu should open after navigating to the new room

### Release Notes

- Open share menu when navigating from the create new shared project
button.

---------

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2024-06-10 08:15:55 +00:00
..
BoardHistoryLog unbrivate, dot com in (#2475) 2024-01-16 14:38:05 +00:00
BoardHistorySnapshot Snapshots pit of success (#3811) 2024-06-03 15:58:00 +00:00
DefaultErrorFallback tldraw_final_v6_final(old version).docx.pdf (#2998) 2024-02-29 16:06:19 +00:00
DocumentName share: make share/fork/copy actions clearer (#3846) 2024-06-03 08:42:08 +00:00
ErrorPage Allow clients to gracefully handle rejection (#3673) 2024-05-02 13:54:21 +00:00
Head unbrivate, dot com in (#2475) 2024-01-16 14:38:05 +00:00
PeopleMenu focus: rework and untangle existing focus management logic in the sdk (#3718) 2024-05-17 08:53:57 +00:00
ThemeUpdater tldraw_final_v6_final(old version).docx.pdf (#2998) 2024-02-29 16:06:19 +00:00
CursorChatBubble.tsx focus: rework and untangle existing focus management logic in the sdk (#3718) 2024-05-17 08:53:57 +00:00
ExportMenu.tsx tldraw_final_v6_final(old version).docx.pdf (#2998) 2024-02-29 16:06:19 +00:00
FileMenu.tsx Add option to navigate to new project from file menu (#3876) 2024-06-05 16:58:05 +00:00
IFrameProtector.tsx touchscreen: just create a new room (#3802) 2024-05-21 21:42:11 +00:00
Links.tsx tldraw_final_v6_final(old version).docx.pdf (#2998) 2024-02-29 16:06:19 +00:00
LocalEditor.tsx focus: rework and untangle existing focus management logic in the sdk (#3718) 2024-05-17 08:53:57 +00:00
MultiplayerEditor.tsx focus: rework and untangle existing focus management logic in the sdk (#3718) 2024-05-17 08:53:57 +00:00
ShareButton.tsx tldraw_final_v6_final(old version).docx.pdf (#2998) 2024-02-29 16:06:19 +00:00
ShareMenu.tsx Open share menu when navigating from create new shared project button (#3898) 2024-06-10 08:15:55 +00:00
SnapshotsEditor.tsx Force interface instead of type for better docs (#3815) 2024-05-22 15:55:49 +00:00
SneakyOnDropOverride.ts ui: make toasts look more toasty (#2988) 2024-03-27 09:41:13 +00:00
StoreErrorScreen.tsx delete stray error screen css import (#3683) 2024-05-02 14:53:40 +00:00