Commit Graph

37358 Commits

Author SHA1 Message Date
6fb0f36ce1 FEATURE: Optionally delete bookmark when reminder sent (#9637)
We now show an options gear icon next to the bookmark name.

When expanded we show the "delete bookmark when reminder sent" option. The value of this checkbox is saved in local storage for the user.

If this is ticked, when a reminder is sent for the bookmark the bookmark itself is deleted. This is so people can use the reminder functionality by itself.

Also remove the blue alert reminder section from the "Edit Bookmark" modal as it just added clutter, because the user can already see they had a reminder set:

Adds a default false boolean column `delete_when_reminder_sent` to bookmarks.
2020-05-07 13:37:39 +10:00
423802fbce UX: Fix modal positioning when iOS keyboard is visible 2020-05-06 23:06:57 -04:00
33c8adda83 UX: Adjust admin menu to better fit short (horizontal) viewports 2020-05-06 22:59:22 -04:00
0d394e6b76 FEATURE: Include category position when exporting categories (#9658) 2020-05-07 12:17:15 +10:00
f782c3019c FIX: Improve topic timeline calculation logic
Followup to 999e2ff5

Switching between the topic timeline and the progress bar was buggy when
resizing the composer. The root of the problem is that we can't know
the height of the timeline once it's hidden from view.

This uses a magic number for the calucation, which in this case is
necessary. Additionally, the calculation now takes place when
the resizing of the composer ends (previously, it was triggered when
dragging was started, which caused issues when resizing slowly).
2020-05-06 21:48:22 -04:00
7052e6f4a1 UX: remove top padding from reddit onebox description 2020-05-07 07:13:37 +05:30
6e2060e973 Remove extra category whitespace on category+latest/top pages 2020-05-06 21:19:46 -04:00
7e303f9320 DEV: Upgrade sinon and fix time based bookmark tests (#9647)
Update sinon.js to 9.0.2 to access async fake timers https://sinonjs.org/releases/v9.0.2/fake-timers/ which can then be used with acceptance tests (previously useFakeTimers didn't work with await, e.g. for visit).

Fix the bookmark acceptance test that was time based to use these new fake timers.

Add a fakeTime function that uses moment and the provided date string + timezone to freeze time using useFakeTimers and return a clock.

Add a timeStep function that accepts a clock from fakeTime and a function to run. Once the function is run we call clock.tickAsync(1000) to progress the fake clock forward 1s to progress promises/callbacks.
2020-05-07 09:10:32 +10:00
3d6c952c3e UX: remove bold to de-emphasize category names on visited topics 2020-05-06 18:02:39 -04:00
05799538e6 FIX: correct edit notification username for PMs (#9649)
When the tag is added to PM by admin, notification has an incorrect username (post author username instead of admin username)
2020-05-07 07:52:21 +10:00
ec2f3169ff FIX: Using the default_locale in locale fallbacks caused problems
Locale files get precompiled after deployment and they contained translations from the `default_locale`. That's especially bad in multisites, because the initial `default_locale` is `en_US`. Sites where the `default_locale` isn't `en_US` could see missing translations. The same thing could happen when users are allowed to chose a different locale.

This change simplifies the logic by not using the `default_locale` in the locale chain. It always falls back to `en` in case of missing translations.
2020-05-06 22:59:07 +02:00
15a938e861 FIX: make can_invite_to_forum robust against plugin interference (#9644) 2020-05-06 13:57:26 -07:00
97657aa322 Don't precompile preload-store 2020-05-06 16:47:04 -04:00
029d091ea8 FIX: displays poll's close date in local time (#9656) 2020-05-06 22:18:47 +02:00
7acb25db12 FIX: preload-store was moved 2020-05-06 15:55:52 -04:00
01929e3505 DEV: Move preload-store to discourse/lib/preload-store
It's only used inside Discourse so it needn't be its own module
2020-05-06 15:28:06 -04:00
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
666823d4b7 Revert "Revert "DEV: Move rubocop config to rubocop-discourse (#9616)""
This reverts commit 2d31a14789f00243d75e368cb781e6944a61b16f.

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

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
2d31a14789 Revert "DEV: Move rubocop config to rubocop-discourse (#9616)"
This reverts commit e23f1a907134d5241101109401b2a097132c81ee.

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
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
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
70bf1669be DEV: Use a copy of the fixture file instead of the original one (#9645) 2020-05-06 11:54:08 -03:00
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
10ca6968af Bump onebox version
- reuse existing video icon class
- CSS changes for reddit video onebox
2020-05-06 19:34:03 +05:30
eda2d184d6 Backwards compatibility for raw-templates lib 2020-05-06 09:14:19 -04:00
e23f1a9071 DEV: Move rubocop config to rubocop-discourse (#9616) 2020-05-06 15:03:06 +02:00
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
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
5121708814 Add styling for Reddit video onebox.
0d49811aac
2020-05-06 15:58:30 +05:30
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
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
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
4f26893d57 UX: Fix time alignment on user activity pages 2020-05-06 00:02:49 -04:00
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
b299f5f491 DEV: Use Ember.Service over manually registering a factory.
Follow up to 9e827eb420c7aefd166fba1e7724eced81aaffe7
2020-05-06 09:24:49 +08:00
4e1c2fbd18 UX: Add prefixed property so Firefox also gets 4-space tabs in code 2020-05-05 21:00:40 -04:00
0a766b594e add class for topic-list dismiss button container 2020-05-05 19:50:00 -04:00
27d1a605af revert spacing reduction from 4afbcb9 2020-05-05 17:31:35 -04:00
e27f07e57d minor followup to 657facb 2020-05-05 17:18:36 -04:00
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
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
279835f603 DEV: Remove more Discourse. globals 2020-05-05 14:42:47 -04:00
4cf3dbe3db DEV: Remove Discourse. global variable usage in initializers 2020-05-05 14:14:38 -04:00
2edee74718 FIX: Flaky tests. Due to CSS transitions opacity might not be 0 yet. 2020-05-05 13:45:14 -04:00
bae813fac6 fix linting 2020-05-05 18:29:19 +02:00
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
657facb1d5 FIX: Fixes wrapping of buttons with larger buttons
Thanks to Kris for solution
2020-05-05 10:51:49 -05:00
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
1019789d1a FIX: Resolve Schema.org validation issues 2020-05-05 16:57:16 +03:00