Commit Graph

32490 Commits

Author SHA1 Message Date
Robin Ward
9c2e6b9a54 FIX: Migrated flags should be reviewable by moderators 2019-04-05 10:04:23 -04:00
Neil Lalonde
e7a6f0698d Update translations 2019-04-05 10:02:54 -04:00
Erick Guan
9dd325f805 FIX: skip some checks for CJK locale in TextSentinel (#7322) 2019-04-05 15:07:49 +02:00
Maja Komel
ca33d091b3 FIX: don't trigger notifications when changing category/tags of unlisted topics (#7323) 2019-04-05 15:06:38 +02:00
Sam Saffron
8f4527c1f1 FIX: recover from migration failure
If the migration somehow failed halfway then just run through, when ddl
transactions are disabled stuff can get somewhat odd.
2019-04-05 21:53:07 +11:00
Guo Xiang Tan
a7a5f90e20 Annotate models. 2019-04-05 17:13:12 +08:00
Joffrey JAFFEUX
0bd480c600
UX: displays exact date on title attribute of topic timer info (#7326) 2019-04-05 09:44:10 +02:00
Saurabh Patel
9b288613ae DEV: remove span from inside <tr> and move meta info to a td (#7324) 2019-04-05 09:32:11 +02:00
Angus McLeod
6f1652bb53 add header cloak after all panels are added (#7325) 2019-04-04 22:54:05 -07:00
Sam Saffron
0744d2ef73 PERF: speed up suggested unread
Previously we tried using a sub-query which has some terrible performance
implications, by adding 1 extra query we can eliminate the PG issue

A join to user_stats also is prone to the same slowdown
2019-04-05 15:55:29 +11:00
Guo Xiang Tan
ca4c9abec7 PERF: Add index for (action_type,created_at) on user_actions` table.
Speeds up counting of likes in `About#stats`.
2019-04-05 12:49:45 +08:00
Sam Saffron
81a1bafe54 PERF: Speed up home page unread+new query
restructure query so it avoids ORs

It appears postgres is picking suboptimal indexes if too many ORs exist
despite how trivial the condition is.

This bypasses conditional in the query and evals them upfront.

On meta for my user this made a 10x perf difference.

This boils down to either having `OR u.admin` or not having `OR u.admin` in
the query.
2019-04-05 15:25:19 +11:00
Sam Saffron
5b837f620b correct unread resetting to handle nulls
Note, to avoid race conditions we are setting last_unread to 10 minutes ago
if there is nothing unread.

This is safer in case of in progress transactions
we don't want to lose unread for any window of time.
2019-04-05 13:42:41 +11:00
Sam Saffron
5f896ae8f7 PERF: Keep track of when a users first unread is
This optimisation avoids large scans joining the topics table with the
topic_users table.

Previously when a user carried a lot of read state we would have to join
the entire read state with the topics table. This operation would slow down
home page and every topic page. The more read state you accumulated the
larger the impact.

The optimisation helps people who clean up unread, however if you carry
unread from years ago it will only have minimal impact.
2019-04-05 12:44:45 +11:00
Guo Xiang Tan
d299197392 DEV: Add missing test cases for Topic.for_digest and Topic.secured. 2019-04-05 09:00:48 +08:00
Robin Ward
c9ddc6ce30 FIX: Make sure the site setting works and fix build 2019-04-04 17:44:10 -04:00
Robin Ward
aa4a38b08a FIX: computed is not used 2019-04-04 17:38:27 -04:00
Neil Lalonde
a0f7953f0c remove extra lines 2019-04-04 17:03:57 -04:00
Robin Ward
8af7237092 FIX: Only perform logic on create commits 2019-04-04 17:01:47 -04:00
Vinoth Kannan
2c7a50860f DEV: disable missing post uploads check by default. 2019-04-05 02:29:10 +05:30
Neil Lalonde
47eefb9f37 remove wip comments 2019-04-04 16:47:02 -04:00
Neil Lalonde
83996fc8ea FEATURE: ability to restrict some tags to a category while allowing all others
A new checkbox has been added to the Tags tab of the category settings modal
which is used when some tags and/or tag groups are restricted to the category,
and all other unrestricted tags should also be allowed.
Default is the same as the previous behaviour: only allow the specified set of
tags and tag groups in the category.
2019-04-04 16:40:15 -04:00
Kris
9faebfcfe0 UX: Adjust layout, allow additional responsiveness 2019-04-04 16:20:25 -04:00
Robin Ward
df48c657fd FIX: Reviewable counts were not updating properly
Sometimes sidekiq is so fast that it starts jobs before transactions
have comitted. This patch moves the message bus stuff until after things
have comitted.
2019-04-04 16:07:34 -04:00
Robin Ward
2055804e95 FIX: The option to delete replies was missing from the new review queue 2019-04-04 15:51:36 -04:00
Robin Ward
dd5b8bd85e FIX: Show replies to the post, not the topic
This makes more sense when reviewing. How many people replied to this
objectionable thing?
2019-04-04 15:13:59 -04:00
Robin Ward
9c8cc73c39 UX: Show user fields when reviewing a user 2019-04-04 14:45:40 -04:00
Vinoth Kannan
64ec4a6a1b fix the EnsurePostUploadsExistence job spec 2019-04-04 21:53:58 +05:30
Vinoth Kannan
a385f6c48a REFACTOR: create custom field even when missing post uploads not found 2019-04-04 21:49:44 +05:30
Vinoth Kannan
44e87372da FEATURE: Add scheduled job to ensure s3 uploads existence 2019-04-04 20:37:44 +05:30
Vinoth Kannan
35431a8ddb FIX: set missing count in redis even if zero 2019-04-04 20:05:57 +05:30
Robin Ward
a5182b0d6c FIX: Rewrite old /admin/flags links to use the review queue
Such links might be in present in old PMs. For example, a notification of
outstanding flags.

New PMs should receive the correct link but this prevents 404s in the
other case.
2019-04-04 10:15:23 -04:00
Saurabh Patel
90fc2d15c4 FEATURE: change layout when default page is category to tabular for _… (#7270) 2019-04-04 15:57:18 +02:00
Vinoth Kannan
df6ef856e6 DEV: save missing s3 uploads count in redis 2019-04-04 19:05:57 +05:30
Arpit Jalan
f87b35e6f4 FIX: do not raise exception if the file is missing 2019-04-04 15:36:51 +05:30
Bianca Nenciu
63fcd445f4 FIX: Use unfiltered URL when viewing all badges. 2019-04-04 12:35:03 +03:00
Maja Komel
b0053f3a1c FEATURE: bump onebox version, add styling for new reddit image onebox 2019-04-04 11:24:30 +02:00
Guo Xiang Tan
6815f777f9 DEV: Remove unused method. 2019-04-04 14:19:39 +08:00
Robin Ward
588f61f717 FIX: Linting 2019-04-03 18:08:07 -04:00
Robin Ward
a4ff593506 UX: Slightly improved reviewable user display, plus link to admin if possible 2019-04-03 17:07:48 -04:00
Vinoth Kannan
3b581de3b8 remove unrelated code
already added in a separate job
2019-04-04 02:26:28 +05:30
Vinoth Kannan
b3fb0a7039 FEATURE: ensure consistency of post uploads in cooked content 2019-04-04 02:23:28 +05:30
Kris
14952a9cbc UX: Reduce specificity of reviewable item styles 2019-04-03 16:49:57 -04:00
Robin Ward
111a502231 FIX: Deleting Users should work nicely with Reviewable Users
"Rejecting" a user in the queue is equivalent to deleting them, which
would then making it impossible to review rejected users. Now we store
information about the user in the payload so if they are deleted things
still display in the Rejected view.

Secondly, if a user is destroyed outside of the review queue, it will
now automatically "Reject" that queue item.
2019-04-03 16:42:39 -04:00
Bianca Nenciu
3cf922a58a FIX: URL to user profile in poll results. (#7315) 2019-04-03 22:17:05 +02:00
Kris
88a46981a8 UX: Remove extra border on old mobile post notices 2019-04-03 16:10:54 -04:00
Robin Ward
828cdf3fea FIX: Protected method called, I'll fire myself now 2019-04-03 16:10:36 -04:00
Robin Ward
82bddcbe51 FIX: Don't create two reviewable scores for a user 2019-04-03 16:03:32 -04:00
Robin Ward
c1ea63bdc1 FIX: Reviewables should not be created for users until they are active
Conversely, if a user is deactivated the reviewable should automatically
be rejected.

Before this fix, if a user was not active they'd still show in the
review queue but without an "Approve" button which was confusing.
2019-04-03 15:25:00 -04:00
Joffrey JAFFEUX
974007a3cc
FIX: reverts href removal from user/group cards links (#7318) 2019-04-03 19:16:48 +02:00