12

In the Android app, it's very challenging to horizontally scroll a code block (or news feed) because with a little bit of vertical motion it switches to vertical scrolling and won't switch back. Scrolling should not be challenging.

Maybe some of you folks with steadier hands don't notice this but I find it very frustrating.

Can you please fix it to do free 2D scrolling rather than 1D with vertical capturing? Or, second best, give it a significant vertical tolerance before capture?

Edit: App version 1.0.56 on Android Lollipop 5.0.1 on Nexus 5.

10
  • 1
    Heard you the first time:) Commented Feb 12, 2015 at 18:38
  • 1
    Did you forget that you posted this question 15 minutes earlier? Commented Feb 12, 2015 at 18:40
  • 3
    No. The post have an error message. I gave it several minutes but still couldn't see the post. I tried again. Same result. Gave up. Your comment provided a notification which is the first indication that either post went in.
    – Jerry101
    Commented Feb 12, 2015 at 18:42
  • I still can't see either post except via your notification. Thanks, @martinjames !
    – Jerry101
    Commented Feb 12, 2015 at 18:45
  • 3
    Your interwebs are even more screwed up than mine:( Commented Feb 12, 2015 at 18:55
  • 1
    @AndrewT. When you scroll, say, a code block horizontally it only works if you move your finger perfectly horizontally. Any vertical motion switches it to vertical scrolling, locking the horizontal position. This is different form the bug you linked. I get it on my nexus 6. App version is 1.0.56.
    – DanielST
    Commented Feb 13, 2015 at 15:17
  • Also, it's not particularly annoying for me but I could see how it could be for some people. I'd label this as a usability issue instead of a bug.
    – DanielST
    Commented Feb 13, 2015 at 15:18
  • 2
    Actually I just tried it out again and it is incredibly annoying. No idea how I hadn't noticed it before.
    – DanielST
    Commented Feb 13, 2015 at 15:26
  • Thanks @andrewt . I added the version info. And it is a different scrolling bug.
    – Jerry101
    Commented Feb 13, 2015 at 17:33
  • Moved this over to Meta.SE, sorry for the confusion. Commented Feb 13, 2015 at 19:21

1 Answer 1

6

Update: As of version 1.0.57 (coming out later today) this is fixed. You can now scroll horizontally on code blocks or tap on them to view them in the bigger view, and a minor swipe up or down while you're scrolling the code block won't cause a "jump" movement.


Story time:

Originally viewing a question and answer page in our application looked like this:

Question and Answer view

Questions and answers were separated by tabs that you could swipe to switch between. As a result, trying to scroll a code block horizontally lead to a collision with the base view's horizontal scrolling for switching between the two. So, we made code blocks clickable to open them in a new overlay where this wouldn't be an issue. That's what the little triangle on the top right represents.

As of a few months ago, answers are now below questions like they are on the sites. When we made this change however, we forgot to go back and think about the process that had resulted in what we have for code block functionality. The current ability to horizontal slide a little in the code blocks is actually a bug, looking at the code you can see what's causing it:

    String blockOverflowValue = allowBlockScrolling ? "auto" : "hidden";
    String defaultStyle = "<style>html { -webkit-text-size-adjust: none; font-family: Helvetica; font-size: " + fontSize + "; }\n" +
                          "body { padding: 0; margin: 0; }\n";
    if (allowBlockScrolling)
        defaultStyle += "pre, blockquote { -webkit-overflow-scrolling: touch; overflow: " + blockOverflowValue + "; background-color: #eee; }\n";

allowBlockScrolling is a parameter that's set for views that should be scrollable (e.g. looking at a code block in the post-click overlay view), but as you can see when that is set to false (as it is for the base question & answer views) we are actually not setting anything to make the code not scrollable, which is causing the weird functionality of small jump-like scrolls you are seeing.

So, the code is currently trying to stop horizontal sliding on all code blocks but due to that bug it's failing and causing what's happening here, but you know what: Now that we don't have the collision with the Q&A tabs you should be able to horizontally scroll code blocks.

This is what I'm working on right now. As of the next update (1.0.57+) you will be able to seamlessly scroll code blocks while viewing a question, and if you would like you can still tap them to view a bigger-screen version of the code in an overlay.

4
  • Right on! Should I accept this "answer" (design) now or wait until I can verify the released fix? (Bug tracking != Q&A.)
    – Jerry101
    Commented Feb 13, 2015 at 19:50
  • @Jerry101 I'll wait until I finish my fix to mark this question with the status-completed tag, then you can mark this as accepted after you've seen it in action (hopefully later today or by Monday) Commented Feb 13, 2015 at 19:52
  • 1
    The fix is in and it's very pleasant indeed.
    – Jerry101
    Commented Feb 16, 2015 at 23:46
  • Glad to hear it :) Commented Feb 17, 2015 at 1:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .