elk icon indicating copy to clipboard operation
elk copied to clipboard

Polls shown as unanswered when toot goes back in view

Open baptiste0928 opened this issue 3 years ago • 6 comments

Pre-Checks

  • [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
  • [X] Providing a screenshot or video to reproduce the issue or show visually what was meant.
  • [ ] I am willing to provide a PR.

Describe the bug

Steps to reproduce:

  • Submit an answer to a poll.
  • Scroll until the poll is out of view (and destroyed by the virtual list).
  • Scroll back to the poll.

The poll will be shown as unanswered even if it has been answered.

Reproduction video or screenshot

The video shows Elk alpha, I was able to reproduce the issue on Elk canary too.

elk-poll-bug.webm

Additional Context

No response

baptiste0928 avatar Jan 17 '23 10:01 baptiste0928

Solve in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@baptiste0928 I just noticed this issue in [email protected] and happy to see you created an issue. I'm happy to volunteer if you're busy.

lucas-homer avatar Jan 19 '23 03:01 lucas-homer

It's interesting. I ran the app locally, and looked at my own feed where I saw the poll, and this time the toot loaded in its poll results view, which is what we want, given I already voted earlier. I went back to my Elk.app where I experienced the issue, scrolled up again to the same poll in my timeline, where it'd become "fresh" again. So when I refreshed the page, it updated itself to the results-because-you-voted state. To me that suggests the issue might be around caching of the timeline, and the fact that a poll component should be an exception to the rule so we make sure to have the most current data. I'll keep investigating 😃

Update -- made a video on my side also reproducing the issue. Tl;Dw - page refresh updates the status.poll

lucas-homer avatar Jan 19 '23 03:01 lucas-homer

Does this still happen? Can't repro

boehs avatar Feb 04 '23 22:02 boehs