Page MenuHomePhabricator

can't return from "Show All Context" straight to "View Side-by-Side" for file diffs
Closed, WontfixPublic

Description

STR:

  • Browse to e.g. https://secure.phabricator.com/D16673
  • Open "View Options" for any file diff that's not new or deleted, e.g. webroot/rsrc/css/application/base/phui-theme.css
  • "Show All Context"
  • Attempt to return to the side-by-side view, but there's no option in the "View Options"
  • As a workaround, "View Unified" then "View Side-by-Side"

Event Timeline

chad triaged this task as Wishlist priority.Oct 6 2016, 3:57 PM
chad edited projects, added Feature Request; removed Bug Report.

I can't immediately reproduce this -- were you able to, @chad?

Here's what I did:

  1. Visited D16673.
  2. Scrolled down to the file: webroot/rsrc/css/phui/phui-profile-menu.css
  3. Selected View OptionsView Unified to put the file in unified mode.
  4. Selected View OptionsShow All Context to show all context for the file.
  5. Selected View OptionsView Side-by-Side to return to side-by-side mode. Here's a screenshot of the option being available:

Screen Shot 2016-10-06 at 10.56.25 AM.png (1×1 px, 337 KB)

This worked as expected.

Your reproduction steps didn't have step (3). Do you have your preferences set to unified by default? Did I make a mistake understanding the steps?

I might have misunderstood the ticket to being no "show less context" option after you're show more context.

Ah. From the workaround ("View Unified", then "View Side-by-Side") I'm guessing the menu maybe isn't refreshing properly somehow, but I'm not sure how to reproduce it given the provided steps.

I'm going to tentatively say this is probably a bug, but we need more clarity on how to repro it to move forward.

To be clear, I started with the Side-by-Side view, which I guess is the default. And I can't return directly to the side-by-side view with the original amount of context after "Show All Context".

If I instead prepare by:
0. Select "View Options" -> "View Unified"

then

  1. Select "View Options" -> "Show All Context"

I can't see an option to "View Unified" but I can see an option to "View Side-by-Side". If I go back to unified view through side-by-side I get back to the view and amount of context I had in this comments Step 0.

So chad is correct, the bug is that there's no way to "Show less context" after "Show more context". Switching view modes and then back is the only way to restore the original context (apart from reloading the page, I guess).

epriestley claimed this task.

Oh, sorry, apparently @chad got this right then and I misunderstood.

I think this feature is not worth the complexity to implement and maintain. There are reasonable workarounds (swapping side-by-side vs unified; reloading the page), we've never seen other requests in this vein that I can recall, and the need to do this is also rare in my personal experience.

In the general case (where you expand context in other ways, e.g. by clicking "Show 20 lines of context" several times) it would be significantly involved to allow you to undo each action, but it would be inconsistent to allow some kinds of context expansion to be undone and not others.

If we see more interest in this it's possible we'll implement it some day -- there's no strong product or technical reason why we couldn't support it, it just seems like an extremely low-value feature relative to the complexity it would add to the codebase and UI.