Make WordPress Core

Opened 12 years ago

Closed 11 years ago

#23312 closed task (blessed) (fixed)

Post Lock Interface for Post List Screen

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

Download all attachments as: .zip

Change History (44)

@dh-shredder
12 years ago

Initial Pass.

#1 @dh-shredder
12 years ago

Rough first pass for discussion.

Requires lock image in wp-admin/images/lock_16x16x32.png and SCRIPT_DEBUG to be set to true.

  • 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.
Last edited 12 years ago by dh-shredder (previous) (diff)

#2 @azaozz
12 years ago

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

@azaozz
12 years ago

#3 @azaozz
12 years 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.

#4 @dh-shredder
12 years 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.

#5 @bobbravo2
12 years ago

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

#6 @azaozz
12 years ago

In 23371:

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

#7 @nacin
12 years 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.

@empireoflight
12 years ago

lock in classic and flat style

@empireoflight
12 years ago

psd of lock in classic and flat style

#8 follow-up: @empireoflight
12 years 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-shredder
12 years ago

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

#9 @dh-shredder
12 years 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.

#10 in reply to: ↑ 8 @dh-shredder
12 years 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.

@azaozz
12 years ago

#11 @azaozz
12 years ago

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

@azaozz
12 years ago

#12 @azaozz
12 years ago

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

#13 @azaozz
12 years ago

In 23485:

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

@azaozz
12 years ago

#14 @azaozz
12 years ago

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

@azaozz
12 years ago

#15 @azaozz
12 years ago

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

#16 @azaozz
12 years ago

In 23487:

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

#17 follow-up: @azaozz
12 years 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.

#18 @azaozz
12 years ago

In 23488:

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

#19 in reply to: ↑ 17 ; follow-up: @nacin
12 years 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?

#20 in reply to: ↑ 19 @azaozz
12 years 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-shredder
12 years ago

Sliced New Lock Image - 2x (32x32)

@dh-shredder
12 years ago

Sliced New Lock Image (16x16)

@dh-shredder
12 years ago

Avatars on locked post list

@dh-shredder
12 years ago

Screenshot with new post lock icon + avater in list

#21 @dh-shredder
12 years 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 12 years ago by dh-shredder (previous) (diff)

@dh-shredder
12 years ago

Align new icon and add CSS for 2x version.

#22 @dh-shredder
12 years 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.

@azaozz
12 years ago

@azaozz
12 years ago

#23 @azaozz
12 years 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:


#24 @azaozz
12 years 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

#25 @azaozz
12 years ago

In 23725:

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

#26 @ocean90
12 years ago

Anything left here?

#27 @ocean90
11 years ago

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