Skip to content
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

Closed
1 task done
IsaacHatton opened this issue May 18, 2024 · 2 comments · Fixed by #3782
Closed
1 task done

[Bug]: Context toolbar demo is broken #3773

IsaacHatton opened this issue May 18, 2024 · 2 comments · Fixed by #3782
Labels
bug Something isn't working

Comments

@IsaacHatton
Copy link

What happened?

When adding a square to canvas got this error:
image

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

  • I agree to follow this project's Code of Conduct
@IsaacHatton IsaacHatton added the bug Something isn't working label May 18, 2024
Copy link

linear bot commented May 18, 2024

@ds300 ds300 mentioned this issue May 20, 2024
15 tasks
@ds300
Copy link
Collaborator

ds300 commented May 20, 2024

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
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants