WordPress.org

Make WordPress Core

#23312 closed task (blessed) (fixed)

Post Lock Interface for Post List Screen

Reported by: dh-shredder Owned by:
Milestone: 3.6 Priority: normal
Severity: normal Version:
Component: Autosave Keywords: autosave-redo has-patch
Focuses: Cc:

Description

For 3.6, we'd like to improve the experience for users with post locks!

For the Post List screen, we'd like to:

  • Make it easy for users to tell which posts are locked directly from the post list screen.
  • Realtime lock update using Heartbeat API (#23216)

Maybe:

  • Make it visible which user holds the lock
  • Meta editing allowed while post is locked

Attachments (17)

lock_16x16x32.png (335 bytes) - added by dh-shredder 15 months ago.
Temporary Lock Icon. Source: CC0: http://thenounproject.com/noun/lock/#icon-No9362
23312.diff (2.8 KB) - added by dh-shredder 15 months ago.
Initial Pass.
23312-2.patch (5.2 KB) - added by azaozz 15 months ago.
lock.png (3.2 KB) - added by empireoflight 15 months ago.
lock in classic and flat style
lock.psd (59.9 KB) - added by empireoflight 15 months ago.
psd of lock in classic and flat style
23312.no_bulk_edit_hidden.diff (533 bytes) - added by dh-shredder 15 months ago.
Don't check hidden checkboxes on bulk select/deselect.
23312-3.patch (4.0 KB) - added by azaozz 14 months ago.
23312-4.patch (4.0 KB) - added by azaozz 14 months ago.
23312-5.patch (4.0 KB) - added by azaozz 14 months ago.
23312-6.patch (4.2 KB) - added by azaozz 14 months ago.
lock-2x.png (716 bytes) - added by dh-shredder 14 months ago.
Sliced New Lock Image - 2x (32x32)
lock.2.png (338 bytes) - added by dh-shredder 14 months ago.
Sliced New Lock Image (16x16)
lock_avatars.diff (1.9 KB) - added by dh-shredder 14 months ago.
Avatars on locked post list
post_list_lock_with_avatar.png (15.3 KB) - added by dh-shredder 13 months ago.
Screenshot with new post lock icon + avater in list
new_icon_css.diff (748 bytes) - added by dh-shredder 13 months ago.
Align new icon and add CSS for 2x version.
23312-7.patch (10.0 KB) - added by azaozz 13 months ago.
locks.png (5.5 KB) - added by azaozz 13 months ago.

Download all attachments as: .zip

Change History (44)

dh-shredder15 months ago

Temporary Lock Icon. Source: CC0: http://thenounproject.com/noun/lock/#icon-No9362

dh-shredder15 months ago

Initial Pass.

comment:1 dh-shredder15 months ago

Rough first pass for discussion.
Requires lock image in wp-admin/images/lock_16x16x32.png.

  • Displays lock in lieu of checkbox if post is locked. This has the intended secondary effect of disabling bulk edit when a post is locked.
  • Removes link to Quick Edit for any locked post.
Version 0, edited 15 months ago by dh-shredder (next)

comment:2 azaozz15 months ago

  • Milestone changed from Awaiting Review to 3.6
  • Type changed from enhancement to task (blessed)

azaozz15 months ago

comment:3 azaozz15 months ago

Extended 23312.diff a bit to use css class to show/hide the lock icon and show "Currently edited by.." under the post title as discussed with @dh-shredder. That would make it easier to (eventually) update which posts are locked dynamically.

comment:4 dh-shredder15 months ago

Looks good! The display is a little odd when only one row is a different height than the rest, but I really like the increased information available.

comment:5 bobbravo215 months ago

here is a screenshot of the UI: http://cl.ly/image/3h0R261k1O2Z

comment:6 azaozz15 months ago

In 23371:

Posts screen: show when a post is "locked", hide the checkbox, Quick Edit and Trash links, props dh-shredder, see #23312

comment:7 nacin15 months ago

In 23372:

Clean up rendering of the title column in the posts list table. Simplify branching. Use get_userdata() rather than get_user_by( 'id' ). Change string to '%s is currently editing'. see #23312.

empireoflight15 months ago

lock in classic and flat style

empireoflight15 months ago

psd of lock in classic and flat style

comment:8 follow-up: empireoflight15 months ago

I've uploaded lock graphics in classic and flat styles; 16x16 and 32x32 versions for retina. Sorry no time to slice at the moment...

dh-shredder15 months ago

Don't check hidden checkboxes on bulk select/deselect.

comment:9 dh-shredder14 months ago

Since we're not suppressing the creation of the checkboxes when locked, 23312.no_bulk_edit_hidden.diff keeps the hidden checkboxes from being checked, thus keeping them from being selected for bulk edit.

comment:10 in reply to: ↑ 8 dh-shredder14 months ago

Replying to empireoflight:

I've uploaded lock graphics in classic and flat styles; 16x16 and 32x32 versions for retina. Sorry no time to slice at the moment...

Thanks! Those look great.

azaozz14 months ago

comment:11 azaozz14 months ago

23312-3.patch adds "live" update of locked posts using heartbeat.

azaozz14 months ago

comment:12 azaozz14 months ago

23312-4.patch fixes the removal of locks and escapes the user name when adding a lock.

comment:13 azaozz14 months ago

In 23485:

Post locks: don't check hidden checkboxes on bulk select/deselect, props dh-shredder, see #23312

azaozz14 months ago

comment:14 azaozz14 months ago

In 23312-5.patch​: when displaying the lock, uncheck the checkbox.

azaozz14 months ago

comment:15 azaozz14 months ago

23312-6.patch: don't check the lock if the current user cannot edit the post.

comment:16 azaozz14 months ago

In 23487:

Post locks: use heartbeat to dynamically update locked posts on the Posts screen, first run, see #23312

comment:17 follow-up: azaozz14 months ago

Perhaps we can optimize this a bit: merge inline-edit-post.js and the new edit-post.js. Both would need to work well when displaying CPTs.

comment:18 azaozz14 months ago

In 23488:

Add edit-post.min.js for bumpbot's sake, see #23312

comment:19 in reply to: ↑ 17 ; follow-up: nacin14 months ago

Replying to azaozz:

Perhaps we can optimize this a bit: merge inline-edit-post.js and the new edit-post.js. Both would need to work well when displaying CPTs.

Yes, makes sense.

23312-6.patch: don't check the lock if the current user cannot edit the post.

This made me wonder, if the user can see the post in the list (even if they cannot edit it) what is the harm in seeing current user activity?

comment:20 in reply to: ↑ 19 azaozz14 months ago

This made me wonder, if the user can see the post in the list (even if they cannot edit it) what is the harm in seeing current user activity?

We were talking with @dh-shredder about that too. Maybe sites with a lot of authors and contributors wouldn't want editor and admin users activities to be visible to all, although don't think it's an "information leak".

dh-shredder14 months ago

Sliced New Lock Image - 2x (32x32)

dh-shredder14 months ago

Sliced New Lock Image (16x16)

dh-shredder14 months ago

Avatars on locked post list

dh-shredder13 months ago

Screenshot with new post lock icon + avater in list

comment:21 dh-shredder13 months ago

Forgot to add a comment last night. Two things!

  • New sliced lock icons from @empireoflight's original PSDs (lock.2.png & lock-2x.png) added
  • First pass lock_avatars.diff to add avatars to post list locks added. This currently does send the HTML for the avatar itself from get_avatar() through heartbeat. If we need to avoid that, can do so as well, although this method is significantly simpler.

You can see a screenshot with both attached above.

Edit: Right now, the avatar is sized to match the new revision sized ones, at 18x18. We can reduce to 16x16, if it's not important to match sizes there.

Last edited 13 months ago by dh-shredder (previous) (diff)

dh-shredder13 months ago

Align new icon and add CSS for 2x version.

comment:22 dh-shredder13 months ago

In new_icon_css.diff, add CSS for new icon, realign, and add lines to handle 2x version. Note that for this to work, you'll need to add the above lock.2.png (as lock.png) and lock-2x.png to your wp-admin/images directory.

azaozz13 months ago

azaozz13 months ago

comment:23 azaozz13 months ago

In 23312-7.patch:

  • Merged @dh-shredder's patches.
  • Merged the new edit-post.js with inline-edit-post.js (no need for two JS files).
  • Tweaked the size and position of the gravatars, the 18px were looking too small on a large monitor:


comment:24 azaozz13 months ago

In 23681:

Post locks on the posts list screen: new icons for the lock, props empireoflight, show avatar for the user currently editing, props dh-shredder, see #23312

comment:25 azaozz13 months ago

In 23725:

Post locks: add Preview button when post is locked, fix the suggested places, see #23312

comment:26 ocean9011 months ago

Anything left here?

comment:27 ocean9011 months ago

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.