dejan / rails_panel

Chrome extension for Rails development
https://chromewebstore.google.com/detail/railspanel/gjpfobpafnhjhbajcjgccbbdofdckggg
MIT License
3.85k stars 187 forks source link

Should not go to newest request when viewing one #165

Closed E1337Kat closed 7 months ago

E1337Kat commented 5 years ago

On my companies app, we have some js calls to the rails server to check for new notifications or whatever. (It may not be the best way to receive notifications, but it is legacy from before browser notifications were possible.) As a result, when I am using rails panel, whenever the notifications on the site are checked, the active request is set to be that newest request. This is not very useful when I am currently looking at a prior request's parameters and suddenly the new request's info is brought up.

It looks like the culprit is here. at that line, we set the active request to be the newest incoming request. I don't think we should do this unless there is not a current active request, or rather, when the user has not clicked on a request yet.

I'd like to know other's opinions on either removing that line or changing it to meet my suggested conditions.

dejan commented 7 months ago

Thanks for suggestion. I've implemented a feature that allows you to control this behaviour https://github.com/dejan/rails_panel/pull/200