Skip to content

feat(devtools): add timeline (draft) #3881

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

Closed
wants to merge 19 commits into from

Conversation

gpichot
Copy link
Contributor

@gpichot gpichot commented Jul 20, 2022

Clone of #3841 at is was easier to start from scratch after the v4 merge (closing the other one as a result).

This is to add a timeline in the chrome devtools as discussed here: #3753

Screenshot below of the current state of work:

  • it displays query events (fetch, success etc) ;
  • the number of observers attached to this query (number on the query "box") ;
  • when no observers are attached ("query cached"), the box is a bit more transparent.

image

TODO

  • Add a tick to displays time at pointer ;
  • Use query cache on start recording to populate entries ;
  • Improve horizontal zooming
  • Add support for scrolling horizontally
  • Better tooltips
  • Review style (zoom buttons & move timer to head)
  • Check for all non nominative cases (error, retries)
  • Add tooltips for events (fetch, success)
  • Check if we can display differently refetch from window refocus, interval refetch, retries

@vercel
Copy link

vercel bot commented Jul 20, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
query ❌ Failed (Inspect) Jul 20, 2022 at 2:47PM (UTC)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 21, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit ad2ea78:

Sandbox Source
@tanstack/query-example-react-basic Configuration
@tanstack/query-example-react-basic-typescript Configuration

@gpichot
Copy link
Contributor Author

gpichot commented Aug 16, 2022

If someone has some feedback on how to add horizontal scrolling and zooming (I am not convinced with the current solution for zooming), it will be very appreciated :)

@gpichot
Copy link
Contributor Author

gpichot commented Mar 12, 2023

I don't feel very confident to merge this one in one piece given the scope of changes required:

  • I need to refactor components in multiple files to add support for panes (current architecture supports one pane) ;
  • there have been some changes and I don't want to do any regressions when adding this (all changes are not tested).

Going forward I think the best approach would be:

  1. create a PR to refactor and add some tests on the devtools part (I can do this) ;
  2. add a PR to add supports for panes.
  3. add the timeline feature on top of these PRs.

1 and 2 could be done in one shot, but I don't want to put too much cognitive load on both myself and reviewers :-).

@TkDodo what do you think about this?

@TkDodo
Copy link
Collaborator

TkDodo commented Mar 14, 2023

this sounds like a good idea. Maybe we should merge this one first though?

@gpichot
Copy link
Contributor Author

gpichot commented Mar 14, 2023

this sounds like a good idea. Maybe we should merge this one first though?

Yes indeed :). Would be best to avoid rework on related PRs.

@TkDodo
Copy link
Collaborator

TkDodo commented Mar 14, 2023

I'll try to get that one over the finish line this week. Let's close this PR ?

@gpichot
Copy link
Contributor Author

gpichot commented Mar 14, 2023

Yes, I will create related PRs when #4352 is merged.

@TkDodo
Copy link
Collaborator

TkDodo commented May 15, 2023

devtools have been re-written in solid and now work for all framework adapters.

@TkDodo TkDodo closed this May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants