Editing wiki posts at same time as someone else


(Daniel M ) #1

When two people edit wiki posts at once, someone always overrides another person’s post. How hard would it be to have a google docs-style of editing, where it doesn’t override? Alternatively, a functional merge would be nice, while a lock, even though it is better than nothing, is not the best option (as is discussed in Edit lock when editing posts; especially wiki post).

What is a Wiki Post?
(Jeff Atwood) #2

One thing we could do through the message bus is alert people when they begin editing and someone else is already editing. On wiki posts I mean, moderator collisions on edits have to be absurdly rare.

I resisted this for Stack Exchange, instead we did a “whoever made the longer set of edits wins” hack, but we have the systems in place to do real time notifications in Discourse.

(cpradio) #3

We’ve been running into this quite a bit with one of our more frequently edited wiki posts. Keep in mind wiki posts are by TL, so it isn’t directly for moderators (ours happens to be “spf staff”, as we have it in a private category, but we still get several of them wondering why their changes suddenly disappeared.

(Alex Armstrong) #4

FWIW, this issue, along with restricting edit permissions, is preventing adoption of wiki posts on my system. I’ll grant that as a small, private community we may be an edge case.

How does Wikipedia manage this? (Or other such popular systems?)

(Erlend Sogge Heggen) #5

If you care to do some research on that and share your findings that’d be appreciated :wink:

(Alex Armstrong) #6

WIkipedia’s edit conflict workflow is outlined here:

My takeaways:

Wikipedia doesn’t indicate when multiple people are editing the same page, as Jeff suggested above. I think is a good idea in Discourse’s case. I’ve seen this model used in MailChimp and other places.

On Wikipedia, after someone tries to save a page, they get an an “edit conflict” page, which gives the user a chance to reconcile the differences manually:

This seems like an intimidating screen, but I think most of the pieces are there already for Discourse, if it seems like a good idea to implement.

A possible spec would be (in order of importance):

  1. Indicate when another user is editing the same post.
  2. Indicate, when saving, that the edit would overwrite someone else’s work – allowing the user to continue or stop.
  3. As above, but also providing a diff between the user’s version and the current version
  4. As above, but with the addition of a text editor to allow the user to merge changes manually

1 & 2 seem reasonably easy to implement and would be helpful even without 3 & 4. I’m not sure how the UI would work for 3 & 4.

(Erlend Sogge Heggen) #7

This might be a natural addition to this plugin: Discourse Presence - "Who is writing"

Seems like that plugin is in need of an update anyhow, and @adrapereira hasn’t been around for a while. We can sponsor this work if anyone’s interested.

Discourse Presence - "Who is writing"
(David Taylor) #8

I might be interested in this once my GSOC project is over in a couple of weeks - the ‘presence’ features are somewhat related to my whos-online plugin. :slight_smile:

(Eli the Bearded) #9

One other thing that Mediawiki (the Wikipeda software) does is help prevent conflicts by letting people just edit sections.

Two people can edit two different sections (eg H1/H2 delimited blocks) at the same time and not see the conflict resolution page afterwards. The talk pages also have an “add new section” feature, which lets a new section be added with no risk of edit conflict.

(Erlend Sogge Heggen) #10

Discourse Presence - “Who is writing” now supports “who is editing”.

(Erlend Sogge Heggen) #11