Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

OS Notifications API for hApps #135

Open
matthme opened this issue Feb 20, 2023 · 1 comment
Open

OS Notifications API for hApps #135

matthme opened this issue Feb 20, 2023 · 1 comment

Comments

@matthme
Copy link
Collaborator

matthme commented Feb 20, 2023

Is your feature request related to a problem? Please describe.
I would like the Launcher to expose an API to hApps to request permission for and send OS Notifications

Describe the solution you'd like
The launcher exposes an API, for example via a tauri command that can be invoked with tauri's javascript API or potentially directly through holochain's javascript client.
Under the hood, the Launcher manages permissions that have been given to each app and forwards notification requests to tauri's notifications API

@pdaoust
Copy link

pdaoust commented Mar 3, 2023

Comments on this, in support of an idea @matthme shared in a conversational elsewhere: It'd be wonderful for UIs to indicate 'classes' of notifications, so the user could filter notifications by class.

Prior art: many web applications let you twiddle settings so you (for example) get notifications for DMs but not for likes, or you always get audio and popup notifications for messages in channel X but channel Y is muted. This is kinda ad-hoc and spread all over the web...

It might be worth exploring a more unified way of doing this via the aforementioned classes. It might be too restrictive, or it might be impossible to craft good UX around notification management.

But what I'm picturing is a sort of pub/sub sort of thing, with path-based topics that can be added ad-hoc at runtime and are given human-readable labels when initialised. For instance, these topic might be created when I respond to a forum thread:

[
    {
        "path": "posts/13144315/replies",
        "name": "Replies on 'Looking for recommendations on a good short-season watermelon variety'"
    },
    {
        "path", "posts/13144315/replies/22719320/reactions",
        "name": "Reactions to your reply #3 on 'Looking for recommendations on a good short-season watermelon variety'"
    }
]

To which the launcher can add flags like "popup", ["popup", "audio"], "mute".

It raises all sorts of UX questions for me, like how you might easily manage zillions of topic paths, and what happens when you mute notifications at the parent level. But anyhow, just an idea to throw sticks and rocks at.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants