Now that we're getting close to finishing Conpherence v2, we should figure out what the ultimate fate of JX.Scrollbar is.
For context, particularly for anyone coming into this ticket from the world at large, JX.Scrollbar is the fake scrollbar which replaces the real scrollbar. The reason we started using this fake scrollbar is to support adding a durable chat column to Phabricator:
You can activate this column by pressing "\" on your keyboard.
Specifically, without the fake scrollbar:
- We get double scrollbars on the far right of the screen, which is a bad/confusing UX.
- UIs with a lot of panels (the durable column, and the main Conpherence view -- especially before recent changes -- look ugly and cluttered).
The fake scrollbar was an attempt to fix these issues. Particularly, if we were designing this column for a desktop application, it would be a clear and obvious choice to put the page content scrollbar to the left of the chat column. The intent was to aim for that and see if it was achievable. Generally, we wanted to evaluate our options here and choose the best set of tradeoffs.
JX.Scrollbar works a lot better than I expected it would, and is essentially indistinguishable from normal scrollbars for me on Safari on OSX. However, this isn't the case for all users, and it has some behaviors which are unfixable or very difficult or complex to fix:
- Scrollable panes and anchors are just really broken in a fundamental way in Chrome (T7740). We have a reduced repro case where the browser exhibits broken, surprising behavior that we don't think we can work around, and we haven't seen any meaningful progress on that from Chrome in more than a month.
- Chrome has some sort of other major rendering issue (T7494) which is likely related and also probably not fixable.
- Firefox on Windows scrolls panes very slowly (T7109). We can probably work around this, but it's very complex.
- Various OS and browser-specific interactions, e.g. highlighting search results in the scrollbar gutter.
- A collection of weird issues (T7128, T7209, T7466) which don't reproduce reliably.
Also notable: we've changed the left column in Conpherence so that it usually does not need to scroll. This has reduced the importance of JX.Scrollbar somewhat.
In general, note that there are really two separate things JX.Scrollbar is doing:
- Putting page content in a scrollable pane. This causes almost all the major/serious problems.
- Drawing a prettier scrollbar. This causes relatively few problems, mostly related to OS-specific interactions like "meta-shift-middle-click" not doing what users want.
Some possible ways forward, in rough order of commitment to JX.Scrollbar:
- Continue using JX.Scrollbar everywhere, and accept that it will be kind of glitchy for some users in some cases; keep working to mitigate those cases and hope that browser issues which we can't work around will be fixed eventually.
- Use JX.Scrollbar everywhere by default, but add an option to disable drawing the fancy scrollbars. We'd still frame the page content.
- Use JX.Scrollbar only when the durable column is active. This probably implies a jarring/slightly-glitchy transition, and would mean activating the column also activates all the scrollbar problems.
- Use JX.Scrollbar everywhere by default, but add an option to disable drawing the fancy scrollbars and framing the main page content.
- Stop framing page content. Use JX.Scrollbar only in Conpherence panels. Accept double scrollbar.
- Throw out JX.Scrollbar completely, and accept double scrollbars and more cluttered/ugly panel UIs.
If everyone was using Safari on OSX, I'd say (1) is a good option and maybe we do (2) to let alt-meta-middle-click work properly for build-you-own-linux-window manager users who probably compiled their own scrollbars from source anyway.
However, some of the Chrome stuff particularly is fairly debilitating. T7740 is an intensely confusing, broken UX. T7494 isn't as bad, but still a pretty bad experience.
To fix the Chrome stuff, we have to go at least as far as (3). I'd prefer not to do (3) or (4) because I think they make Phabricator much harder to test and develop in the long run: they give us two separate modes with a major fundamental layout difference. In the case of (4), switching between the modes would require a lot of work (adjusting a preference setting).
So that leaves us with (5) or (6). I'm inclined to try (5). In particular:
- We have no option but to frame this content anyway.
- We don't have any outstanding reports of glitchiness in Conpherence panels that aren't otherwise our fault. In panel contexts, scrollbars generally seem to work pretty well the overwhelming majority of users.
- Being able to get rid of one of the two scrollbars goes pretty far toward remedying the visual confusion and business of double scrollbars.
- If it's still too confusing, we could mitigate the visual issues through design of the column (for instance, separate it from the right edge by a few pixels and give it shadow to make it look like it is "popping down" from the menu or "popping up" from the bottom of the page). This isn't ideal, but seems like a smaller net price than framing page content, given the Chrome brokenness.