django-commons / django-debug-toolbar

A configurable set of panels that display various debug information about the current request/response.
https://django-debug-toolbar.readthedocs.io
BSD 3-Clause "New" or "Revised" License
8.08k stars 1.05k forks source link

The djdt handle shouldn't be stuck at the top of the browser window initially #1853 #1871

Closed VeldaKiara closed 9 months ago

VeldaKiara commented 9 months ago

Description

The issue was as much as the toolbar can be moved, it would be preferred if its position was on the upper top instead of the top.

Fixes # (issue) The issue is mentioned here #1853

Checklist:

VeldaKiara commented 9 months ago

I tried it out and the handle was still stuck at the top. Maybe I did something wrong, but it seems to me that a better way would be to change the fallback in ensureHandleVisibility to not be 0 but something like 200:

https://github.com/jazzband/django-debug-toolbar/blob/77aa47a761da203c52e2328990123abb252d8dd5/debug_toolbar/static/debug_toolbar/js/toolbar.js#L225-L233

I like Tim's idea of using a relative value for the default but maybe it will be harder to implement the handle dragging since you'd have to convert pixels to relative values there as well.

I noticed that if I use position relative, I will have to make numerous changes however I decided to leave the button as is because it was always getting overridden by the fallback function. You and @tim-schilling can test it out now to see if it works now.

matthiask commented 9 months ago

Thank you!

VeldaKiara commented 9 months ago

Happy to help.