discourse/lib/tasks
David Taylor 0e303c7f5d
FEATURE: Automatically generate optimized site metadata icons (#7372)
This change automatically resizes icons for various purposes. Admins can now upload `logo` and `logo_small`, and everything else will be auto-generated. Specific icons can still be uploaded separately if required.

## Core

- Adds an SiteIconManager module which manages automatic resizing and fallback

- Icons are looked up in the OptimizedImage table at runtime, and then cached in Redis. If the resized version is missing for some reason, then most icons will fall back to the original files. Some icons (e.g. PWA Manifest) will return `nil` (because an incorrectly sized icon is worse than a missing icon). 

- `SiteSetting.site_large_icon_url` will return the optimized version, including any fallback. `SiteSetting.large_icon` continues to return the upload object. This means that (almost) no changes are required in core/plugins to support this new system.

- Icons are resized whenever a relevant site setting is changed, and during post-deploy migrations

## Wizard

- Allows `requiresRefresh` wizard steps to reload data via AJAX instead of a full page reload

- Add placeholders to the **icons** step of the wizard, which automatically update from the "Square Logo"

- Various copy updates to support the changes

- Remove the "upload-time" resizing for `large_icon`. This is no longer required.

## Site Settings UX

- Move logo/icon settings under a new "Branding" tab

- Various copy changes to support the changes

- Adds placeholder support to the `image-uploader` component

- Automatically reloads site settings after saving. This allows setting placeholders to change based on changes to other settings

- Upload site settings will be assigned a placeholder if SiteIconManager `responds_to?` an icon of the same name

## Dashboard Warnings

- Remove PWA icon and PWA title warnings. Both are now handled automatically.

## Bonus

- Updated the sketch logos to use @awesomerobot's new high-res designs
2019-05-01 14:44:45 +01:00
..
add_topic_to_quotes.rake Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
admin.rake DEV: allow creating users with random passwords via rake 2018-12-18 11:43:16 +08:00
api.rake Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
assets.rake DEV: No need to carry two brotli implementations around 2019-04-11 16:53:29 +10:00
auto_annotate_models.rake Update Rubocop to 0.60 2018-12-04 10:48:16 +01:00
autospec.rake Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
avatars.rake fix the build 2019-04-25 20:19:52 +05:30
backfill.thor Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
build_test_topic.rake Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
build.rake Extend config/version.rb with more informations (#5061) 2017-08-28 12:24:56 -04:00
categories.rake make rubocop happy 2018-08-16 14:03:46 +05:30
cdn.rake Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
db.rake FEATURE: Automatically generate optimized site metadata icons (#7372) 2019-05-01 14:44:45 +01:00
destroy.rake FIX: Allow rake destroy:topics to delete topics in sub-categories 2018-09-10 12:52:14 +01:00
docker.rake DEV: Make setting up of multisite DB in test env clearer. 2019-03-21 09:58:07 +08:00
emails.rake Fix SMTP connection test 2019-03-15 09:50:51 -04:00
emoji.rake FIX: windows has no country flags (#7199) 2019-03-18 19:28:49 +01:00
export.rake variable name typo 2018-05-28 19:21:06 +05:30
i18n.rake FIX: seed data classes couldn't always be found 2019-03-18 23:13:47 +01:00
images.rake FIX: images:compress rake task 2019-03-15 15:23:57 +01:00
import.rake Remove support for disable_jump_reply user setting (#7359) 2019-04-12 09:03:06 +10:00
integration.rake Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
javascript.rake DEV: Remove HTML parser from Tautologistics. (#7344) 2019-04-10 11:21:22 +02:00
maxminddb.rake FEATURE: Refresh MaxmindDb during assets:precompile. (#7340) 2019-04-10 11:37:29 +02:00
plugin.rake do not skip until we re-merge ember 3.7 (#7183) 2019-03-15 18:31:24 +01:00
populate.thor Fix user is nil in populate posts. 2017-07-15 15:39:21 +02:00
posts.rake Recover missing old scheme uploads from tombstone directory too. 2019-04-29 11:33:57 +05:30
qunit.rake DEV: Move run-qunit.js out of the vendor directory 2018-12-03 16:16:37 +00:00
redis.rake Add rake task to clean up orphane Redis keys when a multisite has been removed. 2016-12-05 11:39:08 +08:00
release_note.rake Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
rspec.rake protect against crash in prd 2013-05-21 10:08:33 +10:00
s3.rake FIX: upload method in S3Helper will expect a file object param 2019-01-04 15:30:45 +05:30
scheduler.rake DEV: nuke code dependent comments from scheduler.rake 2018-12-10 16:16:19 +05:30
search.rake FEATURE: search within title using in:title 2018-02-20 14:41:21 +11:00
site_settings.rake Exit with an error if there are errors with settings import (#6475) 2018-10-11 15:57:57 +08:00
smoke_test.rake Revert "Smoke test should wait up to 5 minutes before it fails" 2018-06-11 08:47:57 +08:00
svg_icons.rake Upgrade to FontAwesome 5 (take two) (#6673) 2018-11-26 16:49:57 -05:00
tags.rake new rake task to bulk tag all topics in a category 2018-08-16 13:56:57 +05:30
topics.rake FEATURE: Locale support for seeded categories and topics (#7110) 2019-03-18 21:09:13 +01:00
typepad.thor Enable Lint/ShadowingOuterLocalVariable for Rubocop. 2018-09-04 10:16:42 +08:00
uploads.rake DEV: Fix hardcoded value introduced in cc2bac86e9. 2019-03-26 07:45:21 +08:00
user_actions.rake FEATURE: New 'Reviewable' model to make reviewable items generic 2019-03-28 12:45:10 -04:00
users.rake FIX: list staff users within the last month 2019-01-14 10:29:00 -05:00