Core: Add post revision history

Created on 3 Apr 2016  Â·  16Comments  Â·  Source: flarum/core

Suggested by @tobscure in Gitter chat ...

Problem:

Currently the "Allow post editing" setting enables users to either edit the contents of their posts, or delete posts altogether. Whereas deleted posts are recoverable using the restore function, the previous content of edited posts can't be recovered.

Solution:

Add a "post revision history" feature that will allow users to review the previous version of posts that have been edited. This feature should also record when a post has been soft deleted. The version history should be saved as diffs. A permission setting is needed to determine which groups can view the history.

Needs discussion:

How to lay out the version history GUI for convenient viewing? Should the GUI also include a control that would allow users to roll a post back to a previous version? (This would be handy in cases where a user accidentally replaces a huge wall of text with a one word, then saves prematurely.) If so, should there be a separate permission to determine which groups can use the rollback function?

typfeature

Most helpful comment

Notes from discussion in the staff meeting:

  • We'll implement this similarly to Discourse/Facebook: when you click on the "edited" indicator, it will open up a modal with a dropdown of all revisions and a diff view of some sort to compare them, and the ability to rollback to a certain revision.
  • We'll make the ability to view revision history a configurable permission, but it will be public by default.
  • This will probably be a first-party/bundled extension (the functionality is probably too peripheral to be worthy of core).

All 16 comments

My suggestion for this:

If a post has been edited, make the pencil "{User} edited {X} {seonds/minutes/...} ago" clickable. This could open a modal/expand the current post using an animation with a revision history where every revision is restorable. Maybe you could also list who edited the post (the user itself, a mod, an admin,...). There could be a pencil icon on the left, and on hover you could see the date and time of the edit. The 3 dots on the right could open a menu where you can restoe a revision.

A little screenshot to understand what I mean:

c1mvvf3

Maybe add the dates for each version and the first few words of each post (maybe show more on hover), to make it clearer to distinguish between versions.

Do we then need to be concerned how long revisions are held for? Because it won't take long to rack up I don't think.

For permissions: would it be beneficial to block someone from restoring an old post (and just clutter up the permissions UI)? Or should it just be added in (provided it's not too much work) just to be more flexible and give admins greater choice?

Notes from discussion in the staff meeting:

  • We'll implement this similarly to Discourse/Facebook: when you click on the "edited" indicator, it will open up a modal with a dropdown of all revisions and a diff view of some sort to compare them, and the ability to rollback to a certain revision.
  • We'll make the ability to view revision history a configurable permission, but it will be public by default.
  • This will probably be a first-party/bundled extension (the functionality is probably too peripheral to be worthy of core).

Is this still relevant? I'm looking forward for this as well, because currently, people can edit post by removing the text and leaving only trash here. This has not luckily happened to me, and I also don't want it to happen. I don't want to take away edit permission from my moderators either.

@xCustomWorld it is still relevant, but not something being worked on right now, and might have to wait until stable.

There's a chance we see something like this as a third party extension until Flarum decides how to handle it.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. We do this to keep the amount of open issues to a manageable minimum.
In any case, thanks for taking an interest in this software and contributing by opening the issue in the first place!

Been subscribed to this issue for years, and is one of the reasons why I haven't yet started using Flarum. Looks like it isn't coming anytime soon. ¯\_(ツ)_/¯

We also want/need post revisions. A basic form of revisions aren't too hard to code but I don't think this is priority for the Flarum team at the moment.

Feel free to sponsor the development of this by a third party though :)

This seems like a very good idea to quickly rewind on mistakes. I woud like to see this implemented too.

I think this is best suited for 3rd party implementation, not core.

Vote for close, please review/comment @flarum/core

Yeah - that said, we'd love to see the community step in. A good UI approach is outlined in detail above.

I agree that this should be 3rd party, I'm personally actively looking into what it would take to do this via an extension in my spare time.

Idk why this can't be a first party extension but ok.

@RoboMWM We are trying not to put even more things on our plate until we reach the stable release.

If they see huge community adoption or have ideas for improvements, it is very possible that third-party extensions will at some point be promoted to bundled "official" ones.

A little screenshot to understand what I mean:

c1mvvf3

@tankerkiller125 I don't think we should take the way in the screenshot, otherwise if a post is edited many times, it will make a post very high.

In this regard, I think we should adopt the Weibo‘s’ approach: https://discuss.flarum.org/d/22681-features-about-edited

I think the arrow in the screenshot meant the history would only show up after clicking the pen icon, in which case it's very similar to the Weibo solution you shared. But I also think a modal would make more sense.

Anyway it's not really relevant here. There's no plan for the Flarum team to implement such a feature at this time. The design will be left to the discretion of any third-party developer that wants to develop this feature.

I'd even encourage competing designs to be published, that way if we decide to promote a third-party extension into a core extension in the future, we can have a good understanding of what works and what doesn't.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

luceos picture luceos  Â·  3Comments

Ralkage picture Ralkage  Â·  4Comments

tjrgg picture tjrgg  Â·  3Comments

tobyzerner picture tobyzerner  Â·  4Comments

datitisev picture datitisev  Â·  3Comments