Commit Graph

38472 Commits

Author SHA1 Message Date
Penar Musaraj 09eb087f84
FIX: Remove iOS trick to prevent scrolling when focusing on input
No longer needed, removing it also fixes blinking when tapping the composer textarea
2020-07-22 11:18:01 -04:00
Roman Rizzi 9fc7bd5797
FIX: Reviews that are auto-hidden by a trusted spam flagger should always have enough weight. (#10284) 2020-07-22 11:42:15 -03:00
Jarek Radosz 300e30dcbf
FIX: Remove the border from YT thumbnail placeholder (#10288) 2020-07-22 16:38:35 +02:00
Penar Musaraj 45ae24a1e9
FIX: Apply video preview trick for Safari to stream only 2020-07-22 10:31:08 -04:00
Jordan Vidrine 5f19fd64ea
Update wizard.scss 2020-07-22 09:24:04 -05:00
Jordan Vidrine b0b42a3209
FIX: add system fonts to wizard 2020-07-22 09:07:57 -05:00
Vinoth Kannan 0884d570b1
FEATURE: add support for `top` filter in tag page. (#10281)
Currently, tag pages only have the `latest` filter.
2020-07-22 19:26:36 +05:30
Arpit Jalan db4e310376 DEV: annotate models 2020-07-22 16:02:31 +05:30
Penar Musaraj 6d39452317
UX: Shrink composer consistently when pressing Done in iOS 2020-07-21 23:54:43 -04:00
Martin Brennan 93a8e34f47
FIX: Allow user to recover/delete post if they can review the topic (#10273)
To reproduce the initial issue here:

1. A user makes a post, which discourse-akismet marks as spam (I cheated and called `DiscourseAkismet::PostsBouncer.new.send(:mark_as_spam, post)` for this)
2. The post lands in the review queue
3. The category the topic is in has a `reviewable_by_group_id`
4. A user in that group goes and looks at the Review queue, decides the post is not spam, and clicks Not Spam
5. Weird stuff happens because the `PostDestroyer#recover` method didn't handle this (the user who clicked Not Spam was not the owner of the post and was not a staff member, so the post didn't get un-destroyed and post counts didn't get updated)

Now users who belong to a group who can review a category now have the ability to recover/delete posts fully.
2020-07-22 11:57:16 +10:00
Guo Xiang Tan 16961dee76
FIX: Typo in `NotificationsController#index` not caught by tests. 2020-07-22 09:22:26 +08:00
Martin Brennan 8dc3543134
FIX: Ignore removed delete_when_reminder_sent bookmarks column 2020-07-22 10:17:21 +10:00
Martin Brennan 62f2e1f971
FIX: Stop double prepending of window.location.origin on media URLs (#10275)
This fixes an issue where sometimes when composing a post and uploading a video/audio file, _loadCachedShortUrls/the uploads controller would return a full URL with origin, instead of just the URL with the host e.g. http://localhost:3000/some/video.mp4 instead of just //localhost:3000/some/video.mp4. We were prepending window.location.origin onto the URL no matter what, and since http://localhost:3000/some/video.mp4 does not match the host URL regex, we were ending up with something like http://localhost:3000http://localhost:3000/some/video.mp4 which broke composer previews. This was only noticed with a video upload in a secure upload environment.
2020-07-22 09:23:55 +10:00
Krzysztof Kotlarek e48e64456d
FIX: test for fillGapBefore (#10272)
Missing test for that PR https://github.com/discourse/discourse/pull/10264
2020-07-22 07:33:55 +10:00
jbrw 0ed784b4fc
FEATURE: Create logs for Group Moderator changes (#10271) 2020-07-21 14:29:02 -04:00
Robin Ward 549c552402 FIX: Remove `username_lower` from admin serializer
The property is already computed on the front end and this ends up
overwriting it.
2020-07-21 14:00:43 -04:00
Robin Ward fa74f28a51 REFACTOR: Remove `Discourse.SiteSettings` from initializers 2020-07-21 13:51:28 -04:00
Robin Ward f5adf6d183 REFACTOR: Remove `Discourse.SiteSettings` from reply adapter 2020-07-21 13:51:28 -04:00
Robin Ward 9aab81f304 REFACTOR: Remove `Discourse.SiteSettings` from components 2020-07-21 13:51:28 -04:00
Robin Ward f83c383177 REFACTOR: Remove `Discourse.SiteSettings` from some controllers 2020-07-21 13:51:28 -04:00
Robin Ward 17bccbb52f REFACTOR: Remove `Discourse.SiteSettings` from search-result widget 2020-07-21 13:51:28 -04:00
Robin Ward ac0d5b1d3f REFACTOR: Remove `Discourse.SiteSettings` from nav-item 2020-07-21 13:51:28 -04:00
Robin Ward 9dd6367d81 REFACTOR: Remove `Discourse.SiteSettings` from `PostCooked` widget 2020-07-21 13:51:28 -04:00
Robin Ward 531793e98f REFACTOR: Remove `Discourse.SiteSettings` from topic tracking state 2020-07-21 13:51:28 -04:00
Robin Ward f6c40075e5 REFACTOR: Remove `Discourse.SiteSettings` from post model 2020-07-21 13:51:28 -04:00
Robin Ward 21ea4d1238 REFACTOR: Remove `Discourse.SiteSettings` from application controller 2020-07-21 13:51:28 -04:00
Robin Ward ccb36f81c4 REFACTOR: Remove `Discourse.SiteSettings` from topic model 2020-07-21 13:51:28 -04:00
David Taylor ec4024fe6d
FIX: Keep by_users check in S3 inventory
Partial revert of 8515d8fa - the by_users check is ensuring we don't raise errors for fixtures
2020-07-21 17:19:56 +01:00
Vinoth Kannan ef37460c93 FIX: delete synonyms in topics if target tag is already added.
Currently, while adding a synonym tag if both target and synonym tags are already available in a topic then it's returning an error.
2020-07-21 21:02:01 +05:30
David Taylor 8515d8fae5
FIX: Improve S3 inventory logic
Previously we considered 'upload rows without etags' to be exempt from the check. This is bad, because older/migrated sites might not have etags on all their uploads. We should consider rows without etags to be broken, since we can't check them against the inventory.

This also removes the `by_users` scope. We need all uploads to be working, even ones created by the system user.
2020-07-21 15:55:53 +01:00
Guo Xiang Tan 74ddbc91b0
DEV: Update rails_failover to 0.5.4
Pulls in

- FIX: Undefined method on nil class error in forking servers.
2020-07-21 16:01:53 +08:00
Guo Xiang Tan d38dd68d05
DEV: Fix lint. 2020-07-21 15:55:03 +08:00
Guo Xiang Tan bb8f1ce8b1
DEV: Consolidate Unicorn error backtraces when logstash is enabled. 2020-07-21 15:35:41 +08:00
Guo Xiang Tan 23778f4bfd
DEV: Avoid logging Redis cannot connect error during failover.
Reduce amount of noise in our logs.
2020-07-21 14:53:46 +08:00
Joffrey JAFFEUX de5245631b
FIX: gives emojis a width/height to prevent lazy loading warning (#10277) 2020-07-21 08:50:56 +02:00
Joffrey JAFFEUX 936a40adcf
linting (#10276) 2020-07-21 08:39:14 +02:00
Guo Xiang Tan df66a559c9
DEV: Pause Sidekiq before readonly mode during PG failover. 2020-07-21 13:51:37 +08:00
Guo Xiang Tan 94fced2133
FIX: Handle PG readonly mode in `Auth::DefaultCurrentUserProvider`.
Avoid writing to the DB when PG is in readonly mode.
2020-07-21 13:44:05 +08:00
Guo Xiang Tan 031a6616a3
DEV: Allow writes to PG even if Redis is readonly mode.
Previously, I thought it was better to drop the site into reading mode
when Redis has failed over to the replica but it created more errors
while Redis is in readonly mode since ActiveRecord would prevent us from
writing to PG even though PG is up.
2020-07-21 12:34:07 +08:00
Guo Xiang Tan cebd8da299
FIX: Don't raise error when adding to cache fails in readonly mode. 2020-07-21 12:20:23 +08:00
Kris aa00a6f077 UX: Improve alignment and consistency on full page search 2020-07-21 00:04:07 -04:00
Penar Musaraj 98e6a6a895
UX: Fix quote sharing button spacing 2020-07-20 21:09:13 -04:00
Martin Brennan 41b43a2a25
FEATURE: Add "delete on owner reply" bookmark functionality (#10231)
This adds an option to "delete on owner reply" to bookmarks. If you select this option in the modal, then reply to the topic the bookmark is in, the bookmark will be deleted on reply.

This PR also changes the checkboxes for these additional bookmark options to an Integer column in the DB with a combobox to select the option you want.

The use cases are:

* Sometimes I will bookmark the topics to read it later. In this case we definitely don’t need to keep the bookmark after I replied to it.
* Sometimes I will read the topic in mobile and I will prefer to reply in PC later. Or I may have to do some research before reply. So I will bookmark it for reply later.
2020-07-21 10:00:39 +10:00
Blake Erickson 949c8923a4 DEV: Clean up some extra wording
Remove "Allowed" label because it isn't needed now that we have
relocated the checkbox.

Follow up to: 30af3f24ef
2020-07-20 16:53:10 -06:00
Blake Erickson 30af3f24ef DEV: Relocate enable allowed PMs checkbox
To avoid confusion move the enable allowed PMs checkbox to the same page
that you add your allowed users.

Follow up to: 690f17bcbe
2020-07-20 16:23:42 -06:00
Blake Erickson 690f17bcbe
FEATURE: Allow List for PMs (#10270)
* FEATURE: Allow List for PMs

This feature adds a new user setting that is disabled by default that
allows them to specify a list of users that are allowed to send them
private messages. This way they don't have to maintain a large list of
users they don't want to here from and instead just list the people they
know they do want. Staff will still always be able to send messages to
the user.

* Update PR based on feedback
2020-07-20 15:23:49 -06:00
Roman Rizzi 2abfd30d22
FIX: Trigger before upload event after saving and before uploading it, so we are sure that the upload is valid. (#10269) 2020-07-20 17:59:37 -03:00
Roman Rizzi 98eb7a3f00
FIX: Users should be able to delete their own queued posts (#10265) 2020-07-20 17:21:20 -03:00
jbrw 7ab5658462
FEATURE: Allow group moderators to add/remove staff notes (#10252)
* FEATURE: Allow group moderators to add/remove staff notes
2020-07-20 15:53:47 -04:00
Robin Ward 44cfa25d7d FIX: Focus tests are unreliable in qunit
I doubt they'll regress so let's remove them for now.
2020-07-20 15:44:29 -04:00