]> cat aescling's git repositories - mastodon.git/commit
Change admin UI for hashtags and add back whitelisted trends (#11490)
authorEugen Rochko <eugen@zeonfederated.com>
Mon, 5 Aug 2019 17:54:29 +0000 (19:54 +0200)
committerGitHub <noreply@github.com>
Mon, 5 Aug 2019 17:54:29 +0000 (19:54 +0200)
commit115dab78f1cc5357281dcb593f04ac8b2629cec6
tree36725f7a5013a37ab690f59b90d3508ef6742640
parent6201bfdfba7626c2b6bc5154dda1f41ee8c3ae71
Change admin UI for hashtags and add back whitelisted trends (#11490)

Fix #271

Add back the `GET /api/v1/trends` API with the caveat that it does
not return tags that have not been allowed to trend by the staff.

When a hashtag begins to trend (internally) and that hashtag has
not been previously reviewed by the staff, the staff is notified.

The new admin UI for hashtags allows filtering hashtags by where
they are used (e.g. in the profile directory), whether they have
been reviewed or are pending reviewal, they show by how many people
the hashtag is used in the directory, how many people used it
today, how many statuses with it have been created today, and it
allows fixing the name of the hashtag to make it more readable.

The disallowed hashtags feature has been reworked. It is now
controlled from the admin UI for hashtags instead of from
the file `config/settings.yml`
28 files changed:
app/controllers/admin/dashboard_controller.rb
app/controllers/admin/tags_controller.rb
app/controllers/api/v1/trends_controller.rb [new file with mode: 0644]
app/controllers/settings/preferences_controller.rb
app/helpers/admin/filter_helper.rb
app/mailers/admin_mailer.rb
app/models/application_record.rb
app/models/tag.rb
app/models/trending_tags.rb
app/models/user.rb
app/policies/tag_policy.rb
app/validators/disallowed_hashtags_validator.rb
app/views/admin/dashboard/index.html.haml
app/views/admin/tags/_tag.html.haml
app/views/admin/tags/index.html.haml
app/views/admin/tags/show.html.haml [new file with mode: 0644]
app/views/admin_mailer/new_trending_tag.text.erb [new file with mode: 0644]
app/views/settings/preferences/notifications/show.html.haml
config/locales/en.yml
config/locales/simple_form.en.yml
config/navigation.rb
config/routes.rb
config/settings.yml
db/migrate/20190805123746_add_capabilities_to_tags.rb [new file with mode: 0644]
db/schema.rb
spec/controllers/admin/tags_controller_spec.rb
spec/policies/tag_policy_spec.rb
spec/validators/disallowed_hashtags_validator_spec.rb