debugger icon indicating copy to clipboard operation
debugger copied to clipboard

[Breakpoints] re-imagine some breakpoint UI/UX

Open jasonLaster opened this issue 7 years ago • 3 comments

There are some fundamental issues with a breakpoint in the breakpoints panel:

  1. we currently only show one text value (the line snippet, condition, log value). It would be nice if we showed all three or had the option to expand.
  2. we currently show the different breakpoint states in the left border (paused at "green", conditional "yellow", log "purple"). This can be a bit vague and if we address 1 i think the border could be unnecessary.

From @fvsch Personally I'm unhappy with the interactions for this whole row.

We have three actions:

  1. disable breakpoint (checkbox, always visible)
  2. remove breakpoint (cross icon, visible on row hover only)
  3. navigate to source (invisible, no specific signifier or visual feedback)

Having one interaction perceptible on hover only and a second one not perceptible at all until you click is not a great situation, to begin with. On top of that, those two interactions are not available using keyboard navigation.

We also have a full-row hover style which is very ambiguous, given how we offer 3 different click interactions in that row.

Some options:

  • Remove the hover effect.
  • The checkbox could have no visible label (click the checkbox to toggle); we will need an accessible label then (title + aria-label?).
  • I would keep the line:column info always visible, and link that. Linking a location is consistent with what we have in Inspector and Console. A text-decoration: underline on hover + a tooltip would help make that interaction clear (see locations in Inspector > Rules, and log locations in Console).
  • The code snippet could have zero interactions. Or it could have the same function as the line:column, if we show similar interactive feedback (or if we join both together). It's probably worth exploring a few options in mockups.

jasonLaster avatar Feb 27 '19 12:02 jasonLaster

To get the ball rolling, I took a stab at mocking up what a breakpoint item would look like if all of its UI actions were exposed.

GIF: Navigating with Tab

screen shot 2019-02-28 at 10 40 31 am

Some notes:

  • The line:column seems best placed away from the code snippet, since it's easy to mistake them with each other. You could add some significant visual cue to differentiate the line:column but the tradeoff is it makes the breakpoint item look crowded
  • The hover does seem misleading as there's multiple interactions per row, but it's not entirely unhelpful as it helps group the row together. This would be especially important with the repeated elements like the line:column and the close button
  • Is it worth changing the hover to use the same blue used by hover in Watch Expressions/XHR Breakpoints? One, for uniformity. Two, to differentiate it from the pause color which is also a grey

@jasonLaster I'm not sure I quite get 1), can you explain?

jaril avatar Feb 28 '19 16:02 jaril

@jaril Nice. For the background hover, I'm still unconvinced that it's useful. We have one in the Watched Expressions pane, but the interactions there are quite different (double-click to edit a row); so I don't have a strong opinion on unifying those background hover colors.

The hover does seem misleading as there's multiple interactions per row, but it's not entirely unhelpful as it helps group the row together.

I'm wondering if changing the spacing of breakpoints to follow the latest UX spec would make the "grouping" issue better or worse.

For grouping, our solutions tend to be:

  • don't add visual signifiers, just a bit of whitespace should be enough;
  • for table rows, we use zebra colors (see Network);
  • in some cases, where we can have a lot of content in a single "row" or item, we're considering using borders to help users differentiate items (it's planned for Console logs).

Pinging @mcroud, since you might have some thoughts or maybe even existing mockups about this right-hand Breapoints pane.

fvsch avatar Feb 28 '19 18:02 fvsch

Cloned into Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1695624

Firefox Developer Tools (including Debugger tool) development is now entirely happening in Bugzilla and new issues should be reported here: https://bugzilla.mozilla.org/enter_bug.cgi?product=DevTools&component=Debugger

Honza

janodvarko avatar Mar 01 '21 13:03 janodvarko