Topic timeline is affected by non-default suggested topics value


(Joshua Rosenfeld) #1

Putting this in #bug as I feel this is preventing the normal use of Discourse, but it may be a better fit for #ux.

I started noticing on one of my sites (internal, so I can’t share a link) that the topic timeline was a bit wonky, and started playing around to try and figure out what was going on. Essentially when using the topic timeline to go to a recent post (like 5 or 6 out of 6) the posts would not scroll as expected, and the post that I scrolled to would not actually be visible. I couldn’t reproduce this on Meta or Stonehearth, nor in my development environment, so I started looking into what was different between the sites. I eventually realized that my site has suggested topics “disabled” (suggested topics = 0), while Meta, Stonehearth, and dev do not. After disabling suggested topics on dev I could reproduce the issue.

@eviltrout, does the topic timeline scrolling assume that there are suggested topics?

Videos of the issue:

Default - 5 suggested topics:

0 suggested topics:

20 suggested topics:


(Robin Ward) #2

It very well could be a bug! I’ll look into it.


(Robin Ward) #4

This should fix it:


(Robin Ward) #5

(Robin Ward) #6

(Robin Ward) #7

I’m re-opening this for now. Unfortunately my fix broke scrolling on meta a bit so I reverted it. I’ll have to come up with a more robust solution.


(Robin Ward) #9

Okay, I think this fixes it for good. This is surprisingly complicated stuff to get right.

@jomaxro could you confirm it’s working for you?


(Joshua Rosenfeld) #10

Happy to test once this reaches tests_passed!


(Joshua Rosenfeld) #11

I hate to say this, but it’s “mostly” working. Just tested in the two topics I shared with you via PM. They both load correctly now (showing the last post) and using the timeline to go from a post to the last one work, but the timeline itself is very finicky.

Entering a fully read topic results in the browser being scrolled fully, but the timeline is not.

Also, moving via the timeline is incredibly jumpy. In topic 8022, moving the timeline to post 4 results in the timeline jumping to post 2 upon release. Post 3 also jumps to post 2. Post 5 jumps to post 6…etc.

Happy to change the password back if you’d like…


(Jeff Atwood) #12

I would rather force everyone to use suggested topics rather than spend days of engineering effort on this unusual non-default settings scenario.

That said there are other places where suggested may not be there, such as PMs.


(Jeff Atwood) #13