Commit Graph

37289 Commits

Author SHA1 Message Date
Jarek Radosz
781e3f5e10
DEV: Use response.parsed_body in specs (#9615)
Most of it was autofixed with rubocop-discourse 2.1.1.
2020-05-07 17:04:12 +02:00
Robin Ward
69ef0da4c2 FIX: preload-store was removed 2020-05-07 11:00:47 -04:00
Joffrey JAFFEUX
3cd412ae02
REFACTOR: removes useless variable assignment (#9666) 2020-05-07 16:41:26 +02:00
Joffrey JAFFEUX
1dd9df9cd0
REFACTOR: removes overwritten properties and duplicates fn (#9686) 2020-05-07 16:39:53 +02:00
Joffrey JAFFEUX
265baa40c6
REFACTOR: useless conditional as 'data' always evaluates to true (#9685) 2020-05-07 16:38:38 +02:00
Joffrey JAFFEUX
99c3ce03cb
REFACTOR: removes superfluous argument (#9684)
hideTooltip doesnt accept any argument
2020-05-07 16:38:23 +02:00
Joffrey JAFFEUX
206d45fd96
REFACTOR: removes superfluous argument (#9683) 2020-05-07 16:38:09 +02:00
Joffrey JAFFEUX
9846c43d93
REFACTOR: removes use of undeclared variable (#9682) 2020-05-07 16:37:56 +02:00
Joffrey JAFFEUX
af78d188b8
REFACTOR: removes useless self assignment (#9681) 2020-05-07 16:37:20 +02:00
Joffrey JAFFEUX
23d585f255
REFACTOR: removes unreachable statement (#9680) 2020-05-07 16:37:02 +02:00
Joffrey JAFFEUX
8be0ba3aa4
REFACTOR: function was incorrectly called as a constructor (#9679) 2020-05-07 16:36:29 +02:00
Joffrey JAFFEUX
e74170cd9e
REFACTOR: Superfluous arguments passed to function resolveSize (#9678)
resolveSize accepts only one param
2020-05-07 16:36:15 +02:00
Joffrey JAFFEUX
affc79bb68
REFACTOR: removes useless assignment to local variable (#9676) 2020-05-07 16:35:54 +02:00
Joffrey JAFFEUX
08e8ae82cc
REFACTOR: removes useless conditional (#9677) 2020-05-07 16:34:49 +02:00
Joffrey JAFFEUX
a078b086ba
REFACToR: removes useless assignment to local variable (#9675) 2020-05-07 16:34:36 +02:00
Joffrey JAFFEUX
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
Joffrey JAFFEUX
d5fe1279bd
REFACTOR: value assigned to precision here is unused (#9673) 2020-05-07 16:34:14 +02:00
Joffrey JAFFEUX
a2109bd9b2
REFACTOR: value assigned to cp here is unused. (#9672) 2020-05-07 16:30:51 +02:00
Joffrey JAFFEUX
930989d462
REFACTOR: variable '_postSnapshot' always evaluates to true (#9671) 2020-05-07 16:28:28 +02:00
Joffrey JAFFEUX
d020e70643
REFACTOR: removes unreachable return statement (#9670) 2020-05-07 16:27:53 +02:00
Joffrey JAFFEUX
48375db848
REFACTOR: removes superfluous argument passed to findWidget (#9669)
findWidget accepts only one argument
2020-05-07 16:27:15 +02:00
Joffrey JAFFEUX
5a201082c7
REFACTOR: removes useless conditional (#9667)
This use of variable 'content' always evaluates to true.
2020-05-07 16:25:44 +02:00
Joffrey JAFFEUX
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
Joffrey JAFFEUX
01272f2085
REFACTOR: removes unreachable code (#9665)
* REFACTOR: removes unreachable code

* this one too
2020-05-07 16:24:54 +02:00
Joffrey JAFFEUX
ac4251fc9d
REFACTOR: publishedPage property was duplicated (#9664) 2020-05-07 16:24:35 +02:00
Joffrey JAFFEUX
3debb576d4
REFACTOR: require-valid-alt-text was duplicated (#9663) 2020-05-07 16:24:15 +02:00
David Taylor
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 136a545653.
2020-05-07 11:44:39 +01:00
Joffrey JAFFEUX
87b1d435d2
FIX: improves positioning of sk in mobile when inside a modal (#9657) 2020-05-07 09:10:29 +02:00
Sam Saffron
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
Martin Brennan
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
Martin Brennan
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
Martin Brennan
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
Penar Musaraj
423802fbce UX: Fix modal positioning when iOS keyboard is visible 2020-05-06 23:06:57 -04:00
Kris
33c8adda83 UX: Adjust admin menu to better fit short (horizontal) viewports 2020-05-06 22:59:22 -04:00
tshenry
0d394e6b76
FEATURE: Include category position when exporting categories (#9658) 2020-05-07 12:17:15 +10:00
Penar Musaraj
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
Arpit Jalan
7052e6f4a1 UX: remove top padding from reddit onebox description 2020-05-07 07:13:37 +05:30
Kris
6e2060e973 Remove extra category whitespace on category+latest/top pages 2020-05-06 21:19:46 -04:00
Martin Brennan
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
Kris
3d6c952c3e UX: remove bold to de-emphasize category names on visited topics 2020-05-06 18:02:39 -04:00
Krzysztof Kotlarek
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
Gerhard Schlager
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
Kane York
15a938e861
FIX: make can_invite_to_forum robust against plugin interference (#9644) 2020-05-06 13:57:26 -07:00
Robin Ward
97657aa322 Don't precompile preload-store 2020-05-06 16:47:04 -04:00
Joffrey JAFFEUX
029d091ea8
FIX: displays poll's close date in local time (#9656) 2020-05-06 22:18:47 +02:00
Robin Ward
7acb25db12 FIX: preload-store was moved 2020-05-06 15:55:52 -04:00
Robin Ward
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
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