Commit Graph

269 Commits

Author SHA1 Message Date
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
Neil Lalonde
e7a6f0698d Update translations 2019-04-05 10:02:54 -04:00
Joffrey JAFFEUX
7c97df6a89
FIX: correctly uses woman version of previously genderless emojis (#7285) 2019-03-29 10:53:29 +01:00
Neil Lalonde
4a7e83d880 Update translations 2019-03-28 10:07:51 -04:00
Gerhard Schlager
d43f4206c7 FEATURE: Add Armenian language 2019-03-28 14:24:14 +01:00
Joffrey JAFFEUX
d91b47064e
FIX: windows has no country flags (#7199) 2019-03-18 19:28:49 +01:00
Joffrey JAFFEUX
126c25a84b
FEATURE: adding early relase unicode emojis (#7188) 2019-03-18 07:23:22 +01:00
Joffrey JAFFEUX
fcb56c7f9d
FIX: emoji sets were inverted due to unicode order change (#7186) 2019-03-15 22:13:14 +01:00
Penar Musaraj
0afa2f4c4c FIX: Use correct emojis for Twitter and Facebook 2019-03-15 16:08:31 -04:00
Joffrey JAFFEUX
aa4b84925a FEATURE: updates emoji to latest 12.0 version (#7095)
* improved emoji support

- always optimize images as part of the task
- use the unicode standard ordering/naming for sections

* UX: more height for when there are recently used
2019-03-15 16:12:07 +01:00
Penar Musaraj
e55c19d8ce DEV: update ACE Editor to 1.4.2
Remove duplicate "src-min" folder and fix rake task

Remove unused "snippets" folder
2019-02-14 11:05:28 -05:00
Neil Lalonde
024ba28525 Update translations 2019-01-28 10:27:20 -05:00
Joffrey JAFFEUX
b520d0efad
pull last Chart.js file (#6902) 2019-01-18 12:25:34 +01:00
Neil Lalonde
d7656f30c3 Update translations 2019-01-02 12:32:38 -05:00
Neil Lalonde
af39624d19 Update translations 2018-10-12 10:40:25 -04:00
Penar Musaraj
4ae9cb28e4 remove probes.js, highlight.pack.js 2018-10-04 13:50:54 -04:00
Penar Musaraj
dc8a16b43b
Use Yarn to manage dependencies, cleanup unused bootstrap libs (#6436) 2018-10-03 10:15:43 -04:00
Gerhard Schlager
b0a383561e FEATURE: Add Lithuanian locale 2018-09-27 05:26:38 +02:00
Joffrey JAFFEUX
4486e238d1
FIX: smiling face with three hearts emoji typo (#6286) 2018-08-19 15:08:05 +02:00
Joffrey JAFFEUX
3fbf7b164d
FEATURE: emoji 11.0 "recently added" update (#6275)
Adds support for emojis in the http://www.unicode.org/emoji/charts-11.0/emoji-released.html list
2018-08-16 11:59:45 +02:00
Neil Lalonde
5c248e3a7a Update translations 2018-08-07 12:05:45 -04:00
Gerhard Schlager
d3e04daa95 Add Swahili language 2018-07-16 18:11:38 +02:00
Gina Haeussge
f0fc38418c FEATURE: Support referrerPolicy on embed iframe
This commit adds a new property "discourseReferrerPolicy" to the
set of supported configuration properties for the comment embed
script. If provided the value will be used to set the "referrerPolicy"
attribute on the iframe created to display the comments. This in turn
will allow embedding pages to define a more lenient referer policy on
the embed iframe for pages whose default policy is so strict it
keeps the comment embed from working.

Example:

  * Setup:
    * Discourse hosted at discourse.example.com
    * Comments embedded at example.com
    * Referrer-Policy at example.com set to 'same-origin'
  * Without this commit:
    * Loading the comments fails due to the referer being empty
  * With this commit and no adjusted configuration:
    * Loading the comments fails due to the referer being empty
      (= same behaviour as without the commit)
  * With this commit and DiscourseEmbed.discourseReferrerPolicy =
    'no-referrer-when-downgrade' as additional configuration:
    * Loading the comments succeeds

Note that this change is of special interest for embedding pages
wanting to restrict data flows under the terms of the GDPR since
it allows selectively whitelisting comment embeds while preventing
referer leaking by default.
2018-06-25 14:59:34 +10:00
Gerhard Schlager
b7bf0e96aa Update translations 2018-05-29 22:01:57 +02:00
Gerhard Schlager
864ada835b FEATURE: Add Bulgarian language 2018-05-29 21:07:17 +02:00
Joffrey JAFFEUX
9e7150a2ad Revert "add a few emoji aliases"
This reverts commit d942bf6282.
2018-05-01 11:04:26 +02:00
Sam
d942bf6282 add a few emoji aliases 2018-05-01 15:07:59 +10:00
Joffrey JAFFEUX
0e15a575f4
EXPERIMENTAL: new dashboard UI
This is the first iteration of an effort towards making a very good dashboard.

Until we feel confident this is good, this dashboard will only be accessible through /admin/dashboard_next
2018-04-16 10:42:06 +02:00
Joffrey JAFFEUX
e053697cfa
FEATURES: updates emojis and adds support for more women emojis! 2018-03-22 11:08:06 +01:00
Neil Lalonde
0c8df32903 Update translations, except ur because of errors 2018-03-07 14:11:56 -05:00
Maja Komel
e2a441ade9 Add Slovenian translations 2018-03-06 20:51:41 +01:00
BadAllOff Shamil
4a7a371557 Fixed typo in page title (#5642)
Fixed typo in page title
2018-03-02 01:55:14 +01:00
Joffrey JAFFEUX
aa990604c5 Adds :puke: as alias to :face_vomiting: 2018-02-24 17:11:04 +01:00
Neil Lalonde
32ad98161f Update translations 2018-02-15 16:36:03 -05:00
Neil Lalonde
f7042ecc85 Update translations 2018-01-31 11:19:21 -05:00
Bruno Perel
6750ff6873 (S)CSS cleanup: 0px => O and removal of duplicated properties (#5526) 2018-01-25 09:53:36 -05:00
Arpit Jalan
d18900c24b Update Chart.min.js to latest version 2018-01-15 12:41:03 +05:30
Joffrey JAFFEUX
abde97c5c0 FEATURE: updates emojis to last revision 2018-01-05 11:01:23 +01:00
Joffrey JAFFEUX
e7d1d4eddf FIX: correct shushing_face name 2018-01-05 11:01:23 +01:00
blokovi
0df1c85fd3 FEATURE: Serbian translation (#5443) 2017-12-19 12:26:06 +01:00
Kyle Zhao
c52f747031 FEATURE: Catalan Translations (#5404) 2017-12-07 10:36:25 +01:00
Neil Lalonde
978cf9485f Update translations 2017-12-06 10:25:12 -05:00
Jeff Wong
b094894c94 Feature: Add service worker registration method to plugin API 2017-11-28 14:01:41 +08:00
Penar Musaraj
bd1616d3d9 Add offline route and service worker to fix Android app install banner (#5217)
* set up static offline.html route and service worker for Android Web App Banner

* add viewport meta tag to offline view for android app banner

* add i18n support for offline.html pages, cleanup

* fix html syntax, add page title, remove license for service-worker.js
2017-10-31 10:46:48 +11:00
Guo Xiang Tan
77d4c4d8dc Fix all the errors to get our tests green on Rails 5.1. 2017-09-25 13:48:58 +08:00
Neil Lalonde
ea969d1ed0 FEATURE: add Thai language 2017-08-25 12:33:09 -04:00
Sam
bcf7dc38c2 FEATURE: server side support for upload:// markdown
This allows uploads to be specified using short sha1 hash instead of full
URL

Client side change is pending
2017-08-22 11:46:23 -04:00
Neil Lalonde
3b7657e4b3 Update translations 2017-08-16 11:38:45 -04:00
Neil Lalonde
130ae2cd4b FEATURE: add Latvian language 2017-08-15 11:40:00 -04:00
Joffrey JAFFEUX
da5e7dc876 FIX: Pull last emoji-db revision
This commit will add new images in some sets and fix a bug where
🤦‍♂️ was using :person_facepalming: image which is in fact
represented as a woman in most sets.
2017-07-29 13:12:45 +02:00