Opened 6 years ago
Closed 4 years ago
#47519 closed enhancement (duplicate)
Introduce a vertically compact view for the Revisions screen
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Revisions | Keywords: | needs-patch needs-design |
Focuses: | ui, administration | Cc: |
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
.
Related: #25473.