1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 09:18:48 +02:00
phorge-phorge/webroot/rsrc/css
epriestley 661c758ff9 Render indent depth changes more clearly
Summary:
Ref T13161. See PHI723. Our whitespace handling is based on whitespace flags like `diff -bw`, mostly just for historical reasons: long ago, the easiest way to minimize the visual impact of indentation changes was to literally use `diff -bw`.

However, this approach is very coarse and has a lot of problems, like detecting `"ab" -> "a b"` as "only a whitespace change" even though this is always semantic. It also causes problems in YAML, Python, etc. Over time, we've added a lot of stuff to mitigate the downsides to this approach.

We also no longer get any benefits from this approach being simple: we need faithful diffs as the authoritative source, and have to completely rebuild the diff to `diff -bw` it. In the UI, we have a "whitespace mode" flag. We have the "whitespace matters" configuration.

I think ReviewBoard generally has a better approach to indent depth changes than we do (see T13161) where it detects them and renders them in a minimal way with low visual impact. This is ultimately what we want: reduce visual clutter for depth-only changes, but preserve whitespace changes in strings, etc.

Move toward detecting and rendering indent depth changes. Followup work:

  - These should get colorblind colors and the design can probably use a little more tweaking.
  - The OneUp mode is okay, but could be improved.
  - Whitespace mode can now be removed completely.
  - I'm trying to handle tabs correctly, but since we currently mangle them into spaces today, it's hard to be sure I actually got it right.

Test Plan: {F6214084}

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13161

Differential Revision: https://secure.phabricator.com/D20181
2019-02-19 12:40:05 -08:00
..
aphront Add a standalone view for the Maniphest task graph 2019-02-15 14:43:38 -08:00
application Render indent depth changes more clearly 2019-02-19 12:40:05 -08:00
core Allow the haunted comment panel ("Z") to take up more vertical room 2018-06-07 13:19:35 -07:00
diviner Lots of little fixes for Dark Mode (Experimental) 2017-07-19 14:41:23 -07:00
font Remove "Aleo" as specialized font for headers 2017-03-22 09:57:00 -07:00
layout Fix odd line number line wrapping on embedded pastes ({Pxxx}) 2018-04-20 14:20:20 -07:00
phui Show user availability dots (red = away, orange = busy) in typeaheads, tokenizer tokens, and autocompletes 2019-02-19 10:57:20 -08:00
syntax Generate syntax highlighting CSS from a reusable map 2016-05-05 02:50:48 -07:00
sprite-login.css Uh, update Phabricator login image 2017-08-11 13:37:26 -07:00
sprite-tokens.css More tokens 2016-07-03 18:32:40 -07:00