-
-
Notifications
You must be signed in to change notification settings - Fork 275
Description
We currently have a significant number of events that trigger opening a dialog – e.g. shutdown-dialog-requested, update-dialog-requested, etc. We also currently register these events at <menu-bar> level, not at document level.
The downsides of this are that it’s hard to keep track of all these individual event ids (which we must ensure are globally unique), and that we cannot trivially trigger a dialog from anywhere outside the <menu-bar> (e.g., from another dialog). See discussion at #1860.
So we could consolidate all those ...-dialog-requested events into a single DialogRequestedEvent that would live in events.js. That way, we reduce the overall number of event ids that we have to manage, and we can simplify our event handler registration code.
When we do this, we should also refactor any places outside of app.js where we reference the <menu-bar> to inject events directly – such as in the <wifi-dialog>.