tldraw/packages
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
..
assets Add heart geo shape (#3787) 2024-05-24 13:04:28 +00:00
dotcom-shared Force interface instead of type for better docs (#3815) 2024-05-22 15:55:49 +00:00
editor Add option for max points per draw shape (#3900) 2024-06-10 08:08:00 +00:00
namespaced-tldraw Don't check api.json files into git (#3565) 2024-04-24 15:58:26 +00:00
state timeouts: rework effectschedule timeout tracking (#3870) 2024-06-04 10:55:22 +00:00
store Snapshots pit of success (#3811) 2024-06-03 15:58:00 +00:00
tldraw Open share menu when navigating from create new shared project button (#3898) 2024-06-10 08:15:55 +00:00
tlschema Snapshots pit of success (#3811) 2024-06-03 15:58:00 +00:00
tlsync [DX] sensible defaults for createTLStore (#3886) 2024-06-05 14:29:54 +00:00
utils security: don't send referrer paths for images and bookmarks (#3881) 2024-06-05 10:52:10 +00:00
validate Force interface instead of type for better docs (#3815) 2024-05-22 15:55:49 +00:00