query icon indicating copy to clipboard operation
query copied to clipboard

fix(devtools): stop devtools explorer from un-expanding when data is fetched

Open markmurphydev opened this issue 3 years ago • 6 comments

Fixes #3681

Reverts the change in #2949 from function handleEntry to component HandleEntry, but keeps the added types. I'm not actually sure why that fixes the un-expanding, but it does.

markmurphydev avatar Jun 09 '22 05:06 markmurphydev

thank you. there are still type errors, please have a look:

Error: src/devtools/tests/Explorer.test.tsx(42,11): error TS2322: Type '{ label: string; toggleExpanded: Mock<any, any>; pageSize: number; expanded: false; subEntryPages: { label: string; }[][]; HandleEntry: () => Element; value: undefined; subEntries: never[]; type: string; }' is not assignable to type 'IntrinsicAttributes & RendererProps'. Property 'HandleEntry' does not exist on type 'IntrinsicAttributes & RendererProps'. Did you mean 'handleEntry'?

TkDodo avatar Jun 09 '22 06:06 TkDodo

When running yarn test:ci, prettier fails on file types/index.d.ts This also happens when I check out origin/master on a new gitpod workspace, and try to run the tests. When I removed the semicolons in types/index.d.ts, the workflow tests seemed to pass fine, but the type files aren't tracked by git.

markmurphydev avatar Jun 09 '22 16:06 markmurphydev

prettier runs before the types are generated, so that's fine :)

TkDodo avatar Jun 09 '22 19:06 TkDodo

Great! In that case, the type errors are fixed, and data explorer is staying expanded.

markmurphydev avatar Jun 11 '22 18:06 markmurphydev

can you do me a favour and rebase this to the beta branch? Release is imminent and I'd want to avoid merge conflicts because we moved lots of things around. thanks

TkDodo avatar Jul 17 '22 13:07 TkDodo

@boathouse2112 sorry that I missed this somehow. Can you please fix the conflicts? Then this should be good to merge 🚀

TkDodo avatar Aug 13 '22 10:08 TkDodo

FYI, I will close stale PRs somewhen next week. Please either address the open comments / resolve the merge conflicts or this PR will be closed. Thanks 🙏

If someone else wants to take over this PR, please do

TkDodo avatar Sep 23 '22 14:09 TkDodo

superseded by:

  • https://github.com/TanStack/query/pull/4214

TkDodo avatar Sep 24 '22 18:09 TkDodo

@boathouse2112 I'll still attribute you as contributor alongside @zorzysty to the upcoming release. Thanks for your contribution 🙌

TkDodo avatar Sep 24 '22 18:09 TkDodo