Skip to content

Conversation

happycollision
Copy link
Contributor

@happycollision happycollision commented Dec 23, 2023

In addition to adding support for relative positioning of the button, I've added in opacity changes for all in/out animations.

This change makes it possible to control the location of the button, in case you have other floating panels, etc., in your app.

The gif below shows a change to the playground example (not committed), that illustrates what is now possible.

CleanShot 2023-12-22 at 22 29 51

My motivation was purely because I have an application with a bunch of devtools in a drawer that I move around the screen as necessary while I develop. The previous version of RQ's devtools allowed me to pass a style directly to the button to control its position so that I could contain it within the drawer. This newer version does not. But allowing the button to just be positioned relatively works just fine for that purpose.

You can see below (in the lower right of each image) the best I could do to get v5 to play ball, compared to v4. (And forget moving the panel around!)

v4 devtools v5 devtools (without this PR)
CleanShot 2023-12-22 at 23 06 00@2x CleanShot 2023-12-22 at 23 03 43@2x

Copy link

vercel bot commented Dec 23, 2023

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
query ⬜️ Ignored (Inspect) Visit Preview Jan 29, 2024 6:12am

Copy link

codesandbox-ci bot commented Dec 23, 2023

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 cadbf10:

Sandbox Source
@tanstack/query-example-angular-basic Configuration
@tanstack/query-example-react-basic-typescript Configuration
@tanstack/query-example-solid-basic-typescript Configuration
@tanstack/query-example-svelte-basic Configuration
@tanstack/query-example-vue-basic Configuration

@happycollision happycollision force-pushed the devtools-btn-pos-relative branch from 6912797 to b1ad097 Compare December 23, 2023 03:56
@TkDodo TkDodo requested a review from ardeora December 23, 2023 10:08
@TkDodo
Copy link
Collaborator

TkDodo commented Jan 28, 2024

looks good. can you please fix the conflicts?

In addition to adding support for relative positioning of the button,
I've added in opacity changes for all in/out animations.
@happycollision happycollision force-pushed the devtools-btn-pos-relative branch from b1ad097 to cadbf10 Compare January 29, 2024 06:12
@happycollision
Copy link
Contributor Author

@TkDodo Just letting you know it's done.

Copy link

nx-cloud bot commented Feb 15, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit cadbf10. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@codecov-commenter
Copy link

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (62704ce) 41.78% compared to head (cadbf10) 4.38%.
Report is 55 commits behind head on main.

Files Patch % Lines
packages/query-devtools/src/Devtools.tsx 0.00% 6 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #6576       +/-   ##
==========================================
- Coverage   41.78%   4.38%   -37.41%     
==========================================
  Files         178      10      -168     
  Lines        7017    1484     -5533     
  Branches     1421     368     -1053     
==========================================
- Hits         2932      65     -2867     
+ Misses       3722    1257     -2465     
+ Partials      363     162      -201     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ardeora
Copy link
Contributor

ardeora commented Feb 15, 2024

Thanks for working on this! Looks good

@ardeora ardeora merged commit ac0d05c into TanStack:main Feb 16, 2024
@happycollision happycollision deleted the devtools-btn-pos-relative branch February 17, 2024 03:20
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.

4 participants