Make WordPress Core

Opened 12 years ago

Closed 12 years ago

#23903 closed enhancement (fixed)

Revisions compare tweaks: Title, "To:" header

Reported by: markjaquith's profile markjaquith Owned by: ocean90's profile ocean90
Milestone: 3.6 Priority: normal
Severity: normal Version: 3.6
Component: Revisions Keywords: has-patch dev-feedback
Focuses: Cc:

Description (last modified by markjaquith)

http://cl.ly/image/1P281v2T2P3N/Screen%20Shot%202013-03-29%20at%204.47.27%20PM.png

  1. The "To:" header doesn't make sense when looking at a single revision. It should just show the revision. No "To:" prefix.
  2. The first line of the Diff is the title. But that isn't made clear. It just looks like part of the text. Maybe, if there is a title diff, that should be prefixed with "Title:".

To summarize: less prefixing except when more prefixing.

Attachments (7)

23903.patch (2.6 KB) - added by faishal 12 years ago.
preview.png (19.0 KB) - added by faishal 12 years ago.
patch preview
23903.diff (1.4 KB) - added by adamsilverstein 12 years ago.
23903.png (92.7 KB) - added by ocean90 12 years ago.
Screenshot
23903.2.diff (1.9 KB) - added by SergeyBiryukov 12 years ago.
23903.3.diff (3.3 KB) - added by ocean90 12 years ago.
23903.4.diff (4.0 KB) - added by ocean90 12 years ago.

Download all attachments as: .zip

Change History (15)

#1 follow-up: @markjaquith
12 years ago

  • Description modified (diff)

#2 in reply to: ↑ 1 @adamsilverstein
12 years ago

  • Cc adamsilverstein@… added

Replying to markjaquith:

also excerpt field is revisioned and will show up too & probably needs a label

#3 @ocean90
12 years ago

  • Keywords needs-patch added

@faishal
12 years ago

@faishal
12 years ago

patch preview

#4 follow-up: @faishal
12 years ago

  • Cc faishal added
  • Keywords has-patch added; needs-patch removed

#5 in reply to: ↑ 4 @adamsilverstein
12 years ago

  • Keywords dev-feedback added

Replying to faishal:

thank you for you patch!

it worked as expected but i reworked a couple of things in 23903.diff

  • show/hide the To: area using only CSS, no JS required as we area already adding a class to a parent div when the user switches to the compare two mode
  • cleaned up the label creation as per WordPress coding standards

also, please note that its best to generate your diff from the root, that makes it easier to apply for testing :)

@ocean90
12 years ago

Screenshot

#6 @adamsilverstein
12 years ago

nice change, looks good. thanks.

#7 @SergeyBiryukov
12 years ago

To clarify: __( ucfirst( str_replace( 'post_', '', $field ) ) ) may work in this case, because we already have the strings in _wp_post_revision_fields():
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/post.php#L4878

But it's not a good example of i18n, as gettext won't be able to parse it:
http://ottopress.com/2012/internationalization-youre-probably-doing-it-wrong/

23903.2.diff reuses the strings from _wp_post_revision_fields().

@ocean90
12 years ago

@ocean90
12 years ago

#8 @ocean90
12 years ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from new to closed

In 23994:

Revisions UI: Remove the "To:" prefix from the header when viewing a single revision. Also prefix a revision field with a label.

props SergeyBiryukov, adamsilverstein, faishal. fixes #23903.

Note: See TracTickets for help on using tickets.