-
Notifications
You must be signed in to change notification settings - Fork 60
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
Allow moderators to remove events #552
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Also, display a vertical ellipsis when hovering over the button to indicate the clicking on it will bring up dropdown menu.
When an event is selected, user focus is enabled to darken the chat output underneath the event. However, because of how menus work, clicking on the button to open the event's action menu immediately dismisses the event. Reworking the markup and styles such that the selected event's container provides its own background fixes the issue. Now, clicking the container's background is the only way to dismiss the event.
This setup is necessary to allow the event bar to clear an event's progress bar update interval. Clearing the interval is necessary when the event is removed prior to its expiration.
Removing an event broadcasts a new `PAIDEVENTS` message without the removed event. The previous implementation did not clear the event bar, first, which made it seem like the removal had no effect.
`contains()` doesn't consider an event removed if it's still in the DOM. It isn't removed from the DOM until its remove animation is complete. When coupled with `add()` checking if an event already exists before adding it to the DOM, this can result in `replaceEvents()` simply removing all events from the event bar. Reworking `contains()` to use the `events` array to determine if an event already exists instead fixes the issue. This also disables animations when replacing events, which can look odd when the new `PAIDEVENTS` payload contains old events.
The `PAIDEVENTS` payload will contain all the events in history.
The event enter animation had a higher specificity than the remove animation, which meant the remove animation never took effect. Simply flipping the order of the two rulesets fixes the issue.
vyneer
approved these changes
Nov 13, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.