La cronologia degli argomenti è influenzata dal valore non predefinito degli argomenti suggeriti

Lo metto in Contribute > Bug perché ritengo che questo stia impedendo l’uso normale di Discourse, ma potrebbe essere più adatto per Contribute > UX.

Ho iniziato a notare su uno dei miei siti (interno, quindi non posso condividere il link) che la cronologia degli argomenti era un po’ strana e ho iniziato a fare esperimenti per capire cosa stesse succedendo. Fondamentalmente, quando si usa la cronologia degli argomenti per andare a un post recente (ad esempio il 5° o il 6° su 6), i post non scorrevano come previsto e il post a cui ero arrivato non era effettivamente visibile. Non sono riuscito a riprodurre il problema su Meta o Stonehearth, né nel mio ambiente di sviluppo, quindi ho iniziato a esaminare le differenze tra i siti. Alla fine ho capito che sul mio sito i «argomenti suggeriti» sono «disabilitati» (suggested topics = 0), mentre su Meta, Stonehearth e nell’ambiente di sviluppo non lo sono. Dopo aver disabilitato gli argomenti suggeriti nell’ambiente di sviluppo sono riuscito a riprodurre il problema.

@eviltrout, lo scorrimento della cronologia degli argomenti presuppone che ci siano argomenti suggeriti?

Video del problema:

Predefinito - 5 argomenti suggeriti:

0 argomenti suggeriti:

20 argomenti suggeriti:

3 Mi Piace

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

6 Mi Piace

This should fix it:

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

5 Mi Piace

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 Mi Piace

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 Mi Piace

Happy to test once this reaches tests_passed!

1 Mi Piace

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.