Page MenuHomePhabricator

'Show Hidden Comments' bubble does not fit in margin next to line numbers >1000
Closed, ResolvedPublic

Description

pasted_image_at_2017_01_24_01_23_pm.png (138×681 px, 50 KB)

(Apologies for the super nit picky bug report, but it seemed borderline worth filing, it becomes more noticeable the more neighboring comments you have to hide)

Steps to reproduce: Create an inline comment on a revision on a line that has a number >1000, hide the comment. The column where the 'Show Hidden Comments' bubble appears can't fit both the line number and the bubble without line wrapping, which also pushes what looks like an empty line into the diff.

Version info:

* commit ab4355cde0f8913b9e12be345f813f5ba7e0e468
  Author: epriestley <git@epriestley.com>
  Date:   Sat Jan 21 08:11:19 2017
  
      (stable) Move Favorites and User menus to MenuBarExtensions

It looks like the line number column has a fixed width of 45 pixels.

Event Timeline

What possible use case could anyone ever have for putting a THOUSAND lines of source code in a single file?!!

(This reproduces for me.)

Screen Shot 2017-01-25 at 7.51.18 AM.png (243×338 px, 15 KB)

epriestley added a project: Differential.

My first internship I was tasked with working on an application as sole developer. It started at 8.6k lines in a Main.cs file and at the end of the summer I left with it at about 15.5k. Luckily we didn't do code reviews.

@epriestley you don't want to know what schools teach/accept now-adays... is very scary.

I'm thinking about resolving this by having three states instead:

  • Normal (as today).
  • Collapsed (replaces the current "hidden" state).
  • Hidden (new state, really hidden, tied to T8909).

The current "Hide" action would be replaced with "collapse", which would shrink the inline to a single row of lighter grey text with the current bubble-to-expand in the sidebar:

2302if (something) {
2303 do_magic();
alice: blah blah...
bailey: blah blah...
2304}

T8909 would introduce a new global "hide" state which would remove the rows completely, perhaps leaving a very lightweight indicator (like a background color in the numbers column) on the line to indicate that inlines exist, but not a full interactable "expand" element. To show them again, you'd change the setting to "show inlines".

I think this probably better aligns with use cases, too -- I use "hide" to mean "this is resolved to my personal satisfaction and I don't need to look at it anymore", but "collapse" is probably actually a better fit for that action. Likewise, global states from T8909 are probably better fits for "I just want to look at the code for now".