Skip to content
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

New AJAX request resets whole view if HistoryPanel is enabled. #1843

Closed
PetrDlouhy opened this issue Oct 19, 2023 · 4 comments · Fixed by #1872
Closed

New AJAX request resets whole view if HistoryPanel is enabled. #1843

PetrDlouhy opened this issue Oct 19, 2023 · 4 comments · Fixed by #1872
Assignees

Comments

@PetrDlouhy
Copy link

Maybe I am doing something wrong, but I find working with DDT with HistoryPanel enabled quite annoying.

I have notifications on my website which makes request every ~5 seconds if there is anything new.

If I have HistoryPanel enabled in DDT this means that if I am exploring some request (from history or just the last one) and this AJAX notification request is made I loose everything I am seeing and the whole DDT resets to the newest (notification) request.

Would it be possible to set DDT so that it switches the request only if I explicitly select it from history?

@matthiask
Copy link
Member

Makes sense to me. I have also been annoyed by this behavior at times. I think automatically refreshing the history panel should stay, but it shouldn't automatically switch to the newest request in case the newest request used XHR/fetch or something. That's just my opinion though.

If someone uses something like htmx/hotwire/turbolinks for navigation (https://django-debug-toolbar.readthedocs.io/en/latest/installation.html#htmx) we should have a solution there as well, so that those users still get the auto update if possible. Maybe they have to opt in to updating to always the last request if distinguishing htmx boosts and other fetch-es isn't possible, but that would be acceptable.

@tim-schilling
Copy link
Member

I like this improvement. I've tolerated it as well. I like the idea of putting it in local storage to keep track of what was configured.

@tim-schilling
Copy link
Member

@PetrDlouhy do you have the availability implement a solution for this?

@PetrDlouhy
Copy link
Author

I don't have very much time right now, but I might get to it some time. Probably next time I would bump into this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment