Font size is unusably small on v5 query inspector #6666
Send to my agentDescribe the bug#
After upgrading to tanstack query v5, the font size is much smaller in the query inspector. There is no way to increase the default font size for the inspector only, and when using browser features to scale up the text, the page I am working on is also impacted.
Your minimal, reproducible example#
N/A
Steps to reproduce#
- Set browser font size to default and scaling to 100%
- Open the tanstack query inspector
- Try and read the text, it's very small!
Expected behavior#
As a developer, I expect that text is legible so I can view the state of the query cache. AND As a developer, I expect that I can set the font size of the query inspector so that text is legible.
How often does this bug happen?#
Every time
Screenshots or Videos#
With 100% view and default text size
When scaling the view to 200% the text is legible, but the page is impacted so much that it starts to act as if it's a different breakpoint
Platform#
Mac OSX Firefox 121.0
Tanstack Query adapter#
react-query
TanStack Query version#
5.17.1
TypeScript version#
5.3.3
Additional context#
No response
I gather we're inheriting font size from the container https://github.com/TanStack/query/issues/6226, so the
ReactQueryDevToolscan just be wrapped in adivwith the appropriate font size (which Tanstack will then shrink to 5/8 size, if I've understood correctly...)However it would be really nice if this was in the tooling rather than having to be set once per app, since different devs will have different access needs and you shouldn't have to raise a PR or write temporary code just to use the tool effectively.
font size is 0.75 rem (12px) and looks fine in the examples:
https://codesandbox.io/p/devbox/tanstack-query-example-react-simple-lskn7u
It was slightly bigger in v4 (0.9em, 12.6px)
Are you saying the switch to rem caused this? Are you setting custom styles on your body that made them bigger in v4, and this doesn't work anymore in v5?
@ardeora fyi
TkDodo added labelspackage: query-devtools
Hello! This is working as intended here is an example for you.
You can provide a custom fontSize for the query devtools by simply wrapping the devtools component with your desired fontSize.
<div style={{ fontSize: "24px", }} > <ReactQueryDevtools initialIsOpen /> </div>This will set the base size of the devtools font to 24px.
I'll close this issue for now. Please let me know if you still run into any issues!
ardeora(GitHub profile, opens in a new tab) closed this
Okay, the solution is easy. All you have to do is give the body element an explicit font size. Say, body{font-size: 1.6rem;}
Sign in to join this conversation.
Thanks for reporting, I'm experiencing the same issue with a MacBook Pro 16-inch from 2019, I found it difficult to read in a laptop at the default screen resolution. I wouldn't be surprise if this is related to the high DPI or the retina display and how resolutions works in Mac. This was working better for me in @tanstack/react-query v4.29.19