Page MenuHomePhabricator

Conpherence doesn't scroll to bottom in Durable Column regularly
Closed, ResolvedPublic

Description

I frequently have to scroll manually to see the last post in Durable Column, "Phacility" chat is a good example.

Event Timeline

chad raised the priority of this task from to Needs Triage.
chad updated the task description. (Show Details)
chad added a project: Conpherence.
chad added subscribers: chad, epriestley, btrahan.

This is probably:

  • we scroll;
  • an image loads;
  • scroll position is now somewhere in the middle of the thread.

What's interesting is the same thread scrolls fine in full Conpherence.

I can break it in full Conpherence if my browser window is narrow enough that the highlander macro is rescaled by the max-width: 100% rule.

Yeah I don't know how meme's are built. Is that really what's preventing this. It looked like we build a meme then store the img tag somewhere, and height and width aren't stored.

We make a request to /blah/?meme=x, which generates the appropriate image on the server side and redirects to it. The meme rule doesn't know anything about the underlying image.

The actual file (F337237) is a normal file, and the width and height are stored (see the "Info" tab).

We could make meme generation smarter, but we'll have the same problem after T4190, when we can't know the dimensions ahead of time. I think there are some other elements which can probably change height, as well, either now or in the future (e.g., voting on an embedded slowvote).

The fix is probably something like:

  • detect scroll events;
  • check if the content height has changed;
  • if it has, readjust the scroll position to stabilize the content.

We do this in Differential already, approximately, although we can't reuse the same code.

We'll also probably need to implement a rule where we don't scroll when new content shows up if you've manually scrolled up the thread. Currently, if you try to review old messages in an active thread, you may be repeatedly scrolled to the bottom of the column.

epriestley triaged this task as Normal priority.

This is still frequently glitchy for me.

I can get weird scrolling behavior right now in the column view when I select "General Chat". It scrolls to the bottom, then seems to scroll up a little, then back to the bottom. This happens each time I load the room in the column.

Did we ever end up with a good repro for this? My current test instance data seems to work well enough.

I kind of wonder if this got fixed by accident since it's been glitchy for me forever but seems fine at HEAD in my recent threads. Maybe just none have enough big images, though.

btrahan raised the priority of this task from Normal to High.May 7 2015, 8:26 PM

Been playing with this a bunch today. I was able to get a repro by doing the following:

  • send a few memes on thread X
  • navigate to full conpherence thread X - observe correct scroll
  • navigate to some other thread then back to thread X - observe incorrect scroll

My guess here is that since the images are cached in this repro case the "load" event never fires from D12191. I did some research and looks like this is indeed a problem and was addressed recently:

https://codereview.chromium.org/1047563002

Not so sure when that sort of thing would hit web browsers.

I haven't been able to get a repro in the durable column or otherwise in the full view.

btrahan lowered the priority of this task from High to Low.May 18 2015, 9:10 PM
chad removed btrahan as the assignee of this task.Jul 10 2016, 3:24 AM
chad claimed this task.

I can't break this any more, but if it pops up again can re-open.