retrospring icon indicating copy to clipboard operation
retrospring copied to clipboard

Profile page answers and question pages may get mixed up

Open arthurware opened this issue 3 years ago • 2 comments

Description:

The additional content that is loaded with the "load more" button may also load on a question page (the one which shows answers to a question).

Steps to reproduce:

Go to your profile page > scoll until the "load more" button appears > quickly touch the "n answers" button and the "load more" button.

Expected behaviour:

The question page should not load answers from different questions.

Observations:

This issue doesn't happen if you try to reproduce it from the main timeline, it's specific to the profile page.

Test setup:

Samsung galaxy A8 2018 (Android 9) Bromite 96.0

Screenshots:

Screenshot_20220117-182929_Bromite Screenshot_20220117-183105_Bromite

arthurware avatar Jan 17 '22 22:01 arthurware

That's an interesting bug, thanks for reporting.

From what I can tell this happens because the HTTP request that is made when clicking the Load more button does not get cancelled on a new page load. When that request completes its response is be appended to the #timeline or #answers div, depending on whether you're in the main timeline or an answers page (including the user profile).

I think it's theoretically possible to encounter this going from an answer page to a user profile, but in practice this very rarely happens due to profile pages being a bit more complex.

nilsding avatar Jan 17 '22 23:01 nilsding

I might be able to address this issue once I rework the frontend pagination logic, when I'm porting it away from CoffeeScript.

pixeldesu avatar Jan 17 '22 23:01 pixeldesu

I think with the Turbo Streams pagination I decreased the likelyhood of this happening quite a lot, this should be fine now.

pixeldesu avatar Dec 20 '22 23:12 pixeldesu