You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>.
The text was updated successfully, but these errors were encountered:
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 atdocument
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 singleDialogRequestedEvent
that would live inevents.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>
.The text was updated successfully, but these errors were encountered: