element-hq / element-web

A glossy Matrix collaboration client for the web.
https://element.io
Apache License 2.0
10.87k stars 1.92k forks source link

Allow free-form reactions #19409

Open tadzik opened 2 years ago

tadzik commented 2 years ago

Your use case

What would you like to do?

Post reactions other than emojis.

Why would you like to do it?

To unleash my creativity! Also, I hate emojis.

How would you like to achieve it?

By merging https://github.com/matrix-org/matrix-react-sdk/pull/6628.

Have you considered any alternatives?

The only alternative currently available is using another client. Freeform reactions are already used in the wild though, for example by TWIM bot.

Additional context

It was noted in the PR above that reactions aren't encrypted – a warning should probably be displayed before posting them (maybe all of them, not just freeforms) in encrypted rooms.

germain-gg commented 2 years ago

I believe that alongside this change we should add the ability to report and/or hide some reactions. This could be used as a spam vector Currently unsure whether related event as also aggregated when an event is reported for moderation but that would probably be interesting to investigate as part of this piece of work

I understand this is already possible in the wild, but this interaction might become a bit more common once it lands on Element

t3chguy commented 2 years ago

This could be used as a spam vector

not a new one by any means though, just gives it a better UI than curl/devtools

HarHarLinks commented 2 years ago

I have wanted this ever since I learned that reactions are not technically limited to single character/emoji. Reusing the search input field is the same UX I had in mind.

Into consideration should be taken that last time I checked, Element cut it off at a certain amount of characters. The cut off point should at least be indicated when creating such a reaction.

bkil commented 2 years ago

It would also be neat to have a UX for producing custom characters using Unicode combiners and whatnot.

NicolasDerumigny commented 2 years ago

Note that discord bots also sends custom reactions with server-defined emojis; this would be a great feature to display in element.

HarHarLinks commented 2 years ago

server-defined emojis; this would be a great feature to display in element.

as implemented in fluffychat for a while, i think. however doing this proper would probably require a spec change to allow reaction events not just with a text key but a flag to explicitly state that it's a mxc:// media url.

bkil commented 2 years ago

Many clients opt to hide images and a great number of users can not see images at all due to visual impairment.

Hence it is considered good practice to not only associate an emoji with a picture, but perhaps to also keep providing alternate text (or a Unicode based approximation) as well.

Server-defined emojis may also raise copyright concerns.

HarHarLinks commented 2 years ago

Many clients opt to hide images and a great number of users can not see images at all due to visual impairment.

Hence it is considered good practice to not only associate an emoji with a picture, but perhaps to also keep providing alternate text (or a Unicode based approximation) as well.

good point, this sounds like an additional argument to updating the spec for custom reaction emoji support, such that an alt-text is associated with emoji.

Server-defined emojis may also raise copyright concerns.

more than any image shared by anyone already does?

bkil commented 2 years ago

Typing a Unicode emoji can never raise a copyright problem 🆓 Šī¸ 🐧

If as a user, you are uploading a media file that you will share with others in a given room (copy & publish) that implies that you mush have already obtained a license to allow for that (or the work is copyleft, or you are the original author)

The wording in the above comment seems to imply that a given home server (or would it be matrix.org?) should be hosting some kind of media that you could instantly reproduce with a click when you are chatting. This would imply that they had previously obtained a license for the media that allows unlimited redistribution.

Because Discord is a centralized, closed, for-profit platform, they could use various arrangements that could not even work between open federated servers.

HarHarLinks commented 2 years ago

that implies that you mush have already obtained a license to allow for that (or the work is copyleft, or you are the original author)

same applies when I upload a custom sticker pack or custom emoji pack, no?

you could instantly reproduce with a click

you already can: click "forward message" on an image

This would imply that they had previously obtained a license for the media that allows unlimited redistribution.

wouldn't I as the sticker/emoji pack author be liable for that?

this discussion is getting a bit off-topic and is probably more suited for the actual MSC: https://github.com/matrix-org/matrix-doc/pull/1951

bkil commented 2 years ago

I'm more interested in free-form reactions than in custom sticker packs at the moment, so I'd like to leave that to you.

JokerGermany commented 2 years ago

gomuks is already able to make text reactions grafik I think it's a nice idea to be more free, how to use reactions.

tadzik commented 2 years ago

@kittykat I resolved the merge conflicts in the PR – is there anything else for me to do here?

kittykat commented 2 years ago

@tadzik Thanks for rebasing - we can now test it out in Netlify :+1:

The next step is to get a design review which takes into account the considerations Jim and I listed here before we can proceed.

Quick look at the Netlify build, I'd expect feedback from design at least about the font in the timeline (note that it's different on the "1" right and left): Screenshot from 2022-05-20 10-00-13

And the layout of the clickable text in the emoji picker for reactions: Screenshot from 2022-05-20 10-00-40

And there's no reporting/moderation mechanism right now. Maybe the report dialog could have a tickbox asking "do you want to include the reactions in your report?". This is just a thought, final say on how this should look will be with design and Jim can help with how it should work.

t3chguy commented 2 years ago

And there's no reporting/moderation mechanism right now. Maybe the report dialog could have a tickbox asking "do you want to include the reactions in your report?". This is just a thought, final say on how this should look will be with design and Jim can help with how it should work.

This wouldn't scale well, the report API takes a single event ID so if an event has 40 reactions then now we need to hit the API 41 times

ref https://spec.matrix.org/v1.2/client-server-api/#post_matrixclientv3roomsroomidreporteventid

tadzik commented 1 year ago

note that it's different on the "1" right and left

Try as I might, I fail to see the difference (live on Netlify, at https://pr6628--matrix-react-sdk.netlify.app). They look exactly the same to me. Here it is at 400% magnification, where it looks pixel-perfect:

image