WordPress.org

Make WordPress Core

Opened 3 weeks ago

Last modified 3 weeks ago

#48574 new enhancement

Create better post diff screens

Reported by: seanleavey Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 5.3
Component: Revisions Keywords:
Focuses: Cc:
PR Number:

Description

Post diffs showing the difference between post revisions have always been in raw form, showing differences in post HTML and not visual differences. With the addition of the Gutenberg editor to WordPress, there is now even more HTML shown due to the inclusion of block settings as comments. Additionally, Gutenberg blocks such as figures or lists create one-line HTML strings so small changes to list items result in one huge line change on the diff screen. It seems like now is the time to consider improving the post diff screen, and changing the way Gutenberg blocks generate their HTML to allow for cleaner diffs.

See the attached image for an example of a block that could have been generated across multiple lines such that the addition of a link didn't generate 12 lines of diff.

I suppose this feature request is twofold:

  • Improve the diff page UI to show visual diffs (but keep the current "raw" mode as an option).
  • Make sure Gutenberg block HTML is cleanly formatted across multiple lines to improve line-based diffs used on the post diff screen.

Attachments (1)

Screenshot_20191112_194109.png (116.6 KB) - added by seanleavey 3 weeks ago.
Diff screen example

Download all attachments as: .zip

Change History (2)

@seanleavey
3 weeks ago

Diff screen example

Note: See TracTickets for help on using tickets.