Closed AzureKitsune closed 7 years ago
@Amrykid It looks pretty nice. But I don't know what use cases for this. You can simply push a toast notification as it is the main purpose.
Anyway, if some people are interested to integrate it in the toolkit, we will consider adding this feature.
Please raise a suggestion on the UserVoice https://wpdev.uservoice.com/forums/110705-universal-windows-platform/category/193402-uwp-community-toolkit
@Odonno There was an old guideline that stated that you shouldn't use toast notifications while the application is in the foreground. I don't know if it still applies with the move to Windows 10.
@Amrykid I think the guidelines are more flexible on Windows 10 and clearly toast notifications are not always the solution. I am simply questioning in what circumstances we should use the in-app notification.
Anyway, I am not able to decide if you should or should not add it to the toolkit. That's why I suggest you to create a suggestion on the UserVoice so the community can decide if it is important or not.
Outlook Mail has an in app notification at the bottom. So if that is considered a normal UWP pattern, any control should take it's cue from that. Maybe a Position: TOP/BOTTOM setting
@Odonno @Amrykid even if used while the app is in the foreground, Windows toast notifications wouldn't necessarily comply with the aesthetics of the app.
@mdtauk I've been thinking of adding a top/bottom positioning property to SimpleNotificationPresenter, but am unable to do it at the moment. A pull request is welcome though 😄
It would be useful.
Use Cases
To Say "Restart you app to apply changes".
To show result of a background task Like "Successfully copied", "Can't access the internet" etc
To show small information Like "You got a new Article to read", "Someone has commanded to your post".
For sure there will be lot more use to it.
Sounds like a glorified MsgBox? Very similar to FlyOut though.
Although keep in mind if you're showing your own notifications inside your app, you should also have a location in your app where people can see those notifications in case they weren't able to tap your temporary popup notification within 5 seconds.
And for consistency purposes, you'd probably want similar styling of your own notification list and your own popup notifications. So a generic in-app notification control would realistically just end up displaying the app's own custom notification list item UI.
something like Toast
in android?
Can the design of in-app notification be like in the Visual Studio Code?
@totht91 That's a really good question. I would have liked you to post the question in the PR but ok.
Since I copied the design of Microsoft Edge in-app notification, I have a mandatory Template that takes two columns : 1) the Content and 2) a Dismiss (X) button. If that's what you want, you can design the in-app notification by setting Background property and having a proper DataTemplate (for text, buttons, ...) but by default you will have the Dismiss button which is not what you expect for a Code-like notification.
So, the simpliest solution would be to introduce a boolean if you want to display the Dismiss button. And then, you will have to handle the Template on your side.
@totht91 can you show an example?
I suppose it is one of these notifications at the top of the app :
@Odonno exactly, thank you
PR merged
What are the chances of something like @RavinduL 's LocalNotifications getting included in this toolkit?
EDIT: UserVoice link: https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/19022110-in-app-notifications