Page MenuHomePhabricator

Make "Collapse File" in commit view a one-click action
Closed, WontfixPublic

Description

Use Case: When looking at a bigger commit, it is useful to only display a certain subset of changes. With a big change set of a file, it sometimes gets hard to browse the relevant information, which resides in the other files. It would be useful if there was a one click method to fold(and unfold, of course) a single file change display, instead of having to go through through the view options.

Event Timeline

timor raised the priority of this task from to Needs Triage.
timor updated the task description. (Show Details)
timor added a project: Diffusion.
timor added a subscriber: timor.

Probably not is my general feeling here. I don't like to put UI emphasis on one developer's workflow over another, since many people use it in many different ways. Additionally these kinds of specialized UI (which doesn't exist) is difficult to support on mobile.

epriestley claimed this task.

I agree with @chad here. We might look at this again after T2009 if the 1-up view gives us other reasons to adjust the UI, but very few users use this option frequently and promoting it would be giving a lot of UI space to a relatively niche workflow.

In general, the easiest way to make changes understandable is to make smaller changes. While this isn't always possible, reducing the size of changes is by far the most effective way to make them easy to understand, and there are severe limits to how comprehensible we can ever make large changes (e.g., affecting 10K lines in 300 files) no matter how much UI wizardry we build. See https://secure.phabricator.com/book/phabflavor/article/writing_reviewable_code/

In one specific case, generated xml files clutter up the diff, which are project files that are being generated. While I totally agree on small commits, sometimes it is not possible, or we are looking at old commits, where there was not so much emphasis on modular development yet.

On normal screens, there is a lot of horizontal space in the file header line, so it would not be wasted there. As for mobile, I cannot tell, since this is of no importance at our place (yet).

I think of it as the same thing that you use when you have an editor that supports code block folding.

We support automatic folding of generated files, and T784 discusses expanding that mechanism and making it easier.