[ReactQueryDevtools] Handle in a better way the "close" button #3067
Send to my agentHello,
I've got an issue with the "close" button on the interface of the dev tools.
The "close" button doesn't allow you to see what's the name of the key behind.
Two suggestions to deal with it:
- Use the react-query logo to close the panel
- Add at least a bit of padding in the list of queries to be able to scroll enough to have some space to see the name of the key
Thank you 😊
I like using the logo. Do you want to contribute this?
Yes, 😊
TkDodo added labelspackage: react-query-devtools
Found a workaround using the props:
positionandcloseButtonProps<ReactQueryDevtools position={"top-left"} closeButtonProps={{ style: { top: 0, bottom: "unset" } }} />Another possible fix would be to move the close button inside the Query Details panel:
A prop that allows showing another close button in this position sounds like a good solution.I think the general idea was to have the react-query icon that opens the devtools also have it close the devtools. one advantage of the close button is that it appears at the same spot as the open button, so you can click to open and click to close in the same spot. However, I think the react-query logo can always also close the devtools, basically giving two ways to close it: the icon and the close button. Then, you can hide the close button with:
<ReactQueryDevtools closeButtonProps={{ style: { display: "none" } }} />and you could still close them with the logo. That solves the initial issue that the close button overlaps with many queries.
TkDodo closed this
:tada: This issue has been resolved in version 3.39.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
tannerlinsley added labelsreleased
Why not replace the close button with the logo and remove the logo inside the dev tool panel? The space taken by the logo can be used for more useful things. Perhaps add some kind of border color to the logo to indicate that it's open.
the close button is always placed where you opened the devtools, but it sometimes overlaps with queries. If we move the logo there, then the logo would overlap with the queries.
the implemented solution is backwards compatible (no need to educate users that the close button is now "gone"), but you can now hide the close button via:
<ReactQueryDevtools closeButtonProps={{ style: { display: "none" } }} />and only use the logo to close them again to sidestep the issue of the closebutton overlapping with queries.
Sorry I forgot to help on this on this one.
Thank you!
:tada: This issue has been resolved in version 4.0.0-beta.14 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
tannerlinsley added labelsreleased on @beta
Sign in to join this conversation.
I like using the logo. Do you want to contribute this?