firefox-devtools / ux

Firefox DevTools UX Community
Mozilla Public License 2.0
103 stars 21 forks source link

Async Stack (Frames) #100

Open digitarald opened 4 years ago

digitarald commented 4 years ago

We need some UI alignment/polish for async stacks in Debugger and Console stacks.

Related prior discussions was in framework stacks.

cc @jasonLaster

Prior Art

Test page: https://firefox-devtools-async-console-trace.glitch.me/

Firefox Console

image

Scala IDE

image

JetBrains

image

Chrome

Debugger

image

Console

image

Chrome Old

image

digitarald commented 4 years ago

@jasonLaster's initial draft is pretty solid (landing in bug 1592432):

image

fvsch commented 4 years ago

I'm afraid the horizontal lines are conflicting with the separators we already use between accordion panes. If you look at the sidebar in the last screenshot, that's a shitload of horizontal separators, and it's hard to grasp the overall structure.

Do the lines have some meaning, something about a time gap maybe?

For context: I don't know what an "async stack" is. I do use async/await in JS, and I get normal stack traces, but "async stack" is new to me and I don't understand Chrome's design or any of the prior art designs (they're all gibberish to me). Is this something that design can help elucidate?

jasonLaster commented 4 years ago

The new design is a bit more compact. the reason for this is that every frame after an await will be awaiting as well. Because of that, the async boundaries with the horizontal bar is a bit much.

Screen Shot 2019-12-16 at 4 10 23 PM
fvsch commented 4 years ago

Looks much better to me. :)

Would be interesting to see why Chrome and others went with a more in-your-face design.

digitarald commented 4 years ago

Do the lines have some meaning, something about a time gap maybe?

This was alspo my main gripe for Chrome's design – full-width non-interactive separators seem a bit odd. One reason might be that call stacks are kinda "grouped" by sync/async frames.

Would be interesting to see why Chrome and others went with a more in-your-face design.

This will be just the basic first async stacks for Firefox's Debugger and we will need to think about how we'll show captured stacks as the screenshots above have for Console.

Callback stacks can get take a bit more space (more than just "await"), as you can see in the Chrome and Firefox screenshots above. A responsive design that makes those more seamless where in wider Console space both elements are together (similar to await asyncFib above, and in narrow mode they split into 2 lines, while still being interactive element.

digitarald commented 4 years ago

New design is available in Nightly, devtools.debugger.features.async-live-stacks.