-
Notifications
You must be signed in to change notification settings - Fork 8
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
Implement Nimble dialog #378
Comments
@jattasNI @rajsite I can't decide what would be the best approach for this low-level component in nimble. Having a programmatic approach (eg using a Alternatively we can just use an Maybe we can have a hybrid, where we provide a very basic dialog in nimble, and implement a wrapper in systemlink-lib-angular that know where to dynamically create the component. |
@fredvisser @jattasNI Is there any wild/rough estimate on when anyone could start working on this? I assume we should also involve POs and UX experts when creating a new component - AFAIK we do not have specs for a dialog and all the related behaviors This is not super urgent so I don't want to pressure you but we want to know how much to invest in alternate short-term solutions |
@gergo-papp @fredvisser as we discussed in the UI WG today, we won't get to set the priority for this until next iteration at the earliest. To unblock your team you're welcome to temporarily use a different component. |
Consider using |
Needs some design/interactions guidance before we can really implement this. We presumably want nice support for common use cases like an info popup and a confirmation popup. But how much flexibility do we want to give, e.g. number, appearance, and labels of buttons? Do we want to support a fully customizable dialog, starting from a blank panel? UX/design may dictate that some of these things should stay constant/consistent. And the flexibility we expose to users will affect how we implement things, e.g. via slots or attributes. |
From what I saw there is always a header/title, and a primary (and optionally secondary) buttons. The content of the dialog can them be projected - eg a client might want to show a checkbox or display additional infromation in a paragraph |
I believe the solution for this, as used by AM experimental (MDC), is portal outlets. Angular components work with HTML slots, so a portal is used to dynamically inject an Angular component into the dialog slot(s). We'll see what Mert's PR produces, but I've worked with portals extensively and can probably create the service if need be whether it lives in Nimble or the shared lib. I think portals use ViewContainerRef.createComponent, so that's also probably an option as well. |
@m-akinc, shouldn't this issue stay open until we have Angular & Blazor support for the dialog (assuming we don't have a different issue for adding that support)? |
## 🤨 Rationale Fixes #378 ## 👩💻 Implementation Refer to spec document. ## 🧪 Testing Created automated tests. Could not come up with a good way to test `prevent-dismiss` attribute. ## ✅ Checklist - [x] I have updated the project documentation to reflect my changes or determined no changes are needed. Co-authored-by: Milan Raj <rajsite@users.noreply.github.com>
😯 Problem to Solve
Several SystemLink web applications require a confirmation dialog (or generically just "dialog"). There is already a
helium-uicomponents
-based solution and anAngular Material
-based one. None of these follow any design guidelines and none of them are theme-aware.💁 Proposed Solution
Implement a
nimble-dialog
component and its appropriate Angular wrapper component by extendingfast-dialog
. This is similar to how the currentnimble-drawer
is implemented, but that component was specifically designed for "slide in" components that appear on the left or right side of the window.The new component would appear in the middle of the window and would have the following sections:
Are you sure you want to delete a file?
Other considerations - TBD
We could benefit from a
programmatic
way of opening a dialog by providing aNimbleDialogService
that exposes functions for programmatically configuring and opening a dialog and then subscribing to it:The text was updated successfully, but these errors were encountered: