WordPress.org

Make WordPress Core

Opened 4 months ago

Last modified 4 months ago

#47519 new enhancement

Introduce a vertically compact view for the Revisions screen

Reported by: johnbillion Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Revisions Keywords: needs-patch needs-design
Focuses: ui, administration Cc:
PR Number:

Description

Given a post containing a lot of content in many paragraphs, it's not easy to quickly find the change made during a particular revision when viewing the Revisions screen for the post. The change may be a long way down the content and is only identifiable by scrolling until you happen to spot the change.

A traditional diff view in software development only shows the lines affected by the change and a handful of lines above and below the change to add context. This is the case here on Trac, on other services such as GitHub and GitLab, and in .diff and .patch files themselves.

A similarly compact diff view should be made available on the Revisions screen for posts. I think it would be beneficial to make it the default view, with a toggle to switch to the full view for a post if the user decides they need to see it.

The wp_text_diff() function and the WP_Text_Diff_Renderer_Table renderer used on this screen supports parameters for controlling the number of contextual lines shown: leading_context_lines and trailing_context_lines.

Change History (3)

#1 @afercia
4 months ago

Related: #25473.

#2 @birgire
4 months ago

This sounds like a good improvement, but I just wanted to note that ticket #43532, that was also related to changes to the Revisions screen, was closed as a wontfix because of the block editor.

#3 @SergeyBiryukov
4 months ago

  • Focuses ui added
Note: See TracTickets for help on using tickets.