discourse/db/fixtures
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
..
001_refresh.rb FEATURE: Locale support for seeded categories and topics (#7110) 2019-03-18 21:09:13 +01:00
002_groups.rb DEV: organise fixture so all drops happen at the end 2018-06-07 15:53:54 +10:00
003_post_action_types.rb FIX: Don't seed flags if ids don't exist 2018-10-25 15:36:24 -04:00
004_screened_ip_addresses.rb added quick start guide to seeds 2013-12-16 12:46:46 +11:00
005_badge_types.rb FIX: fixture order 2014-07-08 07:17:44 +10:00
006_badges.rb FIX: Badges appeared in wrong badge group 2019-01-21 21:09:33 +01:00
007_web_hook_event_types.rb FEATURE: New 'Reviewable' model to make reviewable items generic 2019-03-28 12:45:10 -04:00
009_users.rb FEATURE: add more granular user option levels for email notifications (#7143) 2019-03-15 10:55:11 -04:00
010_uploads.rb FEATURE: Automatically generate optimized site metadata icons (#7372) 2019-05-01 14:44:45 +01:00
500_categories.rb FIX: seed data classes couldn't always be found 2019-03-18 23:13:47 +01:00
600_themes.rb UX: Preview multiple color schemes in wizard (#6151) 2018-07-24 09:00:20 -04:00
990_settings.rb DEV: organise fixture so all drops happen at the end 2018-06-07 15:53:54 +10:00
990_topics.rb FIX: seed data classes couldn't always be found 2019-03-18 23:13:47 +01:00