FEATURE: Add ignored user list to the User's preference page (#7107)

* FEATURE: Add ignored user list to the User's preference page

## Why?

Part of: https://meta.discourse.org/t/ability-to-ignore-a-user/110254

We want to add list of Ignored users under or along with the muted users preferences section.
This way Users can find and update their list of ignored users.

## UI


![gif](https://user-images.githubusercontent.com/45508821/53746179-8e9b3c00-3e98-11e9-9e90-94b8520896a6.gif)

## Open questions

Two of many options to represent a list of ignored users is that we can:

1. We can represent the ignored user list as a table with the ability to `un-ignore` but NOT to add new ignored users.
2. We can keep it functioning as the `muted user list` where you can `un-ignore` or `ignore` users.
This commit is contained in:
Tarek Khalil
2019-03-05 14:47:51 +00:00
committed by GitHub
parent f19d36cbba
commit 190b19f3c2
11 changed files with 67 additions and 9 deletions

View File

@ -112,6 +112,7 @@ class UserSerializer < BasicUserSerializer
:custom_avatar_template,
:has_title_badges,
:muted_usernames,
:ignored_usernames,
:mailing_list_posts_per_day,
:can_change_bio,
:user_api_keys,
@ -377,6 +378,10 @@ class UserSerializer < BasicUserSerializer
MutedUser.where(user_id: object.id).joins(:muted_user).pluck(:username)
end
def ignored_usernames
IgnoredUser.where(user_id: object.id).joins(:ignored_user).pluck(:username)
end
def include_private_messages_stats?
can_edit && !(omit_stats == true)
end