Don't deselect my transaction when a new request comes in
Summary
- Don't change $scope.activeKey when it's already set
- Update mock data every 5 seconds to simulate what's going on in many applications these days
- Bump version to 0.3.4
Many words
When debugging an application where transactions keep coming in, RailsPanel would keep selecting the newest transaction.
This is a bit annoying (understatement) when you're looking at a specific transaction to see what's going on. I fixed that by only automatically selecting a transaction when there is no transaction selected. I also added some code to the mock data function to simulate new transactions coming in every couple of seconds.
To test, open panel.html in Chrome and see the mock requests coming in, and the new requests not being selected (as they previously were).
The code LGTM. I'll test it myself later. @dejan please review this as it also bumps the version.
BTW, what's the preferred flow for updating versions? Do you want to have the version bumped in the PR that adds new feature or separately?
It would be nice if it was possible to deselect currently selected transaction. Maybe it could be done by clicking the transaction again or hitting the Escape button or both?
Why would that be needed? You can simply select another transaction you are interested in, or clear the view using CTRL/CMD+K.
On Wed, 3 Jul 2019 at 10:54, Jan Jędrychowski [email protected] wrote:
It would be nice if it was possible to deselect currently selected transaction. Maybe it could be done by clicking the transaction again?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dejan/rails_panel/pull/154?email_source=notifications&email_token=AAHZ4WJ6LI7SMPU2F5GORRTP5RSLPA5CNFSM4H5DFX22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZDYPXY#issuecomment-508004319, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHZ4WPDWALADITOGR7HZQDP5RSLPANCNFSM4H5DFX2Q .
You're right, it won't work as I thought.
What I mean is that the current behaviour might be still useful sometimes and I wonder if it was possible to still have that with some kind of a toggle.
Might be nice to have indeed. Do you have an example of a case where the current behavior would be preferable?
When working with the apps that don't pull data automatically you usually want to debug the latest request.
I think in Rails Panel there should have a bar on top where all the toggles and switches could live.
It should look and behave like the bars in the other devtools tabs.

That would be a cool feature :) Now that I know how this extension works, I might take some time to implement that! Though I think it's separate from this PR. @dejan what do you think?
This would break workflow for most cases. Usually it's the last requests that are of interest, but I understand how annoying must it be is if there's some polling happening.
Without mechanism to switch between the two modes, I'm hesitant about the change.