-
Notifications
You must be signed in to change notification settings - Fork 7
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
Addtional content when linking notes #44
Comments
Agree with this scenario. "Tag" and "List" are both useful for different purposes. Currently the linkType is more suitable for "list". For 1, that's intuitive, and I like the flexibility using "uri" instead of pure string arrays, which means you can attach not only tags but also, for instance, quick marks, to a note you want to bookmark. But from the protocol's perspective, I am afraid it is not general enough. Comparing with creating a list, tagging are more to deliver some information. From this point, I believe, "tagging" content is supposed to be commented/liked as well. Both solution 1 and 2 are not good at that. So I wanna propose 3: using
Here I introduce a new trait name
That distinguish is useful to determine which notes are included to display as comments under a note and which are not. If we want to update the tags, we can post a new note to replace the old one, or use Pros are it's more clear and no interface change. Cons are that the indexer has to do a lot of things:
Besides, though flexible enough I know that design might be too abstract and not easy to understand. Hope to know more thoughts from you! |
My suggestion is that we do not change anything on contract. We could give the
That is, separate the sub-types with
(The colon just happens to come out of my head. It could be some other special character.) When querying on indexer to find the total list, we only have to change the |
I agree with this. It is worth noting that |
@Albert Different encodings can result in different storages. How many characters can 32 bytes hold in solidity? |
maximum number of uint256, |
Use |
maybe we can reserve a flag bit(taking the last bit of linkType for example) to indicate whether to create a linklist nft when linking, maybe like this
|
Right now,
linkNote
can be served to link notes for different purposes by assigning differentlinkTypes
, but it's quite limited, cuz thelinkType
is bytes32 and can only be used to store a small amount of information. Imagine a scenario when you liked a bunch of posts on Xlog but you want to tag them with different bookmarks and organize them into different lists, thelinkTypes
alone won't be enough.We got 2 options to improve this:
linkNoteWithUri
method in Web3Entry.sol.This uri can be anything, we can put the tags we want in it.
link
and `linkTag'.When you want to link notes with tags, your linkNoteData might be like this:
In order to make some differences with the emitted events so that indexer can easily tell if this is a normal
link
or alinkTag
, Web3Entry would process the input data and when thelinkType
starts with"tag: "
thelinklistId
in the emittedLinkNote
event would be 0(normally thelinklistId
should be linker's linklist ID).What do you think, Which one is better? 🤖
The text was updated successfully, but these errors were encountered: