-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide dialog component for displaying a component or microfrontend #488
Projects
Milestone
Comments
17 tasks
This was referenced Nov 23, 2023
17 tasks
17 tasks
danielwiehl
pushed a commit
that referenced
this issue
May 21, 2024
… message box A micro application can provide a microfrontend for display in a workbench message box. Message box microfrontends are contributed in the form of capabilities. **Provide a microfrontend message box capability as follows:** ```json { "type": "messagebox", "qualifier": { "confirmation": "unsaved-changes" }, "params": [{"name": "changes", "required": true}], "properties": { "path": "path/to/message-box", "size": {"height": "200px", "width": "250px"} } } ``` **Open a microfrontend message box capability as follows:** ```ts inject(WorkbenchMessageBoxService).open({confirmation: 'unsaved-changes'}, { title: 'Unsaved Changes', params: {changes: ['change 1', 'change 2']}, actions: {yes: 'Yes', no: 'No'}, }); ``` Closes #488 BREAKING CHANGE: The signature of the `WorkbenchMessageBoxService#open` method has changed. To migrate - To display a text message, pass the message as the first argument, not via the `content` property in the options. - To display a custom message box, pass the qualifier as the first argument and options, if any, as the second argument. **Example migration to display a text message** ```ts // Before Migration inject(WorkbenchMessageBoxService).open({ content: 'Do you want to continue?', actions: {yes: 'Yes', no: 'No'}, }); // After Migration inject(WorkbenchMessageBoxService).open('Do you want to continue?', { actions: {yes: 'Yes', no: 'No'}, }); ``` **Example migration to open a custom message box capability** ```ts // Before Migration inject(WorkbenchMessageBoxService).open({ title: 'Unsaved Changes', params: {changes: ['change 1', 'change 2']}, actions: {yes: 'Yes', no: 'No'}, }, {confirmation: 'unsaved-changes'}, ); // After Migration inject(WorkbenchMessageBoxService).open({confirmation: 'unsaved-changes'}, { title: 'Unsaved Changes', params: {changes: ['change 1', 'change 2']}, actions: {yes: 'Yes', no: 'No'}, }); ```
danielwiehl
pushed a commit
that referenced
this issue
May 21, 2024
… message box A micro application can provide a microfrontend for display in a workbench message box. Message box microfrontends are contributed in the form of capabilities. **Provide a microfrontend message box capability as follows:** ```json { "type": "messagebox", "qualifier": { "confirmation": "unsaved-changes" }, "params": [{"name": "changes", "required": true}], "properties": { "path": "path/to/message-box", "size": {"height": "200px", "width": "250px"} } } ``` **Open a microfrontend message box capability as follows:** ```ts inject(WorkbenchMessageBoxService).open({confirmation: 'unsaved-changes'}, { title: 'Unsaved Changes', params: {changes: ['change 1', 'change 2']}, actions: {yes: 'Yes', no: 'No'}, }); ``` Closes #488 BREAKING CHANGE: The signature of the `WorkbenchMessageBoxService#open` method has changed. To migrate: - To display a text message, pass the message as the first argument, not via the `content` property in the options. - To display a custom message box, pass the qualifier as the first argument and options, if any, as the second argument. **Example migration to display a text message** ```ts // Before Migration inject(WorkbenchMessageBoxService).open({ content: 'Do you want to continue?', actions: {yes: 'Yes', no: 'No'}, }); // After Migration inject(WorkbenchMessageBoxService).open('Do you want to continue?', { actions: {yes: 'Yes', no: 'No'}, }); ``` **Example migration to open a custom message box capability** ```ts // Before Migration inject(WorkbenchMessageBoxService).open({ title: 'Unsaved Changes', params: {changes: ['change 1', 'change 2']}, actions: {yes: 'Yes', no: 'No'}, }, {confirmation: 'unsaved-changes'}, ); // After Migration inject(WorkbenchMessageBoxService).open({confirmation: 'unsaved-changes'}, { title: 'Unsaved Changes', params: {changes: ['change 1', 'change 2']}, actions: {yes: 'Yes', no: 'No'}, }); ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
Microfrontend-Related Requirements:
Additional context
Consider refactoring the message box implementation based on the new dialog component.
The text was updated successfully, but these errors were encountered: