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

Allow moderators to remove events #552

Merged
merged 14 commits into from
Nov 14, 2024
Merged

Allow moderators to remove events #552

merged 14 commits into from
Nov 14, 2024

Conversation

11k
Copy link
Contributor

@11k 11k commented Nov 11, 2024

No description provided.

11k added 6 commits November 11, 2024 15:24
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.
@11k 11k added the enhancement New feature or request label Nov 11, 2024
@11k 11k requested a review from vyneer November 12, 2024 00:06
11k added 6 commits November 12, 2024 18:28
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.
@11k 11k merged commit 6a8c7e4 into master Nov 14, 2024
2 checks passed
@11k 11k deleted the feat/event-bar-remove branch November 14, 2024 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants