Pretty much everyone we've shown the inline editing feature to has noted a couple of things:

a) You need to click "Save" on every field as you are editing it, which makes editing lots of fields at once tedious.
b) The fact that clicking this save button publishes changes instantly freaks people out.

We want to instead move to a model where we are saving inline editing changes to a "draft" revision, while the original revision stays published, and have an explicit "Publish" action that makes the draft revision the new published one.

Work on this feature will happen in the Edit module issue queue.

Community input on workflow-ish modules:
#1730772: Research "draft revision" modules
#1494640: Add a workflow/revisioning module to Spark

Other relevant issues:

- #1678002: Edit should provide a usable entity-level toolbar for saving fields
- #1678034: Auto-save revisions on edit + generate log message
- #1586416: [Meta] Make Save/Publish distinction clearer
- #1664590: Finish the view/edit mode toggle
- #1664594: Where to put the "Edit Article" edit button / What to do with tabs?
- #1678020: Auto-generate log message in revision log when saving new revision stating what field was changed
- #1677684: "Edit <entity label>" button is triggered inconsistently
- #1677674: "Close" icon is not accessible

Designs:
View / Edit mode toggle goes away in favour of using standard tabs. 'Edit' toggles Edit mode, full node form now lives at 'Advanced Edit' tab, positioned to the right. Toolbar also has two buttons: Save and Publish. Save will save a draft revision, Published will make the draft revision the currently published revision.

Clicking the drop-down on the revisions list shows a list of all draft revisions in the format of '7:30am by someone' with 'revert' links next to each row. The 'current' and 'Published' revisions are both noted with text next to them.

Comments

webchick’s picture

Project: Edit » Spark
Issue tags: -Spark Sprint 2 +Spark Sprint 3

Moving to the Spark queue and re-tagging for this sprint.

webchick’s picture

Title: [Meta] As a content editor, I want to make my edits quickly and then hit save » [META] As a content editor, I want to make my edits quickly and then hit save

And that drives me nuts. ;)

cosmicdreams’s picture

Is there an issue for introducing the concept of a changeset, or a collection of field revisions?

webchick’s picture

Nope, but feel free to file one. It's not a bad idea at all, just is a bit more complex than we'll be able to get to during this sprint.

Wim Leers’s picture

#4: it depends on how you look at it. It'll work similarly to the node/edit form. You can change any and all fields, and the ones you changed will all end up in the same revision.

So, in a sense, you're combining the changes to one or more fields in a single revision.

webchick’s picture

webchick’s picture

Issue summary: View changes

Fleshing out issue summary more.

indytechcook’s picture

The concept of a collection of revisions: http://drupal.org/project/collections. It's what we are using on SPS (http://drupal.org/project/sps)

Wim Leers’s picture

That's very interesting. If feasible, we should follow LSD's lead here.

webchick’s picture

Issue tags: -User Story, -Spark Sprint 3

This turned out to be a little bit too ambitious for this sprint (silly DrupalCon :)), so untagging and also unassigning Wim for now. The good news is we made a lot of progress on this design review-wise!

Here's how the interaction is planned to work:

1) When you click on "Edit," the screen does its "white out" thing, as well as showing blue outlines of all "editables" for about 2 seconds so you can see what things are editable. Then those both fade away and you see your site exactly as your user would see it, to help cut down on visual clutter.

2) When you click into a field and make changes, the "Save" button in the toolbar becomes active. You can choose to click it to save interim progress. This will create a draft revision of the node, ahead of the published revision.

3) Changes to a field will *also* be saved when you click outside of the field if there are changes (and just as above, this will create a draft revision ahead of the published revision). Having both of these is important because on a desktop, this will be the most natural behaviour, while on a mobile device being able to actually "save" things is explicitly important since it's hard to click out of a field. Being able to "save" things explicitly is also important for long stretches of typing, even in a single field like Body.

4) When saving is occurring, a little "Saving... " spinner indicator will appear in the toolbar in place of the Save button, and when finished will revert to the Save button.

5) If you want to "undo" a change, you use the drop-down in the toolbar to select a previous draft revision to revert to.

6) Upon clicking the "Publish" button, the draft revisions will get "smooshed" down into just a single revision, so as not to clutter up the node_revisions table, the revision log, etc.

Now. This workflow also brings with it a fun interaction, which is that:

  • If the content you're editing has no draft revisions, Edit mode should allow you to edit exactly what you see.
  • BUT if the content you're editing *does* have draft revisions, Edit mode is a bit trickier. We think this is the right thing to do:
    • If the draft revisions are all yours, swap out the published version with the most recently updated draft revision in the user's session, and invoke edit mode on *that*. Show an indicator that this has happened, and allow people to go back to start with the published revision if they want.
    • If there are draft revisions by people who are NOT you, then you get a modal dialog saying "WOAH DOGGY" (exact wording tbd ;)) which warns you that newer revisions that exist, so you can either edit the post from there (if you have permissions) or just call frank or whoever on the phone and ask them what's up with them editing your node.

WHEW! Ladies and gentlemen, it looks like we have a spec! :)

webchick’s picture

And it's possible Collection module could fit in here in that we would "tag" all of the draft revisions we're creating with some kind of naming convention, and then use that tag in order to do the "smooshing."

That, however, would mean that we need the ability to tag revisions in core. I searched and wasn't able to find an existing issue about that, but I reached out to the Phase2 guys to see if they knew of one.

cbrookins’s picture

Woot! Sounds great - this will be a big improvement.
I'm curious what the drop down will show when not selected. e.g. before editing does it show a revision name, and then while editing, does it show the same revision name, and then when you click outside to another field does it show the new revision name? What will be format of these revision names while editing fields versus the published revisions? Will the drop down show the name of the last user who saved it too?

Wim Leers’s picture

#10: Too ambitious indeed :) Also: good that I didn't start on it yet, because it wasn't flushed out enough yet after all.

#11: isn't that what #1730772: Research "draft revision" modules is about?

Wim Leers’s picture

Issue summary: View changes

Adding designs.

webchick’s picture

#12: Good question! I've updated the issue summary with the mock of the revisions drop-down.

#13: Maybe. That issue was more about the specific "Draft vs. Live" revision requirement, but the comments in that have ballooned to other outside concerns so it's probably worth a mention over there, too.

MustangGB’s picture

After reading through #10 I have a suggestion for a subtle but useful improvement. As already described interim drafts can still be created by clicking "Save". However there will also be a working or active draft that gets saved to on every key press. This working draft could also be used for the "clicking out of the field" save feature as well which negates the need for a separate draft for each field change, instead just update the working draft.

Essentially this would afford you:

  • No need for autosave - Some Javascript that runs every X seconds that creates a new draft to help prevent data lose.
  • Less spam - Random drafts appearing on every field click out.
  • More intuitiveness of when drafts are created - Users may not understand that a draft is created on field click out, but by clicking "Save" it's a lot more obvious that something should be happening (could even call it "Save to draft").
  • No data lose - On browser crash, mobile kernel panic, power cut, etc. because every user input has been recorded.
  • Probably some more that doesn't come to mind right now.
webchick’s picture

Assigned: Wim Leers » Gábor Hojtsy
Issue tags: +Spark sprint 4

Ok, round two. :) Slotting in for this sprint, and Gábor will be taking the case.

webchick’s picture

Regarding #15, my concern there would be performance, especially on mobile devices, because each keystroke would involve a round-trip to the server. :\

webchick’s picture

Issue summary: View changes

Adding link to image showing revision list.

Gábor Hojtsy’s picture

Update: I posted a first pass at moving the Save button to the toolbar instead of individual fields at the existing #1678002: Edit should provide a usable entity-level toolbar for saving fields sub-issue.

webchick’s picture

Component: User interface » Code
Assigned: Gábor Hojtsy » Unassigned

We are going to de-prioritize this for now this sprint, in favour of getting some plumbing work done on the Layouts stuff in Drupal 8. We'll probably be back in sprint 6. :)

Wim Leers’s picture

The only issue I could find that isn't linked yet from this issue is #1780984: Test prototype for Save/Publish in one place + revision selection.

EDIT: for some reason, I cannot incorporate this into the issue summary.

Gábor Hojtsy’s picture

Issue tags: -Spark Sprint 6 +Spark sprint 4, +Spark workflow

Tagging for content workflow.

Gábor Hojtsy’s picture

Issue summary: View changes

x

webchick’s picture

Issue summary: View changes
Status: Active » Fixed

We actually did end up doing this in the end, so yay.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.