]> cat aescling's git repositories - mastodon.git/commit
Add trending statuses (#17431)
authorEugen Rochko <eugen@zeonfederated.com>
Thu, 24 Feb 2022 23:34:14 +0000 (00:34 +0100)
committerGitHub <noreply@github.com>
Thu, 24 Feb 2022 23:34:14 +0000 (00:34 +0100)
commit27965ce5edff20db2de1dd233c88f8393bb0da0b
tree6714a950c1b9facc8c7bd1907e81e777257e5538
parenta29a982eaa0536a741b43ffb3397c74e3abe7196
Add trending statuses (#17431)

* Add trending statuses

* Fix dangling items with stale scores in localized sets

* Various fixes and improvements

- Change approve_all/reject_all to approve_accounts/reject_accounts
- Change Trends::Query methods to not mutate the original query
- Change Trends::Query#skip to offset
- Change follow recommendations to be refreshed in a transaction

* Add tests for trending statuses filtering behaviour

* Fix not applying filtering scope in controller
71 files changed:
.rubocop.yml
app/controllers/admin/trends/links/preview_card_providers_controller.rb
app/controllers/admin/trends/links_controller.rb
app/controllers/admin/trends/statuses_controller.rb [new file with mode: 0644]
app/controllers/admin/trends/tags_controller.rb
app/controllers/api/v1/admin/trends/links_controller.rb [new file with mode: 0644]
app/controllers/api/v1/admin/trends/statuses_controller.rb [new file with mode: 0644]
app/controllers/api/v1/admin/trends/tags_controller.rb
app/controllers/api/v1/trends/links_controller.rb
app/controllers/api/v1/trends/statuses_controller.rb [new file with mode: 0644]
app/controllers/api/v1/trends/tags_controller.rb
app/controllers/concerns/localized.rb
app/helpers/admin/filter_helper.rb
app/helpers/languages_helper.rb
app/javascript/styles/mastodon/accounts.scss
app/javascript/styles/mastodon/tables.scss
app/lib/activitypub/activity/announce.rb
app/lib/activitypub/activity/like.rb
app/mailers/admin_mailer.rb
app/models/account.rb
app/models/status.rb
app/models/trends.rb
app/models/trends/base.rb
app/models/trends/links.rb
app/models/trends/preview_card_batch.rb [moved from app/models/form/preview_card_batch.rb with 82% similarity]
app/models/trends/preview_card_filter.rb [moved from app/models/preview_card_filter.rb with 52% similarity]
app/models/trends/preview_card_provider_batch.rb [moved from app/models/form/preview_card_provider_batch.rb with 91% similarity]
app/models/trends/preview_card_provider_filter.rb [moved from app/models/preview_card_provider_filter.rb with 95% similarity]
app/models/trends/query.rb [new file with mode: 0644]
app/models/trends/status_batch.rb [new file with mode: 0644]
app/models/trends/status_filter.rb [new file with mode: 0644]
app/models/trends/statuses.rb [new file with mode: 0644]
app/models/trends/tag_batch.rb [moved from app/models/form/tag_batch.rb with 81% similarity]
app/models/trends/tag_filter.rb [moved from app/models/tag_filter.rb with 76% similarity]
app/models/trends/tags.rb
app/models/user.rb
app/policies/account_policy.rb
app/policies/preview_card_policy.rb
app/policies/preview_card_provider_policy.rb
app/policies/status_policy.rb
app/policies/tag_policy.rb
app/services/delete_account_service.rb
app/services/favourite_service.rb
app/services/reblog_service.rb
app/views/admin/custom_emojis/_custom_emoji.html.haml
app/views/admin/follow_recommendations/show.html.haml
app/views/admin/trends/links/index.html.haml
app/views/admin/trends/links/preview_card_providers/index.html.haml
app/views/admin/trends/statuses/_status.html.haml [new file with mode: 0644]
app/views/admin/trends/statuses/index.html.haml [new file with mode: 0644]
app/views/admin/trends/tags/index.html.haml
app/views/admin_mailer/_new_trending_links.text.erb [new file with mode: 0644]
app/views/admin_mailer/_new_trending_statuses.text.erb [new file with mode: 0644]
app/views/admin_mailer/_new_trending_tags.text.erb [new file with mode: 0644]
app/views/admin_mailer/new_trending_links.text.erb [deleted file]
app/views/admin_mailer/new_trending_tags.text.erb [deleted file]
app/views/admin_mailer/new_trends.text.erb [new file with mode: 0644]
app/views/application/_sidebar.html.haml
app/workers/scheduler/follow_recommendations_scheduler.rb
config/brakeman.ignore
config/locales/en.yml
config/navigation.rb
config/routes.rb
db/migrate/20220202200743_add_trendable_to_accounts.rb [new file with mode: 0644]
db/migrate/20220202200926_add_trendable_to_statuses.rb [new file with mode: 0644]
db/post_migrate/20220202201015_remove_trust_level_from_accounts.rb [new file with mode: 0644]
db/schema.rb
spec/controllers/api/v1/trends/tags_controller_spec.rb
spec/mailers/previews/admin_mailer_preview.rb
spec/models/trends/statuses_spec.rb [new file with mode: 0644]
spec/models/trends/tags_spec.rb