Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

Profiler UI/UX tweaks and bug-fixes #1112

Merged
merged 9 commits into from
Aug 30, 2018
Merged

Conversation

bvaughn
Copy link
Contributor

@bvaughn bvaughn commented Aug 24, 2018

Resolves #1104 and umbrella issue #1099

Interactions

  • 09edccb: Tie the commits more to the chart views. Maybe use the colors (based on commit duration) for the circles in the interactions view?
  • 09edccb: Commits are shown as bars in the charts, but in the interactions tab they're circles. Maybe they should be little colored squares? At least in the "renders" side pane, rather than showing the triangle that fills in, show the colored squares?
  • 09edccb: Maybe use black for selected (like we do in the snapshot selector)

Elements panel

  • cca8b0c: Only scroll selected node if not already visible

General

  • f984a56: Replace simple cache with LRU cache for charting data

1. Replace interaction commit circles with squares
2. Color commits in both the main and right-side pane based on their duration (to tie into other chart views)
3. Remove click-to-select commit because this surprised Sophie and Shirley initially
@bvaughn bvaughn changed the title React Rally profiler feedback [WIP] Profiler UI/UX tweaks and bug-fixes Aug 27, 2018
@bvaughn bvaughn requested a review from gaearon August 27, 2018 02:23
@bvaughn
Copy link
Contributor Author

bvaughn commented Aug 27, 2018

Okedoke. This PR is ready for review.

It fixes #1104 (so we should probably do another browser release after it's merged) and wraps up the remaining low-hanging-fruit from the umbrella issue. I've split the remaining larger umbrella items off into separate issues tagged with a new plugin: profiler label.

@gaearon
Copy link
Contributor

gaearon commented Aug 27, 2018

Do you mind updating the preview page so I could try it without building?

@bvaughn
Copy link
Contributor Author

bvaughn commented Aug 27, 2018

Just pushed an update.

@bvaughn
Copy link
Contributor Author

bvaughn commented Aug 27, 2018

@gaearon
Copy link
Contributor

gaearon commented Aug 27, 2018

A few nits (might not be related to your changes, just general observations):

  • c822e57: none of these should be selectable

screen shot 2018-08-27 at 17 07 49

  • a29b03d: it was confusing to record a profile and then immediately land on this empty screen:

screen shot 2018-08-27 at 16 50 07

  • 098307d: it was also confusing when I switched tab to interactions, then forgot about it, then recorded a profile, and got an empty screen. took me a while to realize I don't see the list of commits because I'm on a wrong tab.

screen shot 2018-08-27 at 16 59 03

  • there's a funny 1px white border at the right side
    • @bvaughn: I'm still not seeing this, even after zooming in. Sorry 😦

screen shot 2018-08-27 at 17 00 53

  • b241ea8: can we replace hyphen with a space here? it feels like uncanny valley between regular text and package name :P

screen shot 2018-08-27 at 16 51 21

  • the new "autoscroll" behavior is great.

screen shot 2018-08-27 at 16 54 37

  • 38711bf: 1px table grid misalignment?

screen shot 2018-08-27 at 17 03 18

screen shot 2018-08-27 at 17 04 00

screen shot 2018-08-27 at 17 10 10

  • b27fb37: should selected commit be black in right pane too? otherwise its color doesn't match anything.

screen shot 2018-08-27 at 17 11 12

  • would it be helpful if hovering over commits in right pane on the above screen would temporarily highlight them in the left pane? I think that would make the correspondence between them a bit clearer.

    • @bvaughn: Maybe! But it adds more complexity since we'd need to add a new connected prop and action to pass around for hovering. Not sure if it's worth it?
  • what happened in this commit? everything seems grey. were all renders insignificant? did grey things even render? in that case why are they grey? does "total renders" mean total since beginning or profiling? or total in this commit? probably since profiling but this didn't occur to me at first.

    • @bvaughn: Send me JSON.stringify with the snapshot data? I'd like to know what's going on there too.

@gaearon
Copy link
Contributor

gaearon commented Aug 27, 2018

In general I find this interaction disorienting.

I get teleported to another screen and don't know how to go back.

I know how to go back now (just click on preselected interaction) but it's still confusing me sometimes. I think I might be expecting a "back" button or some visual cue to tell me I can go back to previous list easily.

@gaearon
Copy link
Contributor

gaearon commented Aug 27, 2018

Overall I'm not sure I dig black fill as the selected commit. I understand you wanted to make it more prominent, but it confuses me that we use color both to indicate the cost and to indicate what's selected, and selecting "hides" the cost hint from us.

Have you explored other options, e.g. a prominent black border while keeping the background as is?

@bvaughn
Copy link
Contributor Author

bvaughn commented Aug 27, 2018

Have you explored other options, e.g. a prominent black border while keeping the background as is?

Yes. I probably haven't explored them all, so maybe there's a good one I've not thought of. In general, theming makes this tricky– since it limits our color palette. 😦

The above is some good feedback, but most of it seems unrelated to this PR (except for the added black box to indicate the currently selected commit in the interactions panel) and it feels a bit hard to respond to since it's just a bullet list of comments. Do you mind filing them as individual issues with the profiler tag?

there's a funny 1px white border at the right side

I also don't see what you're referring to with this one.

@gaearon
Copy link
Contributor

gaearon commented Aug 27, 2018

I also don't see what you're referring to with this one.

Zoom in on the image. You’ll see there’s a strange 1px white strip between black and grey. It looks odd like a glitch.

@bvaughn
Copy link
Contributor Author

bvaughn commented Aug 27, 2018

