Page MenuHomePhabricator

Jumping to an reply inline comment via URL anchor should highlight the comment node accurately
Closed, ResolvedPublic

Description

For example see D16561#inline-52688:

Screen Shot 2016-09-15 at 11.16.04 PM.png (478×1 px, 79 KB)

Steps to Reproduce
  1. Create an inline comment on a revision
  2. Create a reply to inline comment
  3. Navigate to the second inline comment using the anchor link (available from timeline of revision)
  4. View the yellow highlight is slightly off
Environment
  1. Reproducible on this phabricator install (secure.phabricator.com)
  2. Firefox 48.0.1, Safari 9.1.3
  3. OSX 10.11.5

Event Timeline

There are three different highlights at play here, visible in this screenshot:

Screen Shot 2017-04-24 at 2.57.46 AM.png (288×1 px, 30 KB)

  • Highlight 1 (orange-ish, on line 5) is because I'm hovering over the comment.
  • Highlight 2 (yellow, peeking out from the right-hand side) is because I've used j to select a block.
  • Highlight 3 (orange, behind the comment) is because of the anchor.

I think the positioning on Highlight 3 here isn't totally unreasonable -- it's "correct" in some sense -- but we should probably listen for this event, intercept it, and instead pretend that the user pressed n to select the inline with the keyboard focus instead of using the default highlight behavior.

epriestley renamed this task from Inline comment highlight is slightly misaligned to Jumping to an inline comment via URL anchor should highlight it with the keyboard focus reticle.Apr 24 2017, 10:03 AM
epriestley triaged this task as Low priority.
epriestley moved this task from Glitches to Reticle on the Inline Comments board.

Oh, the highlight itself actually is a little off if the reply is threaded. We move the comment up a little bit to make it visually thread a little more cleanly, but the highlight doesn't get a corresponding offset.

I'm inclined not to actually pursue the autofocus approach I was considering before, at least until we get a better read on whether click-to-select is a good behavior or not. Instead, I'm just going to fiddle with the UI a bit to fix the alignment issue. The new hidden inline state has some similar alignment issues.

epriestley renamed this task from Jumping to an inline comment via URL anchor should highlight it with the keyboard focus reticle to Jumping to an reply inline comment via URL anchor should highlight the comment node accurately.May 16 2017, 5:39 PM