-
Notifications
You must be signed in to change notification settings - Fork 83
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
External event handlers #895
Comments
This is all good except for the "who recommended." I don't think it is important. And it makes each list entry taller meaning fewer fit on the screen at once. If people really are curious who recommended, we could do a query over the events to find it on the press of a button or something. Otherwise we are creating another database table I like that we are separating the "Name" from their metadata, but also giving the URL hostname regardless. This will help people detect imposter apps. I'm OK with recommend-by-button. Each press will regenerate the event for that 'kind'. This is how I started, but then I switched to the per-page recommend button so that you could change multiple things without posting an event yet, and then just make the event when you are ready. But that leaves things out-of-sync and is such a micro-optimization that I think your way is better. BTW: All recommendations by default are enabled currently. Maybe we can rethink that later. The event kind names DontHaveSpaces currently, but I could make a change to fix that. |
Ok I added spaces to the event kinds by updating nostr-types. I also redefined the name functions to be:
Since handlers have up to 2 different URLs (we only keep 'nevent' and 'naddr') we need to know which one you wanted the hostname from, and so passing in the kind (which is always known in context) lets us choose. |
@dtonon Handlers also have metadata just like profiles:
|
@mikedilger Currently I just count all the handlers for the numbers in daniele's design, but then when you click in the way you had programmed the loop we reject those that don't have metadata (for example kind 0 has 11 handlers but when I click in I can only configure 4 of them). How do we want to reconcile that? |
I think I will make the EDIT: I have done this. The counts are fixed now. |
That's fine with me.
I also thought about the mass update, but thinking about a real pattern use I suppose that the user will toggle single elements every now and then. So this interface is simpler and immediate.
There is no harm in this, and helps to surface and promote new Nostr apps. |
Are they actually used? |
I would follow the Relays list interface:
|
Yes. Many of them have it. |
As you can see from the mockup I added the "about" field, we can integrate more details if needed. |
Ok I added code to show who recommended the handler. I think it runs fast enough to just show it everywhere. |
@bu5hm4nn so we can skip the row opening, just follow the design of the expanded row. |
Many of the changes are implemented now. One thing we still need to reconcile is that "recommend" is currently a bool switch per handler and there is one central "Share recommendations" button. Is the backend logic going to change to individual recommendations or should we just fake this behavior from the Ui so that it behaves the way @dtonon has designed it: We would just change the bool and publish the new recommendations (all of them). |
You always have to publish all your recommendations per-kind. So if there are lots of buttons instead of switches, each one publishes that entire kind (all the rows?). The backend does not change, it cannot publish them separately. By making them buttons, the UI state never gets out of sync with what is published. By using switches and local state, it gets out of sync and then they have to press the button at the top. So I conceded to Daniele's many-button design. It doesn't hurt to publish every time they press a button. |
@bu5hm4nn in addition to Mike's indication on the buttons, some minor tweaks:
You can find all these details alsi in the design (figma). |
@dtonon Which count does "X of X apps" refer to? How many are enabled or how many we recommend? |
@bu5hm4nn "(enabled) of (recommended) apps", as it is now is correct, it's just an update in the design. |
A first proposal for the external event handlers.
Compared to the current base version there are some technical/functional additions:
/cc @mikedilger @bu5hm4nn
The text was updated successfully, but these errors were encountered: