Remove `EventType` enum
Just use the event name strings directly. The fire() util functions
provide full type safety, and there is nothing to be gained by
collecting all event names in one global enum. It is much more
convenient to search for an event name and to rely on finding
all listeners and dispatchers in one search.
Release-Notes: skip
Change-Id: I18b95d72dcb3afdd40541303285a9385a8aae9ff
diff --git a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.ts b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.ts
index 622c996..36ac307 100644
--- a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.ts
+++ b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.ts
@@ -85,7 +85,6 @@
getVotingRange,
StandardLabels,
} from '../../../utils/label-util';
-import {EventType} from '../../../types/events';
import {
ActionPriority,
ActionType,
@@ -1950,7 +1949,7 @@
.fetchChangeUpdates(change)
.then(result => {
if (!result.isLatest) {
- fire(this, EventType.SHOW_ALERT, {
+ fire(this, 'show-alert', {
message:
'Cannot set label: a newer patch has been ' +
'uploaded to this change.',