]> cat aescling's git repositories - mastodon.git/commit
Add trending links (#16917)
authorEugen Rochko <eugen@zeonfederated.com>
Thu, 25 Nov 2021 12:07:38 +0000 (13:07 +0100)
committerGitHub <noreply@github.com>
Thu, 25 Nov 2021 12:07:38 +0000 (13:07 +0100)
commit6e50134a42cb303e6e42f89f9ddb5aacf83e7a6d
treef60727e2c871857422082d814bb0cb28ce88f6c3
parent46e62fc4b33f3566eb9bf588b15bac28cae967a3
Add trending links (#16917)

* Add trending links

* Add overriding specific links trendability

* Add link type to preview cards and only trend articles

Change trends review notifications from being sent every 5 minutes to being sent every 2 hours

Change threshold from 5 unique accounts to 15 unique accounts

* Fix tests
97 files changed:
app/chewy/tags_index.rb
app/controllers/admin/dashboard_controller.rb
app/controllers/admin/tags_controller.rb
app/controllers/admin/trends/links/preview_card_providers_controller.rb [new file with mode: 0644]
app/controllers/admin/trends/links_controller.rb [new file with mode: 0644]
app/controllers/admin/trends/tags_controller.rb [new file with mode: 0644]
app/controllers/api/v1/admin/dimensions_controller.rb
app/controllers/api/v1/admin/measures_controller.rb
app/controllers/api/v1/admin/trends/tags_controller.rb [new file with mode: 0644]
app/controllers/api/v1/admin/trends_controller.rb [deleted file]
app/controllers/api/v1/trends/links_controller.rb [new file with mode: 0644]
app/controllers/api/v1/trends/tags_controller.rb [new file with mode: 0644]
app/controllers/api/v1/trends_controller.rb [deleted file]
app/helpers/admin/filter_helper.rb
app/helpers/languages_helper.rb [new file with mode: 0644]
app/helpers/settings_helper.rb
app/javascript/mastodon/components/admin/Counter.js
app/javascript/mastodon/components/admin/Dimension.js
app/javascript/mastodon/components/admin/Trends.js
app/javascript/styles/mastodon/accounts.scss
app/javascript/styles/mastodon/dashboard.scss
app/lib/activitypub/activity.rb
app/lib/activitypub/activity/announce.rb
app/lib/activitypub/activity/create.rb
app/lib/admin/metrics/dimension.rb
app/lib/admin/metrics/dimension/base_dimension.rb
app/lib/admin/metrics/dimension/languages_dimension.rb
app/lib/admin/metrics/dimension/tag_languages_dimension.rb [new file with mode: 0644]
app/lib/admin/metrics/dimension/tag_servers_dimension.rb [new file with mode: 0644]
app/lib/admin/metrics/measure.rb
app/lib/admin/metrics/measure/active_users_measure.rb
app/lib/admin/metrics/measure/base_measure.rb
app/lib/admin/metrics/measure/interactions_measure.rb
app/lib/admin/metrics/measure/tag_accounts_measure.rb [new file with mode: 0644]
app/lib/admin/metrics/measure/tag_servers_measure.rb [new file with mode: 0644]
app/lib/admin/metrics/measure/tag_uses_measure.rb [new file with mode: 0644]
app/lib/link_details_extractor.rb
app/mailers/admin_mailer.rb
app/models/account_statuses_cleanup_policy.rb
app/models/form/preview_card_batch.rb [new file with mode: 0644]
app/models/form/preview_card_provider_batch.rb [new file with mode: 0644]
app/models/form/tag_batch.rb
app/models/preview_card.rb
app/models/preview_card_filter.rb [new file with mode: 0644]
app/models/preview_card_provider.rb [new file with mode: 0644]
app/models/preview_card_provider_filter.rb [new file with mode: 0644]
app/models/tag.rb
app/models/tag_filter.rb
app/models/trending_tags.rb [deleted file]
app/models/trends.rb [new file with mode: 0644]
app/models/trends/base.rb [new file with mode: 0644]
app/models/trends/history.rb [new file with mode: 0644]
app/models/trends/links.rb [new file with mode: 0644]
app/models/trends/tags.rb [new file with mode: 0644]
app/policies/preview_card_policy.rb [new file with mode: 0644]
app/policies/preview_card_provider_policy.rb [new file with mode: 0644]
app/serializers/rest/trends/link_serializer.rb [new file with mode: 0644]
app/services/fetch_link_card_service.rb
app/services/post_status_service.rb
app/services/process_hashtags_service.rb
app/services/reblog_service.rb
app/views/admin/dashboard/index.html.haml
app/views/admin/tags/_tag.html.haml [deleted file]
app/views/admin/tags/index.html.haml [deleted file]
app/views/admin/tags/show.html.haml
app/views/admin/trends/links/_preview_card.html.haml [new file with mode: 0644]
app/views/admin/trends/links/index.html.haml [new file with mode: 0644]
app/views/admin/trends/links/preview_card_providers/_preview_card_provider.html.haml [new file with mode: 0644]
app/views/admin/trends/links/preview_card_providers/index.html.haml [new file with mode: 0644]
app/views/admin/trends/tags/_tag.html.haml [new file with mode: 0644]
app/views/admin/trends/tags/index.html.haml [new file with mode: 0644]
app/views/admin_mailer/new_trending_links.text.erb [new file with mode: 0644]
app/views/admin_mailer/new_trending_tag.text.erb [deleted file]
app/views/admin_mailer/new_trending_tags.text.erb [new file with mode: 0644]
app/views/application/_sidebar.html.haml
app/workers/scheduler/trends/refresh_scheduler.rb [moved from app/workers/scheduler/trending_tags_scheduler.rb with 57% similarity]
app/workers/scheduler/trends/review_notifications_scheduler.rb [new file with mode: 0644]
config/brakeman.ignore
config/locales/en.yml
config/locales/simple_form.en.yml
config/navigation.rb
config/routes.rb
config/sidekiq.yml
db/migrate/20211031031021_create_preview_card_providers.rb [new file with mode: 0644]
db/migrate/20211112011713_add_language_to_preview_cards.rb [new file with mode: 0644]
db/migrate/20211115032527_add_trendable_to_preview_cards.rb [new file with mode: 0644]
db/migrate/20211123212714_add_link_type_to_preview_cards.rb [new file with mode: 0644]
db/schema.rb
lib/mastodon/snowflake.rb
lib/tasks/repo.rake
spec/controllers/admin/tags_controller_spec.rb
spec/controllers/api/v1/trends/tags_controller_spec.rb [new file with mode: 0644]
spec/controllers/api/v1/trends_controller_spec.rb [deleted file]
spec/helpers/languages_helper_spec.rb [moved from spec/helpers/settings_helper_spec.rb with 56% similarity]
spec/mailers/previews/admin_mailer_preview.rb
spec/models/trending_tags_spec.rb [deleted file]
spec/models/trends/tags_spec.rb [new file with mode: 0644]