What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 128 Stack Exchange communities.

When you are editing in the dedicate edit page adding some awesomeness to a post and hit the "Save changes" button, you are warned if your edit will be writing over other awesome edit that happened while you were editing the post yourself. That lets you see what other people changed and merge their awesomeness with your own awesomeness, resulting in a much higher total combined awesomeness.

However, if you do the edits using the fancy inline editing feature (which, by the way, is awesome) your awesome changes will silently overwrite other users' also awesome changes, resulting in a post that is not as awesome as it could be. It can also make other people sad because their so carefully added awesomeness is now replaced by some other awesomeness added by a different user.

Would be nice if we could have the inline edits provide the same warning.

share|improve this question
    
    
The fact that you don't get any sort of warning is a bug. –  Tim Stone Sep 21 '11 at 0:07
add comment

1 Answer 1

up vote 4 down vote accepted

Awesome as this may seem, this is not the exactly the case.

The inline edit code path runs through the same path as standard edits.

If your edit is not more substantive than the concurrent edit you get this message:

what happens

However, if your edit happens to be longer, you may silently override the concurrent edit (just like we do for the regular edit path).

I also just changed it so we now show the old heartbeat warning (polled once every 45 seconds), for cases where somebody submits an edit while you are typing.

edit

share|improve this answer
5  
I don't think this is micro-optimising. I've run into multiple cases where an edit that overrode another missed some aspect of the "original" edit. This happens sometimes when two people decide to edit two different parts of the question instead of the whole thing. –  Anna Lear Sep 21 '11 at 1:32
    
@AnnaLear so what do you think we should do? Pop up a notification? The workflow for an in-your-head 3 way merge is no fun. –  waffles Sep 21 '11 at 1:34
    
Automatic merges sound like the path to lots of pain. I'm thinking a top-of-the-page overlay similar to "This question has been closed and no more answers will be accepted" if it's possible to detect when an edit has been made and show that to anyone with edits in progress. If that can't work, a pop-up similar to the one screenshotted in your answer would be the next best thing. –  Anna Lear Sep 21 '11 at 5:25
    
maybe show the earlier & current edit side-by-side and allow the user to merge manually? –  Sathya Sep 21 '11 at 7:31
    
@waffles: I've offered some proposals on how it could be implemented in my request. In short, the one submitting the latest revision should be given an opportunity to perform the merge before just blindly accepting it. –  Jeff Mercado Sep 21 '11 at 7:45
    
So you're saying that the "you're editing an old revision" implementation has changed for standard edits too? Then Jeff's description needs some updating I guess. –  Arjan Sep 21 '11 at 16:55
    
@waffles Here's a (very) recent example of a new edit that overrode another and removed important information as a result: meta.stackoverflow.com/posts/107214/revisions. (See revisions #2 and #3.) –  Anna Lear Sep 23 '11 at 17:00
    
@AnnaLear fixed now ... see my edit. –  waffles Sep 26 '11 at 3:03
1  
@AnnaLear last improvement here I agree with is, warning people that they "won" in an edit "dual" ... thinking on how to wire it in ... this will help cases where there are real quick edits that miss the heartbeat –  waffles Sep 26 '11 at 3:09
    
@waffles, could it be that things are broken when someone starts editing after someone else already saved? A very minor edit overwrote a much bigger one 4 minutes after the first save, in revisions 8 and 9 here. Both NullUserException and kiamlaluno claim they saw no warning. (But then: I'd assume the Markdown source is XHR-fetched when one starts editing, so that should be up-to-date. Odd.) –  Arjan Oct 2 '11 at 9:22
    
I liked the old "you're editing an old revision, take care of it yourself" a bit more! –  Arjan Oct 2 '11 at 9:25
    
@Arjan we have no room for that in inline edit ... if 2 editors finish editing at the same time they will probably not get any warnings, and one can win due to the larger edit.... we do not notify you that others are editing, that would hamper editing –  waffles Oct 2 '11 at 9:58
    
@waffles, I still like it, great job! Or maybe some notification could be shown to at least indicate some magic happened? Still then, the 9th revision (using the 7th revision as a start) in my example above is a really, really tiny edit compared to the 8th that it undid 4 minutes later. Maybe you can still peek into the access logs to see what happened? –  Arjan Oct 2 '11 at 10:05
    
@waffles, yesterday Pekka and me had an edit clash in the 2nd and 3rd revisions here. But at least there both edits were substantial, as per the character count. My previous example is about a single character I think! –  Arjan Oct 2 '11 at 10:09
    
Oh, I forgot: Pekka did get a warning there, but still things were persisted. See the comments at the post itself... –  Arjan Oct 2 '11 at 10:10
add comment

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .