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

TanStackRouterDevtools broken when rendering inside of a shadow DOM #1709

Closed
reihwald opened this issue Jun 5, 2024 · 2 comments · Fixed by #1720
Closed

TanStackRouterDevtools broken when rendering inside of a shadow DOM #1709

reihwald opened this issue Jun 5, 2024 · 2 comments · Fixed by #1720
Labels
enhancement New feature or request

Comments

@reihwald
Copy link
Contributor

reihwald commented Jun 5, 2024

Describe the bug

I'm using Tanstack Query and Router inside of a shadow DOM. The Query devtools have a shadowDOMTarget option that makes it possible to render them correctly. The Router devtools sadly lack such an option which makes them pretty much unusable.

Your Example Website or App

https://stackblitz.com/edit/vitejs-vite-3rsmfi?file=src%2Fmain.tsx

Steps to Reproduce the Bug or Issue

Just launch the project. The broken devtools are instantly visible as the hiding/showing doesn't work.

Expected behavior

As a developer, I expect to be able to use the devtools when rendering my React app inside of a shadow DOM.

Screenshots or Videos

image

Platform

  • OS: Windows
  • Browser: Chrome
  • Version: 125

Additional context

No response

@reihwald
Copy link
Contributor Author

reihwald commented Jun 5, 2024

query-devtools/src/Devtools.tsx and router-devtools/src/devtools.tsx look similar. Should I create a PR similar to this one?

@SeanCassiere
Copy link
Member

@reihwald feel free to take a stab at it! 🙌🏼

@SeanCassiere SeanCassiere added enhancement New feature or request labels Jun 5, 2024
reihwald pushed a commit to reihwald/router that referenced this issue Jun 6, 2024
reihwald pushed a commit to reihwald/router that referenced this issue Jun 6, 2024
reihwald pushed a commit to reihwald/router that referenced this issue Jun 6, 2024
reihwald pushed a commit to reihwald/router that referenced this issue Jun 6, 2024
reihwald pushed a commit to reihwald/router that referenced this issue Jun 6, 2024
reihwald pushed a commit to reihwald/router that referenced this issue Jun 6, 2024
SeanCassiere pushed a commit that referenced this issue Jun 11, 2024
…vtools and TanStackRouterDevtoolsPanel (#1709) (#1720)

* feat: add shadowDOMTarget option to TanStackRouterDevtools and TanStackRouterDevtoolsPanel (#1709)

* feat: add documentation for shadowDOMTarget (#1709)

---------

Co-authored-by: Liam Reihwald <liam.reihwald@worldline.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants