-
Notifications
You must be signed in to change notification settings - Fork 1
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
Support using the notifications API #9
Comments
Yeah, a good idea. Though I’m not sure whether it needs that. I'm using notifications in Mastodon Simplified Federation and just used the API as it is. Could you describe the use case a little more?
Could we tackle that in a new issue at least? … it’s yet another feature I guess. 🙃 |
Your RandomTips library uses this to show all its notifications, although it is not very useful for add-ons like Unicodify. If the user never opens the options page (probably many users), they will not see any of the tips. If you do not want to update this library, I would be fine if the RandomTips library instead had the option of using the notifications API directly. I was also thinking for Unicodify, we could show an error if the text transformation fails for some reason. Same for the Awesome Emoji Picker, if inserting the emoji into the page fails, we could show a message that it was copied to the clipboard. Although, we could of course use the notifications API directly for these two specific use cases.
You can set an icon for each notification to use your SVGs. You can also prefix the title of each message with an emoji to replicate those SVGs.
Well it has not yet been added to Thunderbird. I only mentioned it because it will be an almost exact replacement for this library and the preferred method to show all notifications in Thunderbird. |
That's a very good point and I'm, having the same issue for my Mastodon extension: rugk/mastodon-simplified-federation#24 But if that is implemented here, I guess, that could be used there, too. Anyway, the questions stands whether MessageHandler or RandomTips may be better suitable. Some arguments:
-> I guess that is argument enough to make it it's own So some acceptance criteria:
|
Given what I said I move this to RandomTips library. |
As you explained in rugk/mastodon-simplified-federation#24, the tips should only be shown in response to an explicit user action. For Unicodify, maybe after the user does one of the Unicode font conversions. However, unlike for the popup and options page where the tips are typically shown frequently, I would argue that desktop notifications should be shown very rarely and maybe only once. The user should also be able to completely disable the desktop notifications. In addition, for add-ons like the Awesome Emoji Picker that already have an action popup, they would probably never need to show tips in a desktop notification.
I believe it could just check if Note that many of your tips of course have a button that performs some action, such as opening the respective AMO/ATN reviews page so the user can rate/review the add-on. However, those existing I have a PR for Unicodify that will show a notification after it is updated, where clicking the notification will open the release notes/changelog on AMO/ATN. This should show the changes that would be needed to the |
Provide the option of using the notifications API to display notifications. This is needed for extensions that do not have a popup (like Unicodify) or that need to display notifications when both the popup and options page are not open. This could also be used to show errors to the user instead of silently failing.
Additionally, you could provide the option of using the future notification bar API in Thunderbird (see Bug 1674002).
The text was updated successfully, but these errors were encountered: