Signal-Android icon indicating copy to clipboard operation
Signal-Android copied to clipboard

Scrolling through pics in a chat sometimes overlaps them

Open sailbird opened this issue 2 years ago • 8 comments

  • [x] I have searched open and closed issues for duplicates
  • [x] I am submitting a bug report for existing functionality that does not work as intended
  • [x] I have read https://github.com/signalapp/Signal-Android/wiki/Submitting-useful-bug-reports
  • [x] This isn't a feature request or a discussion topic

Bug description

Describe here the issue that you are experiencing.

Sometimes when you try to scroll through the pics in a chat, the scroll to the next pic happens before the previous pic has been completely displayed from edge to edge. It's more like sifting through overlapping pics dropped on a desk, than scrolling from pic to pic on a film reel.

Steps to reproduce

  • using hyphens as bullet points
  • list the steps
  • that reproduce the bug

I still can't seem to nail this down. Maybe the behavior is activated by some subtle nuance in the usual swiping gesture. It happens often enough that I encounter it roughly daily. If this is supposed to be a feature, then I can't imagine what purpose it would serve, and at least a Preferences setting to turn it off would be helpful.

This might be easier to reproduce if you're trying to zoom the current pic. When I try to zoom the corners of the current pic, it annoyingly starts sliding to the adjacent pic. While I wish I could disable that behavior somehow, it seems like that's the intended design. But the point is that this overlap issue might happen more readily under such conditions. Again, it's so random that I can't be more precise.

Actual result: Describe here what happens after you run the steps above (i.e. the buggy behaviour)

You see some horizontal fraction of the current pic in the chat. Then suddenly the next pic (or previous one, depending on swipe direction) just overlaps it and scrolls over it.

Expected result: Describe here what should happen after you run the steps above (i.e. what would be the correct behaviour)

Let me see the entire pic before you overwrite it with the next one.

Device info

Device: Android 12

Signal version: Latest

sailbird avatar Sep 08 '23 13:09 sailbird

I've been unable to reproduce on any of my devices. Would you mind sharing what device you're using specifically? Uploading a debug log (https://support.signal.org/hc/en-us/articles/360007318591-Debug-Logs-and-Crash-Reports#android_debug) and including the URL here is the best way to give us device info.

And if you're able to figure out how to consistently reproduce this (or even record a video), that would be very helpful as well!

nicholas-signal avatar Sep 11 '23 21:09 nicholas-signal

And if you're able to figure out how to consistently reproduce this (or even record a video), that would be very helpful as well!

It just happened again earlier today but now everything's fine. Next time it occurs I'll try to be much more attentive to the exact photos and my precise gestures. No promises on providing deanonymizing side channel info, but I'll try to help you nail this. Please leave this issue open. With any luck, I should hit it a few times a month.

sailbird avatar Sep 21 '23 00:09 sailbird

@nicholas-signal I have 2 screenshots now. One is a screenshot of a photo of a room, as displayed in Signal. The other is a screenshot of being halfway through a horizontal scroll from that room to the next photo. In the second screenshot, the room is exiting to the right and the next photo is entering from the left. If you compare the 2 screenshots, it's obvious that about 20% of the room's leftmost side is being cut off. It's not actually true that the incoming photo is overlapping it, as I can see a clear black gap between them. It's just that the leftmost side of the exiting photo is getting clipped.

I was really lucky that I even managed to screenshot it. This is possible because the screenshot is activated by buttons, so I could freeze my scrolling gesture at the same time. After the fact, I tried everything I could think of in order to make it happen again, but everything behaved correctly.

I think there's a weird gesture corner case that's doing this, like where the scrolling process gets interrupted by another request to scroll starting from a slightly unequal position. I'm just speculating here, but it would be really hard to make it happen in any other way. Maybe your photo scrolling process was somehow designed reentrantly by mistake?

sailbird avatar Oct 05 '23 19:10 sailbird

If you're comfortable with sharing them, those screenshots would be very helpful in letting me wrap my head around the issue. Would you be able to submit them at the URL below and mention this github issue and my name? Thanks!

https://support.signal.org/hc/requests/new

nicholas-signal avatar Oct 06 '23 22:10 nicholas-signal

@nicholas-signal I can't send you the actual screenshot, but I did a mockup of the situation from some map images I captured. I uploaded them to you via your link and put a permalink to your request as the description. They are PNGs but the original images were JPGs, if it matters. North America is the first photo and South America is the second photo. I cut off essentially the same number of pixels of North America as the actual room photo had cut off in the process of the leftward photo roll scroll within the chat context. The image width is unmodified but the height is wrong and probably irrelevant.

sailbird avatar Oct 10 '23 20:10 sailbird

Also, I went back to the original images and I can confirm that, in the second screenshot, the truncated leftside pixels of North America are not explained by the black divider strip between North America and South America. The divider is definitely thinner than would be necessary to cover all of the truncated pixels, were both images concatenated horizontally, so this is not a simple paintover issue.

sailbird avatar Oct 10 '23 20:10 sailbird

I think I've finally figured out how this happens. This is more than necessary but it will suffice to reproduce the bug.

  1. Send a bunch of photos to another phone with Signal Android, one at a time so they're not part of the same photo set. Make sure all the photos exceed the vertical and horizontal dimensions of the screen.

  2. On the receiving phone, scroll down to the middle photo. Zoom it so that you're only seeing a subset of the photo both vertically and horizontally. You need to view the interior of the photo, such that none of the edges are visible.

  3. Use your thumb to scroll to the left. You can remove your thumb and keep scrolling if the distance is too far for one flick. Eventually you'll see a thick black vertical divider which separates it from the previous photo.

  4. Now, as soon as you see even the edge of that black divider, do not remove your thumb from the screen! Instead, keep scrolling until the entire width of the divider is visible.

  5. Still keeping your thumb on the screen, reverse and scroll to the right.

  6. Suddenly, the image gets sliced vertically. You will see a new black divider separating the current photo from the next one, which has therefore occurred inappropriately soon.

To fix this, I would suggest making it work like the standard Android Gallery app, which would at least merge 2 learning processes into one. The rules seem to be as follows:

  1. If you are not zoomed, you can scroll left or right to previous or next photos, respectively.

  2. If you are zoomed, you are blocked from scrolling to other photos in either direction until you fully unzoom.

While it's not the easiest thing to discover this policy organically, if you really want a "quiet" UI that leaves the user with no clue how to go left, go back, or unzoom, then you might as well copy this same policy. It's very annoying when I'm trying to zoom up and inspect a photo, and as soon as I look at one of the edges, it just flips to another photo. At least Gallery doesn't do that.

sailbird avatar Apr 06 '24 06:04 sailbird

Same here. On different phones (POCO F2 Pro, Pixel 6a, Pixel 6). I think this is caused by Android's fling gesture. It is super annoying. If you slowly pan left and right it will open the next photo. If you "flick" in a short but fast motion, the photo will glide to the side like when moving cards over a table. That gesture allows you to go to the very borders of the photo. But it is not useful to move to an exact position.

This is connected to some thresholds of the gesture length, direction and speed. The are somehow calculated from display dimensions and resolution and might be different from device to device. That's why it may occur on some devices but not others.

It would be great to be able to simply deactivate navigating to the next photo when having zoomed in.

See the attached images. As you can see in the lower one, the photo is continuing after that construction. But in the upper one it is already turning to the previous photo.

Screenshot_20240623-121052_1 Screenshot_20240623-121006_1

PS: this is only happening on the first zoom level, not the second. There you have to pan to the border first. That would be desirable for the first level, too.

limbusdev avatar Jun 22 '24 21:06 limbusdev