nips icon indicating copy to clipboard operation
nips copied to clipboard

Add annotations

Open staab opened this issue 1 year ago • 12 comments
trafficstars

Annotations are preferable to edits, because they leave the original content of a note unchanged. This reduces the amount of possible confusion when comments don't match the version of the note that is fetched. You can see a revealed preference for this behavior on github issues and stack overflow posts; it is far preferable when editing comments to add a new line beginning with EDIT or UPDATE than to transparently update the main body of content.

staab avatar Feb 26 '24 15:02 staab

I like it.

This also fixes broken URLs and all sorts of things?

fiatjaf avatar Feb 26 '24 18:02 fiatjaf

Could clients reliably implement this by just visually appending the content of annotations to the bottom of the original post?

fiatjaf avatar Feb 26 '24 18:02 fiatjaf

Maybe rename it to "Additions", then?

vitorpamplona avatar Feb 26 '24 18:02 vitorpamplona

Could clients reliably implement this by just visually appending the content of annotations to the bottom of the original post?

That's how I would do it, maybe after a rule


EDIT: like this

staab avatar Feb 26 '24 18:02 staab

Of the last 5 PRs, I like this one the best.

mikedilger avatar Feb 26 '24 18:02 mikedilger

So, I was testing this out and I realized that if people start using the EDIT annotation for real, most posts in the feed will have an EDIT below them. Some will have two or three.

The edit notation only works for folks coming back to something they have already read. That's what @staab mentioned. However, because of the nature of kind1s, most posts will be new ones. And if it is a new post, you don't want to read the post and read 2-3 edits. You will be like: "Just fix the main post. Delete it and write it again. Whatever. But don't pollute my feed"

vitorpamplona avatar Feb 26 '24 19:02 vitorpamplona

So, I was testing this out and I realized that if people start using the EDIT annotation for real, most posts in the feed will have an EDIT below them. Some will have two or three.

If you are evaluating this using as data source the current Amethyst edit function, it could be a false positive, related to the fact the users are induced to use the edit, even several times, because it seems transparent to the original notes. So they probably put less attention when they compose the original notes.

Il like this annotation proposal, it requires more awareness in content creation. But why use a new kind? If we use the kind-1 with an additional field to the e tag, all clients that does not support annotations will show them as a reply, and this definitely makes sense, otherwise the addition would be lost, and his informative value could be crucial to the meaning of the original note. E.g.

{
  "kind": 1,
  "pubkey": "<pubkey>",
  "tags": [
    ["e", "<event_id>", "<relay_hint>", "annotation"]
  ],
  "content": "EDIT: I forgot to say...",
  // ...other fields
}

You could also use a new tag to report the annotation, if you do not want to extend the basic e structure.

dtonon avatar Apr 12 '24 07:04 dtonon

I think I agree with @dtonon. Normally a new feature should not break existing clients, and we ensure that by using something distinct that existing clients won't recognize. But an annotation would be even more broken if it wasn't shown at all by old clients. They need to work in existing clients that don't support annotations by being (in that case) a reply. So using an "annotation" marker makes the most sense to me at this point. The clients supporting annotations can check if the pubkeys match and render these special replies inside the original note, and those that don't will show them as replies so the content is not lost.

EDIT: Actually they probably have to be marked "reply" to work in old clients... and then have some additional signalling mechanism indicating that they are an annotation style reply.

mikedilger avatar Apr 16 '24 04:04 mikedilger

Agreed, just updated the NIP text.

staab avatar Apr 16 '24 15:04 staab

Implemented in gossip on a private branch, will move through unstable to master once the impl is cleaned up.

mikedilger avatar Apr 26 '24 23:04 mikedilger

I've discovered a kink. What if someone replies to the annotation event? I guess I can show it as a reply to the main event.

mikedilger avatar Apr 27 '24 03:04 mikedilger

What if someone replies to the annotation event? I guess I can show it as a reply to the main event.

This is probably ok. If annotations aren't supported, it'll work as usual, if they are, then clients should have a strategy for handling this. I'll add it to the NIP.

staab avatar Apr 29 '24 18:04 staab