-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Context toolbar demo is broken #3773
Labels
bug
Something isn't working
Comments
Thanks for the report! 🙇🏼 I added a fix for it in #3782 |
github-merge-queue bot
pushed a commit
that referenced
this issue
May 21, 2024
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What happened?
When adding a square to canvas got this error:
https://examples.tldraw.com/context-toolbar
Expected: no error, the context toolbar appears
How can we reproduce the bug?
Open https://examples.tldraw.com/context-toolbar
Add a square to the page
What browsers are you seeing the problem on?
Microsoft Edge
Contact Details
IsaacHatton@outlook.com
Code of Conduct
The text was updated successfully, but these errors were encountered: