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

#498 Insert new comments without refrshing #725

Merged
merged 3 commits into from
Sep 12, 2023

Conversation

ajsosa
Copy link
Collaborator

@ajsosa ajsosa commented Sep 9, 2023

Pull Request Description

Added the ability to insert a comment into the comment tree without requiring a re-fetch of the post page.

  • If you are replying to a comment, the scroll position is maintained and your comment gets inserted directly under it.
  • If your comment is top level, it gets inserted at the very top and you are automatically scrolled to it.
  • Newly created comments get highlighted.
  • When creating comments in a comment context view, the highlighted comment gets switched to only the newly created comment. The show all comments button works as usual.

Issue Being Fixed

#498

Checklist

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

…ad of refreshing page. The newly created comment is also highlighted. When commenting from a comment context view, the highlighted comment changes to the newly created comment. If the comment is a top level comment, then it gets inserted at the very top and the scroll controller is then scrolled to the top. If the comment is a direct reply, it gets appended immediately under the parent and the scroll position is maintained.
@ajsosa ajsosa marked this pull request as draft September 9, 2023 22:37
@ajsosa ajsosa requested review from micahmo and hjiangsu September 9, 2023 22:39
@ajsosa
Copy link
Collaborator Author

ajsosa commented Sep 9, 2023

@micahmo @hjiangsu If you have the chance, please try running a build of this for a bit and do some commenting. I'm still testing this out myself to make sure I didn't break anything.

@hjiangsu hjiangsu marked this pull request as ready for review September 12, 2023 22:04
@hjiangsu hjiangsu merged commit 8e01ebd into thunder-app:develop Sep 12, 2023
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.

3 participants