Commit Graph

37388 Commits

Author SHA1 Message Date
69ef0da4c2 FIX: preload-store was removed 2020-05-07 11:00:47 -04:00
3cd412ae02 REFACTOR: removes useless variable assignment (#9666) 2020-05-07 16:41:26 +02:00
1dd9df9cd0 REFACTOR: removes overwritten properties and duplicates fn (#9686) 2020-05-07 16:39:53 +02:00
265baa40c6 REFACTOR: useless conditional as 'data' always evaluates to true (#9685) 2020-05-07 16:38:38 +02:00
99c3ce03cb REFACTOR: removes superfluous argument (#9684)
hideTooltip doesnt accept any argument
2020-05-07 16:38:23 +02:00
206d45fd96 REFACTOR: removes superfluous argument (#9683) 2020-05-07 16:38:09 +02:00
9846c43d93 REFACTOR: removes use of undeclared variable (#9682) 2020-05-07 16:37:56 +02:00
af78d188b8 REFACTOR: removes useless self assignment (#9681) 2020-05-07 16:37:20 +02:00
23d585f255 REFACTOR: removes unreachable statement (#9680) 2020-05-07 16:37:02 +02:00
8be0ba3aa4 REFACTOR: function was incorrectly called as a constructor (#9679) 2020-05-07 16:36:29 +02:00
e74170cd9e REFACTOR: Superfluous arguments passed to function resolveSize (#9678)
resolveSize accepts only one param
2020-05-07 16:36:15 +02:00
affc79bb68 REFACTOR: removes useless assignment to local variable (#9676) 2020-05-07 16:35:54 +02:00
08e8ae82cc REFACTOR: removes useless conditional (#9677) 2020-05-07 16:34:49 +02:00
a078b086ba REFACToR: removes useless assignment to local variable (#9675) 2020-05-07 16:34:36 +02:00
a04b226c2b REFACTOR: removes useless conditional (#9674)
We already check if there's a post in the line before.
2020-05-07 16:34:25 +02:00
d5fe1279bd REFACTOR: value assigned to precision here is unused (#9673) 2020-05-07 16:34:14 +02:00
a2109bd9b2 REFACTOR: value assigned to cp here is unused. (#9672) 2020-05-07 16:30:51 +02:00
930989d462 REFACTOR: variable '_postSnapshot' always evaluates to true (#9671) 2020-05-07 16:28:28 +02:00
d020e70643 REFACTOR: removes unreachable return statement (#9670) 2020-05-07 16:27:53 +02:00
48375db848 REFACTOR: removes superfluous argument passed to findWidget (#9669)
findWidget accepts only one argument
2020-05-07 16:27:15 +02:00
5a201082c7 REFACTOR: removes useless conditional (#9667)
This use of variable 'content' always evaluates to true.
2020-05-07 16:25:44 +02:00
864f48b2e6 REFACTOR: removes useless conditional (#9668)
Given we will return true on the line before if inlineEmoji, this will always be false.
2020-05-07 16:25:23 +02:00
01272f2085 REFACTOR: removes unreachable code (#9665)
* REFACTOR: removes unreachable code

* this one too
2020-05-07 16:24:54 +02:00
ac4251fc9d REFACTOR: publishedPage property was duplicated (#9664) 2020-05-07 16:24:35 +02:00
3debb576d4 REFACTOR: require-valid-alt-text was duplicated (#9663) 2020-05-07 16:24:15 +02:00
2ff8b4f5d9 Revert "DEV: upgrade to Rails 6.0.3"
This was causing issues during multisite:migrate

https://meta.discourse.org/t/multisite-migrate-broken-since-rails-6-0-3-update/150691

This reverts commit 136a5456534c7e468b8052f865ce970a3bf375e9.
2020-05-07 11:44:39 +01:00
87b1d435d2 FIX: improves positioning of sk in mobile when inside a modal (#9657) 2020-05-07 09:10:29 +02:00
136a545653 DEV: upgrade to Rails 6.0.3
Upgrades Rails to latest, this version has better compatibility
with Ruby 2.7

During the upgrade we needed a new cleaner mechanism for configuring
message bus.

All tests are green.

If anything weird pops up please revert.
2020-05-07 15:53:40 +10:00
37be2958f7 DEV: Allow specifying if a notification is high_priority on create (#9660)
This allows for special cases where we may not want a certain notification type to ALWAYS be high priority (e.g. a topic timer).
2020-05-07 14:35:32 +10:00
be48e503fd FIX: Show the Bookmark button for PM topics (#9659)
There is no point in suppressing this now that we have bookmark reminders.
2020-05-07 14:30:10 +10:00
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