SchweizerischeBundesbahnen/scion-workbench

Provide dialog component for displaying a component or microfrontend

danielwiehl opened this issue · 0 comments

Is your feature request related to a problem? Please describe.

The workbench supports displaying content in a popup or message box but not in a dialog. A dialog differs from a popup in that it blocks its referer (or the entire application), is movable, and does not close when clicking outside its bounds. A message box is a specialization of a dialog. Unlike a dialog, the content and appearance of a message box are typically controlled by the message box opener.

Describe the solution you'd like

The workbench provides API for opening a component or microfrontend in a dialog.

General Requirements:

  • is either view-modal or application-modal;
  • can be moved (similar to the message box);
  • multiple dialogs are stacked (similar to the message box);
  • is centered in its modality context (similar to the message box);
  • provides a header to display a title (drag handle);
  • provides an optional area to display actions (button bar);
  • can be closed using the "X" in the upper right corner (if closable)
  • supports passing an input and returning an output
  • Sticks to the referring view (if view-modal)

Microfrontend-Related Requirements:

  • can be provided as a dialog capability to display a microfrontend;
  • title and size can be declared in the dialog capability (similar to popup capability);
  • URL is not persisted (similar to popup)
  • host can also provide a dialog capability (similar to popup capability);

Additional context

Consider refactoring the message box implementation based on the new dialog component.