tldraw/packages
David Sheldrick 29608838ef
Move InFrontOfTheCanvas (#3782)
Our `InFrontOfTheCanvas` UI override component (we don't have a default
implementation, it's just an entry point for sdk users to insert their
own UI) was being mounted outside of the UI react context subtree, which
is an error because it won't have access to important things like
translations and asset URLs. #3750 made this bug manifest as a thrown
error in our `context-toolbar` example, as reported in #3773.

To fix this I just moved the injection site of the `InFrontOfTheCanvas`
component to be within the UI context. It ends up in the same place in
the DOM.

This PR closes #3773 



### Change Type

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

- [x] `sdk` — Changes the tldraw SDK
- [ ] `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 ️ -->

- [x] `bugfix` — Bug fix
- [ ] `feature` — New feature
- [ ] `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. Add a step-by-step description of how to test your PR here.
2.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Add a brief release note for your PR here.
2024-05-21 05:05:59 +00:00
..
assets add missing spline icons (#3778) 2024-05-20 09:28:14 +00:00
dotcom-shared Move storing of snapshots to R2 (#3693) 2024-05-08 09:06:02 +00:00
editor Move InFrontOfTheCanvas (#3782) 2024-05-21 05:05:59 +00:00
namespaced-tldraw Don't check api.json files into git (#3565) 2024-04-24 15:58:26 +00:00
state [signia] perf thing again (#3645) 2024-04-30 13:44:52 +00:00
store focus: rework and untangle existing focus management logic in the sdk (#3718) 2024-05-17 08:53:57 +00:00
tldraw Move InFrontOfTheCanvas (#3782) 2024-05-21 05:05:59 +00:00
tlschema Update READMEs, add form link (#3741) 2024-05-12 20:48:07 +00:00
tlsync delete old todo comment (#3777) 2024-05-20 09:13:52 +00:00
utils assets: rework mime-type detection to be consistent/centralized; add support for webp/webm, apng, avif (#3730) 2024-05-13 08:29:43 +00:00
validate Update READMEs, add form link (#3741) 2024-05-12 20:48:07 +00:00