I edited your original comment and added some inline responses. (I don't know of a better way to respond to a huge multi-bullet comment like that.) I'm going to push a couple tweaks for the very small items, but I think most things should be filed as follow up issues since this is a confusing format :D

@bvaughn
Copy link
Contributor Author

bvaughn commented Aug 27, 2018

Pushed a few tweaks to low hanging fruit!

@gaearon
Copy link
Contributor

gaearon commented Aug 27, 2018

Sorry, I wasn’t tracking individual issues and which changes were associated with which PR so it’s more of a braindump from somebody trying this for the first time. I can later come back and file a single issue for each of these — it just felt excessive if most are small changes or not even necessarily fixable.

@bvaughn
Copy link
Contributor Author

bvaughn commented Aug 27, 2018

Totally makes sense 😄 I responded inline with some comments and tagged a few as already completed.

@gaearon
Copy link
Contributor

gaearon commented Aug 27, 2018

That's fair I guess, although I don't think we've been enforcing that level of scrutiny elsewhere in the DevTools "chrome" 😄 I don't see it as very important. Happy to add a style prop to the toolbar though!

I’m not scrutinizing just to nitpick :-) We didn’t have a tabbed UI before so I didn’t often click on different parts of the toolbar. Now that we have a tabbed interface, I click on it quite a bit and find myself accidentally selecting things on it. Seems like an easy fix so I flagged it. I can refrain from flagging small changes like this, but I selected the toolbar content two times by accident during a five minute testing period. And in general I think we shouldn’t avoid polish because some older parts aren’t polished.

@bvaughn
Copy link
Contributor Author

bvaughn commented Aug 27, 2018

That was more of a disclaimer that "I don't think we've thought about this level of nuance in other part of DevTools" – I already made the change in this particular place 😄 Thanks for pointing it out.

@gaearon
Copy link
Contributor

gaearon commented Aug 27, 2018

Although I think this is unavoidable if the first commit measures a 0 duration due to it being so fast. Open to suggestions.

We could automatically select the first non-empty commit. We could also tweak the empty state text to suggest selecting a commit from the upper right corner or using arrow keys.

@bvaughn
Copy link
Contributor Author

bvaughn commented Aug 27, 2018

We could automatically select the first non-empty commit.

Maybe... I think this might be a bit disorienting though.

We could also tweak the empty state text to suggest selecting a commit from the upper right corner or using arrow keys.

I like this!

@bvaughn
Copy link
Contributor Author

bvaughn commented Aug 27, 2018

Actually, thinking more about that empty state– I want to look closer into this. I believe I read it too fast and first and misunderstood what the screenshot was showing.

I assume this is the suspense demo, the "Debugger" root?

@bvaughn
Copy link
Contributor Author

bvaughn commented Aug 27, 2018

Ah, I believe this is a very special case, since the "Debugger" is mostly just rendering "null" unless you type "/" in the demo app. In most cases, even 0 duration commits should still show an all-gray-tree. I will tweak this messaging a bit though to hopefully make this clearer. I think this message makes sense for the "ranked" view (which could be empty if performance.now timing returned 0) but not the flame graph view.

@gaearon
Copy link
Contributor

gaearon commented Aug 27, 2018

I'm still not seeing this, even after zooming in. Sorry

I’m talking about 1px white strip.

0eac7b43-c445-42e5-9cfd-f8ae3a4a3d56

@gaearon
Copy link
Contributor

gaearon commented Aug 27, 2018

I'm not entirely sure what's happening here. I tried to repro with the "plain" test harness but couldn't.

I was using it on UFI in Workplace. When you say “couldn’t reproduce” what do you mean precisely? Do you mean that pressing left and right arrows to expand and collapse a single tag with many children always brings its start into view?

@gaearon
Copy link
Contributor

gaearon commented Aug 27, 2018

Gets "stuck" how?

The circle in my GIF shows when the mouse is down. You can see that I release it outside the pane. When I enter the pane again, it still thinks the mouse is down (and scrolls through commits) even though I released it. The only way to stop it from thinking I’m holding he mouse down is to hold it down again and release.

This sounds like something that should be possible to solve. I just don’t remember how.

@bvaughn
Copy link
Contributor Author

bvaughn commented Aug 27, 2018

I’m talking about 1px white strip.

Oh! 😆 I see it now! Thanks for circling it.

I was using it on UFI in Workplace. When you say “couldn’t reproduce” what do you mean precisely? Do you mean that pressing left and right arrows to expand and collapse a single tag with many children always brings its start into view?

Yes, using the "deeply nested" component in the example test app, I couldn't repro it. Seemed like I should have been able to.

The circle in my GIF shows when the mouse is down. You can see that I release it outside the pane. When I enter the pane again, it still thinks the mouse is down (and scrolls through commits) even though I released it. The only way to stop it from thinking I’m holding he mouse down is to hold it down again and release.

Oh! The gif wasn't animating for me earlier so I wasn't seeing that. Now I do.

Hm... I listen for mouse-up on the window, but if you mouse out of the window entirely...hm. File a follow up issue for it. I don't know the fix off the top of my head.

@bvaughn
Copy link
Contributor Author

bvaughn commented Aug 27, 2018

I just pushed a commit (and deployed to the preview URL) that improves the UI/UX for commits with a duration of 0. Try again? 😄

@bvaughn
Copy link
Contributor Author

bvaughn commented Aug 28, 2018

I created a few spin off issues for remaining feedback that I didn't address already. Feel free to create more for anything I missed. 😄

@bvaughn
Copy link
Contributor Author

bvaughn commented Aug 29, 2018

Anything blocking this from merge, @gaearon ?

Copy link
Contributor

@gaearon gaearon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

itrustyou

@bvaughn bvaughn merged commit f8f91e4 into facebook:master Aug 30, 2018
@bvaughn bvaughn deleted the issues/1099 branch August 30, 2018 14:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants