A linha do tempo do tópico é afetada pelo valor não padrão de tópicos sugeridos

Colocando isso em Contribute > Bug, pois sinto que isso está impedindo o uso normal do Discourse, mas pode ser mais adequado para Contribute > UX.

Comecei a notar em um dos meus sites (interno, então não posso compartilhar o link) que a linha do tempo do tópico estava um pouco estranha e comecei a brincar para tentar descobrir o que estava acontecendo. Basicamente, ao usar a linha do tempo do tópico para ir a uma postagem recente (como a 5ª ou 6ª de 6), as postagens não rolavam como esperado, e a postagem para a qual rolei não ficava visível. Não consegui reproduzir isso no Meta ou no Stonehearth, nem no meu ambiente de desenvolvimento, então comecei a investigar o que era diferente entre os sites. Acabei percebendo que meu site tem os tópicos sugeridos “desativados” (suggested topics = 0), enquanto Meta, Stonehearth e dev não. Após desativar os tópicos sugeridos no dev, consegui reproduzir o problema.

@eviltrout, a rolagem da linha do tempo do tópico pressupõe que existam tópicos sugeridos?

Vídeos do problema:

Padrão - 5 tópicos sugeridos:

0 tópicos sugeridos:

20 tópicos sugeridos:

3 curtidas

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

6 curtidas

This should fix it:

https://github.com/discourse/discourse/commit/4e1f8ec72b791006fca7c6c3347c8347d27e4dc6

5 curtidas

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.

1 curtida

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?

https://github.com/discourse/discourse/commit/cb8f91ca215a5dc85a771b3691b334a89c54664a

4 curtidas

Happy to test once this reaches tests_passed!

1 curtida

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…

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.