Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue marking multiple replies as read #1305

Merged
merged 2 commits into from
Apr 17, 2024

Conversation

micahmo
Copy link
Member

@micahmo micahmo commented Apr 15, 2024

Pull Request Description

This PR fixes an issue with marking multiple replies as read in quick succession, especially on a slow network.

Review without whitespace.

Issue Being Fixed

Issue Number: N/A

Screenshots / Recordings

Before

mark-read-before.mp4

After

mark-read-after.mp4

Checklist

  • Did you update CHANGELOG.md?
  • Did you use localized strings where applicable?
  • Did you add semanticLabels where applicable for accessibility?

Copy link
Member

@hjiangsu hjiangsu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I would like to eventually refactor this so that it matches the conventions we have for other parts of the app (e.g., optimistic actions).

@micahmo
Copy link
Member Author

micahmo commented Apr 17, 2024

Fixed merge conflicts!

I would like to eventually refactor this so that it matches the conventions we have for other parts of the app (e.g., optimistic actions).

I've been thinking about this as well and wondering if we should do the opposite (show a loading indicator when performing an action until it completes successfully). I guess the problem with optimistic updating is that there's not a great way to tell the user if it failed. For example, if they upvote a post and scroll on, they might never know that it reverted. Anyway, something to think about.

@hjiangsu
Copy link
Member

I guess the problem with optimistic updating is that there's not a great way to tell the user if it failed.

You do have a point here - I'd like to eventually add an automatic retry feature (using exponential backoff perhaps) if an action does fail to hopefully reduce these situations. Additionally, we could also add a "system" notification area which shows any errors that occurred with regards to user actions, etc.

The main concern with showing loading indicators is that it makes everything feel "slow" because you have to wait for the network request to complete before updating the status.

@hjiangsu hjiangsu merged commit 37910e9 into thunder-app:develop Apr 17, 2024
1 check passed
@micahmo micahmo deleted the fix/mark-read branch April 17, 2024 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants