Commit Graph

153 Commits

Author SHA1 Message Date
63a3caa516 FIX: Don't display option for users to flag and notify a bot. 2019-05-10 10:05:03 +08:00
152238b4cf DEV: Prefer public_send over send. 2019-05-07 09:33:21 +08:00
31e100530f FEATURE: Flag count in post menu
This change shows a notification number besides the flag icon in the
post menu if there is reviewable content associated with the post.
Additionally, if there is pending stuff to review, the icon has a red
background.

We have also removed the list of links below a post with the flag
status. A reviewer is meant to click the number beside the flag icon to
view the flags. As a consequence of losing those links, we've removed
the ability to undo or ignore flags below a post.
2019-05-06 16:13:31 -04:00
f8eddd40ad PERF: remove avg_time calculations and regular jobs from posts and topics
After careful analysis of large data-sets it became apparent that avg_time
had no impact whatsoever on "best of" topic scoring. Calculating avg_time
was a very costly operation especially on large databases.

We have some longer term plans of introducing other weighting that is read
time based into our scoring for "best of" and "top" topics, but in the
interim to stop a large amount of work that is not achieving any value we
are removing the jobs.

Column removal will follow once we decide on a new replacement metric.
2019-05-06 15:59:01 +10:00
57d1dea8a2 FEATURE: Let staff add custom post notices. (#7377) 2019-04-19 17:53:58 +03:00
47c50d9a95 DEV: Add test for post notices. (#7352) 2019-04-10 22:06:27 +03:00
b58867b6e9 FEATURE: New 'Reviewable' model to make reviewable items generic
Includes support for flags, reviewable users and queued posts, with REST API
backwards compatibility.

Co-Authored-By: romanrizzi <romanalejandro@gmail.com>
Co-Authored-By: jjaffeux <j.jaffeux@gmail.com>
2019-03-28 12:45:10 -04:00
f2c6a160e5 DEV: Fix build.
Follow-up to eed1c9e0e3a168eceed34cadece5af2f38215a8d.
2019-03-20 12:45:00 +02:00
eed1c9e0e3 FIX: Do not show post notices for bots. 2019-03-20 11:58:02 +02:00
476d0050ab FIX: Disable notices for posts by anonymous. 2019-03-13 00:20:19 +02:00
7310ee3ef1 FEATURE: Add more control over post notices. (#7148) 2019-03-13 08:06:28 +11:00
ceec11a153 FIX: Make post notices invisible to poster. 2019-03-11 12:07:19 +02:00
b28b418363 FIX: Various improvements to post notices.
- Notices are visible only by poster and trust level 2+ users.
- Notices are not generated for non-human or staged users.
- Notices are deleted when post is deleted.
2019-03-11 11:19:58 +02:00
35942f7c7c FEATURE: Special call-out for new / returning posters. (#7115) 2019-03-08 10:48:35 +02:00
2ef16e9f4e FIX: Failed to delete post belonging to non-existent topic 2018-11-22 15:08:37 +01:00
467be59d75 FEATURE: Allow expanded posts to return user custom fields 2018-11-13 12:44:54 -05:00
fa0e421af3 FIX: Do not leak information about post revisions. (#6536) 2018-10-31 14:47:00 +00:00
1d26a473e7 FEATURE: Show "Recently used devices" in user preferences (#6335)
* FEATURE: Added MaxMindDb to resolve IP information.

* FEATURE: Added browser detection based on user agent.

* FEATURE: Added recently used devices in user preferences.

* DEV: Added acceptance test for recently used devices.

* UX: Do not show 'Show more' button if there aren't more tokens.

* DEV: Fix unit tests.

* DEV: Make changes after code review.

* Add more detailed unit tests.

* Improve logging messages.

* Minor coding style fixes.

* DEV: Use DropdownSelectBoxComponent and run Prettier.

* DEV: Fix unit tests.
2018-10-09 22:21:41 +08:00
ad5082d969 Make rubocop happy again. 2018-06-07 13:28:18 +08:00
60e7b13f59 Trim WebHookPostSerializer further. 2018-05-21 17:29:58 +08:00
1446753fd2 FIX: Include deleted topics in the post serializer 2018-02-21 14:31:52 +05:30
6b04967e2f FEATURE: Staff members can lock posts
Locking a post prevents it from being edited. This is useful if the user
has posted something which has been edited out, and the staff members don't
want them to be able to edit it back in again.
2018-01-26 14:01:30 -05:00
838568cbc3 Refactor flag types for more customization 2017-10-19 13:55:23 -04:00
a6fc42753c FIX: don't include last_wiki_edit when there's no revision 2017-09-13 17:46:58 +02:00
85ef3696de UX: show date of last edit on wiki topics 2017-09-12 15:37:47 +02:00
5d4221fbe1 PERF: Avoid calling expensive PostGuardian#can_see_post? multiple times.
Before

```
Your Results: (note for timings- percentile is first, duration is second
in millisecs)
---
topic_admin:
  50: 19
  75: 19
  90: 21
  99: 27
topic:
  50: 56
  75: 62
  90: 64
  99: 99
timings:
  load_rails: 1262
ruby-version: 2.4.1-p111
rss_kb: 198432
pss_kb: 136612
virtual: physical
architecture: amd64
operatingsystem: Ubuntu
memorysize: 15.59 GB
kernelversion: 4.10.0
physicalprocessorcount: 1
processor0: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
rss_kb_9877: 327892
pss_kb_9877: 263671
rss_kb_9946: 325468
pss_kb_9946: 261671
rss_kb_10153: 326456
pss_kb_10153: 262657
```

After

```
Your Results: (note for timings- percentile is first, duration is second
in millisecs)
---
topic_admin:
  50: 18
  75: 18
  90: 20
  99: 28
topic:
  50: 41
  75: 42
  90: 46
  99: 49
timings:
  load_rails: 1201
ruby-version: 2.4.1-p111
rss_kb: 187936
pss_kb: 123596
virtual: physical
architecture: amd64
operatingsystem: Ubuntu
memorysize: 15.59 GB
kernelversion: 4.10.0
physicalprocessorcount: 1
processor0: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
rss_kb_26478: 342360
pss_kb_26478: 276696
rss_kb_26547: 340368
pss_kb_26547: 275930
rss_kb_26747: 338964
pss_kb_26747: 274466
```
2017-09-08 14:07:24 +08:00
0531ef2e20 Fix calling exists? on Arrays. 2017-08-24 09:56:07 +09:00
91d3929f52 Merge pull request #5078 from lelelelemon/master
change count>0 to exists
2017-08-24 09:24:42 +09:00
8124f26a6e change count>0 to exists 2017-08-23 22:54:51 +00:00
75e4f7f896 Shorten some very long lines
Prevent warnings from already defined constants when reloading
2017-08-12 04:18:04 +02:00
2251104e32 FEATURE: avatar flair can be font awesome icons 2016-08-26 17:15:37 -04:00
d079f69b7b FEATURE: add flair to avatars using new settings in the groups admin UI 2016-08-17 15:13:15 -04:00
4960b62110 FEATURE: new 'block_auto_generated_emails' site setting 2016-04-20 21:29:27 +02:00
06bac23e5f FEATURE: allow users to wikify their own posts based on trust level 2016-01-12 08:44:25 +05:30
98c0fac461 FEATURE: add small action post when adding/removing users in messages 2016-01-11 12:42:06 +01:00
Sam
43345063b9 PERF: avoid needless :try invokes respond_to? etc 2015-10-02 15:00:00 +10:00
Sam
6437cd0341 FEATURE: add support for generic external avatar services
This changes it so we only ship an avatar template down to the client
it has no magic, all it knows is how to plug in size
2015-09-11 15:10:56 +02:00
2742602254 FEATURE: support for external letter avatars service 2015-09-11 02:12:40 +02:00
32e5016dbb FEATURE: Include topic title, category in posts.json 2015-09-01 17:46:06 -07:00
bb93a345eb UX: Use smaller messages for moderator actions. 2015-07-27 10:09:21 -04:00
cc2a33617f Refactor likes/flags to simplify things a lot 2015-07-14 15:50:27 -04:00
5f3c381dc2 Only include information in actions_summary when we need it. 2015-07-14 15:12:00 -04:00
Sam
f26fef4340 silence ar not found 2015-05-19 09:32:27 +10:00
Sam
539ca73668 avoid N+1 query even if no custom fields exist 2015-05-04 16:12:03 +10:00
a737090442 - FEATURE: revamped poll plugin
- add User.staff scope
- inject MessageBus into Ember views (so it can be used by the poll plugin)
- REFACTOR: use more accurate is_first_post? method instead of post_number == 1
- FEATURE: add support for JSON-typed custom fields
- FEATURE: allow plugins to add validation
- FEATURE: add post_custom_fields to PostSerializer
- FEATURE: allow plugins to whitelist post_custom_fields
- FIX: don't bump when post did not save successfully
- FEATURE: polls are supported in any post
- FEATURE: allow for multiple polls in the same post
- FEATURE: multiple choice polls
- FEATURE: rating polls
- FEATURE: new dialect allowing users to preview polls in the composer
2015-04-23 19:33:29 +02:00
4cc22a55a0 Remove topic_auto_close at from PostSerializer
We should look at extracting some of the cruft from these repsonses.
2015-03-02 11:00:19 -08:00
Sam
a6ce188f35 Merge pull request #3126 from riking/latest-posts
Latest posts endpoint at /posts.json
2015-01-30 08:55:45 +11:00
3b2dcf12b5 Rerender actions on like/dislike 2015-01-29 23:27:05 +13:00
1d24d8471e FEATURE: Latest posts endpoint at /posts.json 2015-01-23 21:16:03 -08:00
e7f251c105 LOTS of changes to properly handle post/topic revisions
FIX: history revision can now properly be hidden
FIX: PostRevision serializer is now entirely dynamic to properly handle
hidden revisions
FIX: default history modal to "side by side" view on mobile
FIX: properly hiden which revision has been hidden
UX: inline category/user/wiki/post_type changes with the revision
details
FEATURE: new '/posts/:post_id/revisions/latest' endpoint to retrieve
latest revision
UX: do not show the hide/show revision button on mobile (no room for
them)
UX: remove CSS transitions on the buttons in the history modal
FIX: PostRevisor now handles all the changes that might create new
revisions
FIX: PostRevision.ensure_consistency! was wrong due to off by 1
mistake...
refactored topic's callbacks for better readability
extracted 'PostRevisionGuardian'
2014-10-27 22:06:43 +01:00