CommunityToolkit / WindowsCommunityToolkit

The Windows Community Toolkit is a collection of helpers, extensions, and custom controls. It simplifies and demonstrates common developer tasks building .NET apps with UWP and the Windows App SDK / WinUI 3 for Windows 10 and Windows 11. The toolkit is part of the .NET Foundation.
https://docs.microsoft.com/windows/communitytoolkit/
Other
5.88k stars 1.38k forks source link

In-App Notifications? #1080

Closed AzureKitsune closed 7 years ago

AzureKitsune commented 7 years ago

What are the chances of something like @RavinduL 's LocalNotifications getting included in this toolkit?

demo gif

EDIT: UserVoice link: https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/19022110-in-app-notifications

Odonno commented 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

AzureKitsune commented 7 years ago

@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.

Odonno commented 7 years ago

@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.

mdtauk commented 7 years ago

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

ravindUwU commented 7 years ago

@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 😄

Vijay-Nirmal commented 7 years ago

It would be useful.

Use Cases

  1. To Say "Restart you app to apply changes".

  2. To show result of a background task Like "Successfully copied", "Can't access the internet" etc

  3. To show small information Like "You got a new Article to read", "Someone has commanded to your post".

  4. For sure there will be lot more use to it.

xied75 commented 7 years ago

Sounds like a glorified MsgBox? Very similar to FlyOut though.

andrewleader commented 7 years ago

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.

h82258652 commented 7 years ago

something like Toast in android?

AzureKitsune commented 7 years ago

Created the UserVoice: https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/19022110-in-app-notifications

tibitoth commented 7 years ago

Can the design of in-app notification be like in the Visual Studio Code?

Odonno commented 7 years ago

@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.

skendrot commented 7 years ago

@totht91 can you show an example?

Odonno commented 7 years ago

I suppose it is one of these notifications at the top of the app :

image

tibitoth commented 7 years ago

@Odonno exactly, thank you

nmetulev commented 7 years ago

PR merged