[openstreetmap/openstreetmap-website] Add UserMute to control private message visibility (PR #4284)
Gregory Igelmund
notifications at github.com
Wed Oct 11 08:38:51 UTC 2023
Hey @gravitystorm 👋🏽
this is my take on implementing the `UserMute`-Feature. There are still things I currently consider to be missing and some things I would like to put up for discussion.
Before going into these I wanted to ask you to have a peek at the current shape of the code and let me know if you notice some issues with the fundamental structures though before I'd like into the details.
---
What I think is missing or I want to look more closely at:
- I am not super happy with the `before_save`-Callback in `Message` which calls out to `UserMute.active_for?` but haven't taken the time yet to think about a solid alternative that I'd prefer here.
- Add tests for new/changed controllers
- There are some system and integration tests. I might add an integration test since no JS is involved and the integration test would imo be appropriate here.
---
Open questions from the top of my head:
- I think the most natural place where users would expect the "UserMute"-action would be the `Messages#show`-screen, but I could not come up with a fitting UI-solution. Currently the "UserMute"-action lives just on the `Users#show`-screen. If it would live in `Messages#show`:
- Where should this thing be placed? I'd expect it to be close to the Displayname/User image, not underneath the image, but I don't it to be rendered more prominent than necessary
- Should it be a link "Mute this user" or a button?
- Users can move muted Messages from their `Muted messages`-Tab on `/messages/muted` back into the regular `My Inbox`-Tab. Should they be also able – at this point – to move Messages from the `My Inbox`-Tab to the `Muted messages`-Tag?
- Do we want to encourage users who have muted other users to remove the `UserMute`-again to prevent an accumulation of these mutes or should we wait how this feature plays out – and if it is even used? I am a fan of the latter.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4284#issuecomment-1757145051
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4284/c1757145051 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20231011/1d603b66/attachment.htm>
More information about the rails-dev
mailing list