r/Devvit • u/Drunken_Economist • 4d ago
Bug [android bug] If devvit app creates a custom post with `height` options for both `TALL` and `REGULAR`, the layout shifts breaks the ability to scroll back up from the comments for users in the reddit native android app
Android reddit app build 2023.48.0.2648001 on Pixel 11 Pro XL
Steps to reproduce:
- install a devvit app that supports multiple
heightoptions for the custom post style (eg the pinned-hub app or NFL Goalpost) - in the devvit app settings, select the option for shorter layout (312px)1
- create a custom post with the devvit app and add some comments on the thread
- scroll down in the comments thread without tapping/interacting with the devvit app's content2
- scroll back up to the post
Expected: smooth scrolling and the post appears in the viewport again
Actual: when the upwards scrolling reaches the post, the comment section snaps upward in the layout repeatedly, preventing further scroll
You can see an example thread of this bug in this thread
1 the bug does not occur when the custom post uses the tallest layout available in the settings
2 the bug does not occur if the user interacts with the devvit app in the custom post before scrolling
My guess is that the reddit android app unloads the devvit custom post when the user scrolls down.
When the user scrolls back up, it tries to load the custom post again and reserves the 512px "tall" space. Then it loads in the post which is only 320px, so it updates the post height and shifts the comments up in the layout by 192px
•
u/flair-auto-responder 4d ago
Bug report requirements
Hi u/Drunken_Economist!
We require all bug submissions to include the following information. Please make sure you’re following this format, or your post may be removed:
Describe the bug
Provide a clear and concise description of the bug.
Steps to reproduce
Expected behavior
Explain clearly what you expected to happen instead.
Screenshots or recordings
If applicable, include screenshots or a screen recording that demonstrates the problem. Please remove any sensitive or personal information first.
Desktop information
Mobile information
Additional context
Add any other details that might help reproduce or diagnose the problem.
You can edit your post to add any missing information.
Post: https://www.reddit.com/r/Devvit/comments/1y9iqnp/android_bug_if_devvit_app_creates_a_custom_post/
2
u/Drunken_Economist 4d ago
shout out to u/re-verse for helping me track down the details of this bug :)