aurelia / dialog

A dialog plugin for Aurelia.
MIT License
106 stars 115 forks source link

feat(all): support non-modal dialogs #350

Closed StrahilKazlachev closed 4 years ago

StrahilKazlachev commented 6 years ago

I'm proposing to support non-modal dialogs - the native dialogs support it.

  1. A modal dialog is always on top(visually)
    • Renderers will have to append any non-modal dialog before existing modal ones in the host
    • the DialogService .controllers property will still keep the controllers in the order they were open
  2. Introduce a focused concept - the dialog the user is currently interacting with(accepting naming propositions)
    • apply actions on the focused dialog
      • whether or not and on which dialog, to apply the keyboard actions when there are only non-modal dialogs
    • the top modal dialog is always the focused
    • when there are no modal dialogs open there may or may not be a focused dialog

Did just minor changes to start a discussion. @EisenbergEffect @PWKad what do you think?

bigopon commented 6 years ago

Would be nice if we could expose the focus state on dialog controller, so that non blocking dialogs can leverage it to set proper z index

davismj commented 6 years ago

http://davismj.me/blog/easy-dialog/