-
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
Feature Request: Notification API #15
Comments
This is an overall good idea, imo, but it might be more worthwhile to point people toward node-notifier. Apple’s UserNotifications framework has some annoying limitations, such as not being able to (easily) customize the notification icon, which node-notifier/terminal-notifier have already overcome. A custom implementation for Raycast would probably use the same tactics in the end (i.e. using a separate app bundle for the notification system and dynamically updating the icon within that app’s bundle). Perhaps a reasonable solution would be to build an interface on top of node-notifier so that developers can use Images and Colors from the Raycast API. |
What would be the use case for it, and how would it differ from the Toast/HUD API that we provide? |
In my case(s) it’s useful for sending notifications about new messages from background tasks like updating menu bar or no-ui command. I’ve tried to use node-notifier/terminal-notification, but them not working perfectly (not opening Raycast command or I can’t handle reply from the message). And this solutions needs extra installation for working and giving them rights to excecute (ctrl+click on app -> Open -> Open Anyway). This workflow is not user friendly |
What kind of messages? Why are the |
One use case for me would be to provide actionable updates on async/long-running tasks, for example in my Image Modification extension I'd like to provide notifications when conversion/filter application/etc. is finished, allowing users to click the notification and open the result, copy it to the clipboard, and so on. Would also be useful to provide ways to recover from failures without requiring the user's constant focus on the Raycast window.
|
The issue with notification is with regards to the lifecycle of the extensions. We would have to keep the context of the extension in memory until the notification is cleared (or you'd have to deal with some sort of notification ID/payload and the API would be a pain). And that's not something we want to do. Something we could envision is being able to click on the HUD to "transform" it (eg. open raycast and show it as a toast) to be able to add actions and more details |
I see your point, though I wonder if Deeplinks with Launch Context already provide a way to avoid some of those headaches -- i.e. instead of keeping the extension loaded in memory, offload it and have notifications start a new session of the extension with data communicated via launch context, and maybe a new That said, I'd be happy with an updated HUD as you mentioned. I mostly just want a way to intuitively surface available options to users. |
I use notifications in a background command to notify the user when something happens (in this case when their code is deploying). Notifications are expected behavior for something like this and arent as distracting in my opinion as the HUD notice appearing. Currently I fire a notification like this, but something native with a custom icon and actions would be nice (or even without the actions): https://github.com/KevinBatdorf/laravel-forge-raycast/blob/44fa7f97be4c69736578ef1ce9b075eda3b36755/src/check-deploy-status.tsx#L36 But yeah, I have no idea the technical challenges in supporting that at the OS level. Just giving feedback. |
Ideally, we don't want the dev to worry about what kind of mechanism they use to give feedback to the user. It should be a implementation detail and Raycast should take care of showing what's the most appropriate.
That's exactly what we don't want to happen, 1/3 of the extensions using toast, 1/3 using HUD, 1/3 using notifications - without the user knowing what to expect. What we will probably end up doing is deprecating |
Raycast provides two different experiences though, one with user interaction, and another in the background. The toast and HUD make sense when the user is interacting with Raycast. It's there in front of them and they took action to open the application. They expect the feedback to be in the context of the application itself (toast, HUD, etc). In my opinion the HUD should only be used when you take an action with Raycast that closes the application (the user is done interacting with Raycast). And Toast is for when Raycast is to remain open (the user is still doing stuff). With the background process, in contrast, the user hasn't interacted with Raycast (perhaps not even for weeks/months), so the experience is different. A toast or HUD notice is out of context here. A native notification, or some sort of red dot (to indicate activity) on the menubar icon are more useful in this context.
Just my two cents here, but I'd suggest having a |
Yeah but from a dev point of view, it shouldn't matter - Raycast should know better what to do to be consistent |
Please, add a Notification API support 🙏
The text was updated successfully, but these errors were encountered: