discourse/app/jobs/regular
David Taylor 03818e642a
FEATURE: Include optimized thumbnails for topics (#9215)
This introduces new APIs for obtaining optimized thumbnails for topics. There are a few building blocks required for this:

- Introduces new `image_upload_id` columns on the `posts` and `topics` table. This replaces the old `image_url` column, which means that thumbnails are now restricted to uploads. Hotlinked thumbnails are no longer possible. In normal use (with pull_hotlinked_images enabled), this has no noticeable impact

- A migration attempts to match existing urls to upload records. If a match cannot be found then the posts will be queued for rebake

- Optimized thumbnails are generated during post_process_cooked. If thumbnails are missing when serializing a topic list, then a sidekiq job is queued

- Topic lists and topics now include a `thumbnails` key, which includes all the available images:
   ```
   "thumbnails": [
   {
     "max_width": null,
     "max_height": null,
     "url": "//example.com/original-image.png",
     "width": 1380,
     "height": 1840
   },
   {
     "max_width": 1024,
     "max_height": 1024,
     "url": "//example.com/optimized-image.png",
     "width": 768,
     "height": 1024
   }
   ]
  ```

- Themes can request additional thumbnail sizes by using a modifier in their `about.json` file:
   ```
    "modifiers": {
      "topic_thumbnail_sizes": [
        [200, 200],
        [800, 800]
      ],
      ...
  ```
  Remember that these are generated asynchronously, so your theme should include logic to fallback to other available thumbnails if your requested size has not yet been generated

- Two new raw plugin outlets are introduced, to improve the customisability of the topic list. `topic-list-before-columns` and `topic-list-before-link`
2020-05-05 09:07:50 +01:00
..
admin_confirmation_email.rb UX: show user email address on "grant admin access" email and UI 2019-11-04 14:47:00 +05:30
anonymize_user.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
automatic_group_membership.rb UX: drop the `automatic_membership_retroactive` column from groups model. (#9430) 2020-04-22 22:07:39 +05:30
backup_chunks_merger.rb PERF: Remove database query when publishing to staff users. 2020-04-27 11:50:21 +08:00
bulk_grant_trust_level.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
bulk_invite.rb DEV: Apply Rubocop redundant return style 2019-11-14 15:10:51 -05:00
bulk_user_title_update.rb FIX: Unassign user titles when a badge is deleted (#9573) 2020-05-02 18:02:28 -07:00
bump_topic.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
confirm_sns_subscription.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
crawl_topic_link.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
create_avatar_thumbnails.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
create_backup.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
create_user_reviewable.rb Link website when reviewing users 2020-02-19 10:18:05 -05:00
critical_user_email.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
delete_inaccessible_notifications.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
delete_replies.rb FIX: jobs/delete_replies: Add Time+Duration, not Time+Time #9314 2020-04-03 09:23:40 +05:30
delete_topic.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
download_avatar_from_url.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
download_backup_email.rb FIX: Replace deprecated URI.encode, URI.escape, URI.unescape and URI.unencode (#8528) 2019-12-12 12:49:21 +10:00
download_profile_background_from_url.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
emit_web_hook_event.rb DEV: stop freezing frozen strings 2020-04-30 16:48:53 +10:00
enable_bootstrap_mode.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
export_csv_file.rb DEV: Fix typo 2020-04-29 12:38:57 +03:00
feature_topic_users.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
generate_topic_thumbnails.rb FEATURE: Include optimized thumbnails for topics (#9215) 2020-05-05 09:07:50 +01:00
invite_email.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
invite_password_instructions_email.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
make_embedded_topic_visible.rb FIX: Concurrency issues with making topic embedded posts visible 2020-04-20 15:11:59 -04:00
mass_award_badge.rb FEATURE: Support uploading a csv with either user emails or usernames (#8971) 2020-02-18 10:53:12 -03:00
notify_category_change.rb FIX: correct notification when tag or category is added (#8801) 2020-01-29 11:03:47 +11:00
notify_mailing_list_subscribers.rb FIX: Respect muted tags for mailing list mode 2020-02-19 15:14:42 -05:00
notify_moved_posts.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
notify_post_revision.rb FIX: Use destroy_all instead of delete_all for shared drafts 2020-03-05 11:13:43 -08:00
notify_reviewable.rb FIX: Only show the review page to users that can see it. Do not publish the reviewable count update message to everyone. (#9556) 2020-04-27 14:51:25 -03:00
notify_tag_change.rb FIX: correct notification when tag or category is added (#8801) 2020-01-29 11:03:47 +11:00
post_alert.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
process_bulk_invite_emails.rb FIX: Zeitwerk-related fixes for jobs. (#8219) 2019-10-21 20:25:35 +03:00
process_email.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
process_post.rb DEV: Remove `bypass_bump` from CookedPostProcessor (#9468) 2020-04-21 03:48:19 +02:00
process_sns_notification.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
publish_topic_to_category.rb FIX: Topics should honor auto-close when published to category (#8963) 2020-03-02 14:21:35 -05:00
pull_hotlinked_images.rb FEATURE: Nokogumbo (#9577) 2020-05-05 13:46:57 +10:00
push_notification.rb FIX: Do not make notification API call if push_url is blank 2019-10-16 10:59:06 -04:00
rebake_custom_emoji_posts.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
rebake_posts_for_upload.rb FIX: Mark secure media upload insecure automatically if used for theme component (#8413) 2019-11-28 07:32:17 +10:00
retrieve_topic.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
run_heartbeat.rb DEV: Replace `Time.new` with `Time.now` (#9142) 2020-03-09 17:37:49 +01:00
send_push_notification.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
send_system_message.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
suspicious_login.rb FIX: Zeitwerk-related fixes for jobs. (#8219) 2019-10-21 20:25:35 +03:00
toggle_topic_closed.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
topic_action_converter.rb FIX: Limit personal message participants when converting from topic (#9343) 2020-04-03 16:42:01 +01:00
topic_reminder.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
truncate_user_flag_stats.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
unpin_topic.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
update_gravatar.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
update_group_mentions.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
update_s3_inventory.rb FEATURE: Add hidden setting to disable configuration of inventory bucket 2020-01-14 17:23:12 +01:00
update_top_redirection.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
update_topic_upload_security.rb FEATURE: Update upload security status on post move, topic conversion, category change (#8731) 2020-01-23 12:01:10 +10:00
update_username.rb FEATURE: Nokogumbo (#9577) 2020-05-05 13:46:57 +10:00
user_email.rb DEV: update rubocop to version 0.77 2019-12-10 11:48:39 +11:00