Rich Previews cause timeline to shift
in progress
T
Tristan Harward
For rich link previews, I have a couple problems, but the main one is the animations.
The animations here are actually detracting from the experience and are very annoying. They make the page slide up and down as you scroll, and make content unpredictable. It's almost nauseating trying to read my feed as blocks are animating in and out as I scroll.
Just pop them instantly. No need for the animation.
The other thing that would help here is to just keep them in the DOM after they're added rather than removing them. By removing them, it causes the page to jump when I scroll, and makes the content even less predictable. It's okay if it rearranges on loading, but the removal of such a large element when trying to read a page is jarring.
So in summary:
- Remove animations for inline rich link previews
- Just keep them in the DOM, don't remove
You could make either/both of these options at your discretion but I expect you'll want to be opinionated.
Thank you!
Jared Zimmerman
in progress
Jared Zimmerman
planned
Jared Zimmerman
Hi Tristan Harward the way Mastodon is built posts are addressable by the DOM when they're off screen, each have their own ID, and the detection of external link posts (distinct from reposts) all has a bit of latency that is unavoidable, originally I did not have an animation, but the size of the posts would still enlarge if they were detected to be rich embeds, since this can't happen before the post "exists" in the timeline the size jump can't be avoided. The animation is less distracting than the "pop" that was there before the animation.
I have some ideas about how to hack it, but much of it is limited to how Mastodon works.
T
Tristan Harward
Jared Zimmerman: that makes total sense. I figured it was harder than it looks! I’ve done some things with scrolling position before where it predicts the height of the page that would change and adjusts the scrollY of the scrolling container to compensate. Maybe something like that would work! Good luck.
Jared Zimmerman
Tristan Harward: unfortunately due to not knowing if a link is a external website, another mastodon profile or post, or a link with no preview content available, there is now way to pre-reserve the right amount of height ahead of time.
T
Tristan Harward
Jared Zimmerman: that might be true. You don’t need to prereserve any space or predict anything however, just measure before it is inserted into the DOM and then adjust the scroll position accordingly. I realize it’s more complicated than that and technically challenging, but it should be possible.
Is graze open source? I could have a play around with it.
Jared Zimmerman
Tristan Harward: https://faqabout.me/iam/graze#q-is-graze-open-source-software-4901
T
Tristan Harward
Jared Zimmerman: Completely understand and agree; I may still try to hack around in the extension source and will let you know if I come up with something. Cheers.