Commit Graph

140 Commits

Author SHA1 Message Date
Régis Hanol 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
Sam c6e6d00e2b FIX: under certain conditions, raw would change an cooked remain
when editing a post
2014-09-04 10:43:57 +10:00
Robin Ward ab02ef4221 Merge pull request #2718 from riking/plugin-events
FEATURE: Add a plugin callback when editing a post
2014-09-02 10:46:08 -04:00
Régis Hanol 61db6c95d2 FIX: couldn't start a 4-spaces block on the first line of a post 2014-09-02 01:18:06 +02:00
riking 24ba7ccfbb FEATURE: Add a plugin callback when editing a post
FIX: Wrap PostRevisor database work in a transaction
2014-08-28 21:27:40 -07:00
riking 3396e6fea3 Centralize MessageBus post updates
After this change, only two files directly publish to MessageBus with a
topic interpolated in the channel: Post and TopicUser.
2014-08-28 20:40:36 -07:00
Régis Hanol f4208ae83f FEATURE: normalize whitespaces in topic title/post content 2014-08-12 00:01:58 +02:00
Régis Hanol e64d3b8a42 FIX: disagree flag should unhide hidden post 2014-08-11 10:48:00 +02:00
Sam 4536f772c1 FIX: more reliable topic list counts
- unread was not incrementing when you read last post on topic
- new notifications were being inserted even if they existed in list
- terminology was all mixed up "1 new posts", split to 3 messages
- latest behaves as expected, updating count of new and updated topics
2014-08-05 13:27:34 +10:00
Régis Hanol bddffa7f9a FEATURE: flag dispositions normalization
All flags should end up in one of the three dispositions
  - Agree
  - Disagree
  - Defer

In the administration area, the *active* flags section displays 4 buttons
  - Agree (hide post + send PM)
  - Disagree
  - Defer
  - Delete

Clicking "Delete" will open a modal that offer to
  - Delete Post & Defer Flags
  - Delete Post & Agree with Flags
  - Delete Spammer (if available)

When the flag has a list associated, the list will now display 1
response and 1 reply and a "show more..." link if there are more in the
conversation. Replying to the conversation will NOT give a disposition.
Moderators must click the buttons that does that.

If someone clicks one buttons, this will add a default moderator message
from that moderator saying what happened.

The *old* flags section now displays the proper dispositions and is
super duper fast (no more N+9999 queries).

FIX: the old list includes deleted topics
FIX: the lists now properly display the topic states (deleted, closed,
archived, hidden, PM)
FIX: flagging a topic that you've already flagged the first post
2014-07-28 19:28:07 +02:00
Sam 0f9678fe49 FIX: faster update of all badges
Introduced badge triggers, introduced concept of badge that happens due to a post but has the post hidden

Delta badge grant happens once a minute, backed by redis
2014-07-23 11:46:07 +10:00
Sam 0f25bbeaf7 FEATURE: Editor badge 2014-07-07 17:55:40 +10:00
Sam 7e1bd88c33 BUGFIX: eliminate drafts for system user 2014-06-25 10:55:35 +10:00
Sam 48790368a0 BUGFIX: system user needs no drafts. 2014-06-25 10:45:20 +10:00
Robin Ward 3811efa5e2 Record when a post was hidden 2014-06-20 15:03:23 -04:00
Louis Rose 1574485443 Perform the where(...).first to find_by(...) refactoring.
This refactoring was automated using the command: bundle exec "ruby refactorings/where_dot_first_to_find_by/app.rb"
2014-05-06 14:41:59 +01:00
riking 1540a3d5e5 Allow changing ownwership of posts by admins 2014-04-08 01:47:42 -07:00
riking 7a843d2ac2 FIX: Only unhide flagged post if editor is the author
Also, rename @user to @editor in PostRevisor
2014-04-08 01:47:36 -07:00
riking 4814659b7b FIX: Edit ratelimits should be on the actor, not post owner 2014-04-08 01:47:36 -07:00
Sam a3344a6be3 oops 2014-03-24 13:32:32 +11:00
Sam 090f5c99c2 FEATURE: Live update edits 2014-03-24 12:19:08 +11:00
Neil Lalonde 0b1550f9d4 Add excerpt column to topics table to remove N+1 query in ListableTopicSerializer 2014-03-18 15:24:29 -04:00
Sam 24667cedee FEATURE: notify users when linked
Extract out PostAlerter from observer
Track outgoing post links correctly
Notify users they are linked when linked
2014-03-18 15:22:53 +11:00
Robin Ward 4f8aed295a FEATURE: Embeddable Discourse comments, now with simple-rss instead of feedzirra 2013-12-31 15:01:22 -05:00
Robin Ward 62db063e1e Revert "Support for Embeddable Comments via IFRAME" - it depends on Curl
which not every server has. Have to rethink this.

This reverts commit e3e4c62887.
2013-12-31 12:52:31 -05:00
Robin Ward e3e4c62887 Support for Embeddable Comments via IFRAME 2013-12-31 12:26:24 -05:00
Régis Hanol 06dd7ffe3c better revision history 2013-12-12 03:41:34 +01:00
Robin Ward 6853f37bee Show estimated reading time near summarize button. 2013-12-10 13:47:36 -05:00
Régis Hanol f65cde3cda do not bump posts when rebaking 2013-11-22 01:52:26 +01:00
Régis Hanol 482b752046 add edit reason when editing a post 2013-11-15 23:28:49 +01:00
Régis Hanol f8e2ecfa94 keep track of the user who revised a post 2013-11-06 11:43:40 +01:00
Stephan Kaag ad2b667504 Remove dead code 2013-07-22 22:16:46 +02:00
Robin Ward af9b27358c If an admin or moderator edits a visitor's post, the restrictions should be based
on the *editors* access rights, not the original poster.
2013-04-05 13:59:00 -04:00
Robin Ward 897d48b145 Moved more `Post` callbacks into service classes 2013-03-18 17:54:55 -04:00
Robin Ward d5e4243f02 Move draft sequence incrementing out of `after_save` 2013-03-18 17:54:50 -04:00
Robin Ward 5aec5261a7 Converted flag threshold constants to enums 2013-03-18 17:54:43 -04:00
Régis Hanol 239cbd2d58 enforce coding convention
replaced every `and` by `&&` and every `or` by `||`
2013-03-05 01:42:44 +01:00
Gosha Arinich cafc75b238 remove trailing whitespaces ❤️ 2013-02-26 07:31:35 +03:00
Robin Ward 532b1f5450 Can edit category descriptions, they show up in a `title` attribute 2013-02-22 13:43:47 -05:00
Grant Ammons 701ecddac2 factor out @post.revise into its own class. clean up PostRevisor class to be more readable 2013-02-09 10:33:25 -05:00