firefox-devtools / profiler

Firefox Profiler — Web app for Firefox performance analysis
https://profiler.firefox.com
Mozilla Public License 2.0
1.21k stars 392 forks source link

Please turn off sticky tooltips in the flame graph #5140

Closed mstange closed 1 month ago

mstange commented 1 month ago

Profile: https://share.firefox.dev/4gJdYlB

In the flame graph, I often click a call node in order to change the highlighting in the activity graph - I want to know where in the timeline this function is called. As of recently, clicking a call node in the flame graph makes the tooltip sticky. This can hide a large part of the flame graph and even a part of the activity graph, until you scroll the flame graph or click in an empty spot. Can we make tooltips non-sticky in the flame graph, please?

fqueze commented 1 month ago

Can we make tooltips non-sticky in the flame graph, please?

I agree sticky tooltips, as they currently behave, are a pain in the flame graph.

Instead of disabling them in the flame graph, could we instead make the tooltip sticky only when clicking on a node that is already selected? This would let us click around to see the highlighting change in the activity graph, but would also let us copy/paste from the tooltips when we really want to. I remember we discussed that suggestion in a standup but I don't remember what the conclusion of the conversation was.

julienw commented 1 month ago

That's good feedback, thanks.

It's not obvious how to change this because the logic of displaying the tooltip is shared by all canvas-based charts. I guess we'll need to make this more configurable depending on the chart.

canova commented 1 month ago

I just opened #5147 to disable it in flame graph and stack chart. Thanks for the feedbacks.

Instead of disabling them in the flame graph, could we instead make the tooltip sticky only when clicking on a node that is already selected? This would let us click around to see the highlighting change in the activity graph, but would also let us copy/paste from the tooltips when we really want to. I remember we discussed that suggestion in a standup but I don't remember what the conclusion of the conversation was.

Yeah, I remember having that as well. But I'm unsure if that complexity will bring any value.

  1. It is going to be very hidden, like you need to click twice, AND not double click by mistakenly also. I don't know if people are going to notice this behavior easily.
  2. It's going to be very different than the behavior from the UX that we have in the marker chart or any other part of the UI.
  3. I don't know if we ever need to copy a part of the flame graph tooltip. We have the copy function name context menu item already for the most important thing. And looking at the other fields in the tooltip, the only thing I would like to copy is the file name. Maybe we should have a context menu item for that too. Since we have a constant set of fields in the tooltip (as opposed to the marker chart tooltips) maybe we can fix that by having more targeted things.

Maybe still it might be good for power users, so let me know what you think. But I think we can disable it as a quick fix and then iterate over it later.