[openstreetmap/openstreetmap-website] Add UserMute to control private message visibility (PR #4284)
Gregory Igelmund
notifications at github.com
Wed Oct 11 08:12:47 UTC 2023
## Why are the changes necessary?
Implements the UserMute-Feature as described in https://github.com/osmfoundation/ewg_bidding/tree/main/projects/ability-to-mute-other-users/proposals/gregory_igelmund-08-09-2023
## What changed?
- Added `UserMute` w/ UI controls to mute/unmute users
- Moved `UserMailer.message_notification` into `Message#notify_recipient_via_mail`
- Moved shared UI logic from `app/views/messages/{inbox,outbox,muted}.html.erb` to `app/views/messages/_heading.html.erb`
## TBD
- [ ] Add UserMute on `Messages#show`?
Users receive a new message, navigating to `Messages#show`. At this point they might have the urge to mute the sender of this message, so it would make sense to provide the `Mute`-action here, too.
Questions is: Where to put the action so that it is not too intrusive for 99% of the users who have no need to mute another user?
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/openstreetmap-website/pull/4284
-- Commit Summary --
* Create UserMute, add Message#muted-flag
* Basic controllers, routes, ability
* Add UI, locales, extract messages/_heading
* script/deliver-message: Respect muted messages
* Restore messages table
* Messages: Add actions column
* Never mute admins
* Add UserMutes#index, allow unmuting messages
* Rephrase/Reformat UserMutes#index page
* Users#show: Rephrase mute actions, add title w/ explainer to Mute action
* Delint, thanks rubocop
* Add test to verify correct Mailer behaviour
* Rephrase comment
* UserMutes#index: Add i18n for site title
* messages/_message_summary.html.erb: Revert rename message{_summary,}
* Merge branch 'master' into add_user_mute
-- File Changes --
M app/abilities/ability.rb (3)
M app/controllers/messages_controller.rb (26)
A app/controllers/user_mutes_controller.rb (46)
M app/models/message.rb (21)
M app/models/user.rb (8)
A app/models/user_mute.rb (45)
M app/views/application/_settings_menu.html.erb (3)
A app/views/messages/_heading.html.erb (26)
M app/views/messages/_message_summary.html.erb (3)
A app/views/messages/_messages_table.html.erb (13)
M app/views/messages/inbox.html.erb (29)
A app/views/messages/muted.html.erb (9)
M app/views/messages/outbox.html.erb (16)
M app/views/messages/show.html.erb (3)
A app/views/user_mutes/index.html.erb (36)
M app/views/users/show.html.erb (10)
M config/locales/en.yml (41)
M config/routes.rb (8)
A db/migrate/20231010201451_create_user_mutes.rb (15)
A db/migrate/20231010203028_add_muted_flag_to_messages.rb (5)
M db/structure.sql (91)
M script/deliver-message (2)
M test/factories/messages.rb (4)
A test/factories/user_mute.rb (6)
M test/models/message_test.rb (21)
A test/models/user_mute_test.rb (27)
-- Patch Links --
https://github.com/openstreetmap/openstreetmap-website/pull/4284.patch
https://github.com/openstreetmap/openstreetmap-website/pull/4284.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/4284
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/4284 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20231011/7669cb83/attachment-0001.htm>
More information about the rails-dev
mailing list