Add ShowNotification API: inline notification bar in main window#4550
Add ShowNotification API: inline notification bar in main window#4550VictoriousRaptor with Copilot wants to merge 2 commits into
Conversation
Introduces a new ShowNotification(title, subTitle, severity) method to IPublicAPI that plugins can call to display a reliable inline notification bar directly inside the Flow Launcher main window — not a dismissable OS toast notification. Changes: - NotificationSeverity.cs: new enum (Informational/Success/Warning/Error) - IPublicAPI.cs: add ShowNotification method to the public interface - Notification.cs: add ShowInline() that maps severity and delegates to MainViewModel - MainViewModel.cs: add InlineNotification* properties and ShowInlineNotification() - MainWindow.xaml: add ui:InfoBar bound to InlineNotification* ViewModel properties - PublicAPIInstance.cs: implement ShowNotification via Notification.ShowInline - JsonRPCPublicAPI.cs: expose ShowNotification for Python/Node.js plugins
|
This sounds awesome! I can't see what it looks like, of course, but I'll have to try it out when I get a chance. I think the Notification Severity is a nice touch. |
I'm sorry but this PR is just a click to copilot and see if it can solve that issue, not something we're bringing into the project yet. |
Yes, of course. But I do hope this makes it into Flow.Launcher (in whatever form that may be); the idea sounds fantastic. |
ShowMsgrelies on OS toast notifications, which can be silently blocked, dismissed, or missed entirely — making it unreliable for plugins that need guaranteed user-visible feedback.Changes
NotificationSeverityenum (Flow.Launcher.Plugin) —Informational,Success,Warning,ErrorIPublicAPI.ShowNotification— new method signature:MainViewModel— addsInlineNotificationIsOpen/Title/Message/Severityproperties (Fody-notified) andShowInlineNotification()with dispatcher guardMainWindow.xaml— inserts aui:InfoBarbetween the query box and results list, two-way bound to the ViewModel; collapses whenIsOpen=falseso it takes no space at restNotification.ShowInline— mapsNotificationSeverity→InfoBarSeverity, resolvesMainViewModelfrom IoC, callsShowInlineNotificationPublicAPIInstance+JsonRPCPublicAPI— wireShowNotificationthrough toNotification.ShowInline, making the API available to both C# and JsonRPC (Python/Node.js) pluginsResult
Plugins call
ShowNotificationand a styled, dismissable bar appears inside the Flow Launcher window — unaffected by OS notification settings, guaranteed visible whenever the window is open.