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: Threaded reply input does not immediately close #9652

Merged
merged 1 commit into from
Apr 18, 2024

Conversation

Dschoordsch
Copy link
Contributor

Description

Fixes #9650

When replying a local update is commited to the store. This happened in the mouse event handler and is propagated to other components before the event handling of the click finished. This caused the useClickAway handler to fire for the same click event and revert the store update immediately. There are two ways to fix this, stop propagating the event or do

Demo

Screen.Recording.2024-04-17.at.10.53.51.mov

Testing scenarios

  • start a discussion thread and play around with the reply button

Final checklist

  • I checked the code review guidelines
  • I have added Metrics Representative as reviewer(s) if my PR invovles metrics/data/analytics related changes
  • I have performed a self-review of my code, the same way I'd do it for any other team member
  • I have tested all cases I listed in the testing scenarios and I haven't found any issues or regressions
  • Whenever I took a non-obvious choice I added a comment explaining why I did it this way
  • I added the label Skip Maintainer Review Indicating the PR only requires reviewer review and can be merged right after it's approved if the PR introduces only minor changes, does not contain any architectural changes or does not introduce any new patterns and I think one review is sufficient'
  • PR title is human readable and could be used in changelog

When replying a local update is commited to the store. This happened in
the mouse event handler and is propagated to other components before the
event handling of the click finished. This caused the `useClickAway`
handler to fire for the same click event and revert the store update
immediately. There are two ways to fix this, stop propagating the event
or do the store update after the event handler via setImmediate. I chose
the former.
@Dschoordsch Dschoordsch merged commit 9944ac0 into master Apr 18, 2024
6 checks passed
@Dschoordsch Dschoordsch deleted the fix/9650/fixDiscussionReplyThreads branch April 18, 2024 07:29
@github-actions github-actions bot mentioned this pull request Apr 25, 2024
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Discussion threads, Reply no longer threads
2 participants