Commit Graph

37242 Commits

Author SHA1 Message Date
Kyle E. Mitchell 6c968b7945
Add script for compiling copyright deposits (#9646)
* Add script for compiling copyright deposits

* git mv copyright-deposit script/
2020-05-06 12:51:45 -04:00
Jarek Radosz 666823d4b7 Revert "Revert "DEV: Move rubocop config to rubocop-discourse (#9616)""
This reverts commit 2d31a14789.

Should be good now - all the plugins are using the updated rubocop config.
2020-05-06 18:41:15 +02:00
Robin Ward f5bdbd347e Revert "FIX: Discobot has not been created with our custom avatar."
This reverts commit 1062dbc3e9.

Looks like it's causing some errors on migration.

```
/var/www/discourse/lib/image_sizer.rb:6:in `resize'
/var/www/discourse/lib/upload_creator.rb:120:in `block in create_for'
/var/www/discourse/lib/distributed_mutex.rb:33:in `block in synchronize'
/var/www/discourse/lib/distributed_mutex.rb:29:in `synchronize'
/var/www/discourse/lib/distributed_mutex.rb:29:in `synchronize'
/var/www/discourse/lib/distributed_mutex.rb:14:in `synchronize'
/var/www/discourse/lib/upload_creator.rb:37:in `create_for'
```
2020-05-06 11:28:42 -04:00
Jarek Radosz 2d31a14789 Revert "DEV: Move rubocop config to rubocop-discourse (#9616)"
This reverts commit e23f1a9071.

Reverting as this currently breaks our plugin linting job in GithHub Action and Jenkins. Will re-revert after all the plugins get the latest rubocop config and/or a (potential) rubocop issue is fixed.
2020-05-06 17:22:25 +02:00
Joffrey JAFFEUX 2f714c7412
FIX: end date of ranges in html preview was incorrect (#9654)
This commit also remove an unused block of code as previewedTimezones can't be empty anymore.
2020-05-06 17:16:36 +02:00
Joffrey JAFFEUX c99ecba68f
DEV: improves sk api (#9653)
- reduces the API to 3 actions for now: appendContent/prependContent/onChange
- well tested
- removes all previous APIS which were only half supported or too dangerous as they could collide with other plugins or core behaviors
- this plugins also puts every sk test helpers in one file
2020-05-06 17:16:20 +02:00
Roman Rizzi 70bf1669be
DEV: Use a copy of the fixture file instead of the original one (#9645) 2020-05-06 11:54:08 -03:00
Robin Ward 7c2d3275f4 DEV: Remove `Discourse` constants from focus mixin.
Also removes the mixin which was only used in `app/app`
2020-05-06 10:36:08 -04:00
Arpit Jalan 10ca6968af Bump onebox version
- reuse existing video icon class
- CSS changes for reddit video onebox
2020-05-06 19:34:03 +05:30
Robin Ward eda2d184d6 Backwards compatibility for raw-templates lib 2020-05-06 09:14:19 -04:00
Jarek Radosz e23f1a9071
DEV: Move rubocop config to rubocop-discourse (#9616) 2020-05-06 15:03:06 +02:00
Arpit Jalan 8ede0e7bc2 Bump onebox version.
- add linkedin and meetedgar to whitelist
- FEATURE: reddit video onebox
- FEATURE: facebook video onebox
2020-05-06 17:55:00 +05:30
David Taylor 72ad701df0
DEV: Stub #flush in StdOutDemux for multisite:migrate
https://meta.discourse.org/t/multisite-migrate-error/150579/2
2020-05-06 11:58:35 +01:00
Arpit Jalan 5121708814 Add styling for Reddit video onebox.
0d49811aac
2020-05-06 15:58:30 +05:30
Sam Saffron f8c18ac888
DEV: remove fragile spec
The failover spec is very fragile and tests specific implementation
vs actual behavior

We rely on a different script during the build process to test
failover operates correctly
2020-05-06 16:21:48 +10:00
Martin Brennan fa572d3a7a
DEV: Remove all code referencing at_desktop bookmark reminders (#9650)
We have found no need for these reminder types, so we are removing the code for them.
2020-05-06 15:22:43 +10:00
Martin Brennan 4239ca1f8d
FIX: Change user digest email total unread notification calculation (#9648)
We now add together unread notifications (which are low-priority only) and unread high priority notifications (PMs and bookmark reminder notifications), and removed the separate "X unread high priority notifications" count in the user digest email.
2020-05-06 14:23:13 +10:00
Kris 4f26893d57 UX: Fix time alignment on user activity pages 2020-05-06 00:02:49 -04:00
Guo Xiang Tan 1062dbc3e9 FIX: Discobot has not been created with our custom avatar.
Previously the image was imported from a Discourse hosted CDN but the
URL has since become invalid. However, it was not caught since all
errors are rescued. This commit fixes the issue by shipping the user
avatar with the plugin.
2020-05-06 09:25:01 +08:00
Guo Xiang Tan b299f5f491 DEV: Use Ember.Service over manually registering a factory.
Follow up to 9e827eb420
2020-05-06 09:24:49 +08:00
Kris 4e1c2fbd18 UX: Add prefixed property so Firefox also gets 4-space tabs in code 2020-05-05 21:00:40 -04:00
Kris 0a766b594e add class for topic-list dismiss button container 2020-05-05 19:50:00 -04:00
Kris 27d1a605af revert spacing reduction from 4afbcb9 2020-05-05 17:31:35 -04:00
Kris e27f07e57d minor followup to 657facb 2020-05-05 17:18:36 -04:00
Kane York e7443ab5da
FIX: Preserve code blocks when quoting (#9632)
But, produce a non-block quote if a single code line is quoted.
2020-05-05 12:12:22 -07:00
Robin Ward e1d64cf896 DEV: Have `app/app` export a class not an instance.
The app boot should call `create()`
2020-05-05 14:54:13 -04:00
Robin Ward 279835f603 DEV: Remove more `Discourse.` globals 2020-05-05 14:42:47 -04:00
Robin Ward 4cf3dbe3db DEV: Remove `Discourse.` global variable usage in initializers 2020-05-05 14:14:38 -04:00
Robin Ward 2edee74718 FIX: Flaky tests. Due to CSS transitions opacity might not be 0 yet. 2020-05-05 13:45:14 -04:00
Jordan Vidrine bae813fac6
fix linting 2020-05-05 18:29:19 +02:00
Robin Ward 612284cef3
DEV: Remove `Discourse.RAW_TEMPLATES` (#9630)
We were sharing `Discourse` both as an application object and a
namespace which complicated things for Ember CLI. This patch
moves raw templates into `__DISCOURSE_RAW_TEMPLATES` and adds
a couple helper methods to create/remove them.
2020-05-05 12:15:03 -04:00
Jordan Vidrine 657facb1d5
FIX: Fixes wrapping of buttons with larger buttons
Thanks to Kris for solution
2020-05-05 10:51:49 -05:00
David Taylor 0be68f147a
FIX: Avoid using a temporary table in image url database migration
When using pgbouncer without a transaction, it's possible for the connection to change between statements in a migration. Instead, create a real table, and drop it when the migration is finished
2020-05-05 16:29:39 +01:00
Dan Ungureanu 1019789d1a
FIX: Resolve Schema.org validation issues 2020-05-05 16:57:16 +03:00
Zdravko Curic 8010e1ab2e
DEV: Add remove button function to PluginAPI (#9627) 2020-05-05 09:18:02 -04:00
Joffrey JAFFEUX 6b14a0f352
FIX: apply sameWidth from 450px screen width 2020-05-05 13:01:02 +02:00
Joffrey JAFFEUX bd0abddf6f
UX: attempts to have a better use of available space with sk (#9639) 2020-05-05 12:59:47 +02:00
David Taylor 04e4932307
DEV: Skip time-dependent bookmark test 2020-05-05 09:50:50 +01:00
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
Martin Brennan 5cf6984a1a
FIX: Pre-select Later Today on bookmark edit if the time is the same (#9636)
If the user chooses "Later Today" as the reminder for a bookmark, then edits that bookmark, we should pre-select "Later Today" if that time has not changed (e.g. later is still 6pm). We do this to avoid confusion instead of opening the custom date + time section.
2020-05-05 16:28:31 +10:00
Martin Brennan 6aa9014509
UX: Bookmark removal tweaks (#9635)
* Do not show confirmation modal if deleting bookmark from list unless the bookmark has a reminder
* Remove the deleted bookmark from the in-memory array for the user list so a full reload of the list is not needed and scrolling is maintained
2020-05-05 14:56:04 +10:00
Krzysztof Kotlarek 9bff0882c3
FEATURE: Nokogumbo (#9577)
* FEATURE: Nokogumbo

Use Nokogumbo HTML parser.
2020-05-05 13:46:57 +10:00
tshenry b8b1cbbfb9
UX: Improve second factor UI (#9526)
This will make a few minor improvements to the second factor user interface. Highlights include:

- Using the site's title to prefix the backup code filename. If non-ascii characters are detected, then prefix "discourse" instead.
- Add icons and change the text on some of the buttons for better clarity and consistency
- Add an education link to the security key modal
2020-05-05 11:05:25 +10:00
Rafael dos Santos Silva d59d170452
FIX: PostgreSQL fallback was broken due to Rails masking exception (#9633)
The PR https://github.com/rails/rails/pull/36612 changes the raised exception
if the error message includes the target database name.

Since the error message contains the hostname, this could be triggered when
the hostname contains the database name.
2020-05-05 10:34:25 +10:00
Kris 0ee796f66d revert 4afbcb9 2020-05-04 19:40:51 -04:00
Penar Musaraj a610a762d1 DEV: Deprecated icon name fix 2020-05-04 15:58:35 -04:00
Penar Musaraj 5706cab897
FIX: Improve digest email styling on Outlook 2016 (#9626) 2020-05-04 14:07:03 -04:00
Joffrey JAFFEUX a2c85f0845
DEV: use the existing parsePostData function (#9629) 2020-05-04 18:35:04 +02:00
Joffrey JAFFEUX 70b1e98609
FIX: reverts to use an observer to support loading more notifications (#9628)
Apparently, didReceiveAttrs is not called when loading more notifications, this would require a more heavy refactoring.
2020-05-04 18:23:45 +02:00
Neil Lalonde c6b31464db
Version bump to v2.5.0.beta4 2020-05-04 11:44:42 -04:00