Open-Assistant icon indicating copy to clipboard operation
Open-Assistant copied to clipboard

Add emoji reactions and reporting for messages (website)

Open othrayte opened this issue 2 years ago • 2 comments

Implements web side of #917

Move labeling to message ... menu and add reporting and emoji reactions

This new menu appears to the right of the message, and floats down if it doesn't fit. The emoji reactions appear to the left of the menu button and float down with the button when there isn't enough space. The menu contains a list of emoji the user can react with (currently just thumbs up and down) formatted as a quick access grid.

The user can also click on an existing emoji to remove them from it or add them to its count, the emoji disappears when the count reaches 0.

Also added "open in new tab" option so that messages can be navigated to from tasks on mobile.

emoji1 emoji2

Notes:

  • There is a bug where the checked status for emojis is missing from the recent messages list. This appears to be due to a limitation of the backend were we need to provide a user to get emoji for, but doing so filters the list to only contain messages from that user.
  • We can add more emoji easily in future, we just need to pick ones that we have consistent icons for.
  • A future task will add some buttons to the report popup to allow the user to select labels to apply with the report (i.e. spam, contains PII etc)
  • The backend adds a flag emoji when the user files a report, the user can remove their flag emoji, but I don't think the backend does anything with it. The user doesn't currently see the flag emoji until they refresh or change another emoji (this is fixable but there are higher priority things I need to work on first),
  • Other users can currently click on other users flag emoji to also flag, but at the moment they don't get a popup to fill anything in.
  • Currently the emojis are updated when they are changed, this greatly simplifies the UI code but means that the user can technically see other people adding reactions when they do, as rare as that probably is.

othrayte avatar Jan 27 '23 05:01 othrayte

  • The backend adds a flag emoji when the user files a report, the user can remove their flag emoji, but I don't think the backend does anything with it. The user doesn't currently see the flag emoji until they refresh or change another emoji (this is fixable but there are higher priority things I need to work on first),

We could for example disallow directly setting the red-flag for ordinary users, so that it only would be set through reporting the message... users could then not un-set the flag on their own.

andreaskoepf avatar Jan 27 '23 11:01 andreaskoepf

:x: pre-commit failed. Please run pre-commit run --all-files locally and commit the changes. Find more information in the repository's CONTRIBUTING.md

github-actions[bot] avatar Jan 27 '23 15:01 github-actions[bot]

@AbdBarho, thanks so much for fixing those last issues 🙏. I had started on it but had to stop and have an early night as I had a splitting headache and nausea by that point.

othrayte avatar Jan 27 '23 23:01 othrayte