Repository navigation
Add a readable view to the version compare - #62
Merged
Merged
Conversation
The compare page opens in a Readable view: both versions rendered, split into lines, headings, list items and table rows, and compared with phpBB's diff engine. Unchanged parts keep their formatting, added and removed parts are marked whole, a part whose words changed shows which ones, and a part whose formatting alone changed is outlined. Parts with an image are shown whole. Source keeps the BBCode diff; Template: pages use it only. Also: comparing now needs u_wiki_versions, like the version history, and both versions must belong to the article in the address; the description diff no longer hides behind the sources' diff; and NO_VERSIONS_SELECTED has its text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The compare page showed raw BBCode, which is hard to follow for editors who don't read BBCode (the TODO's "Readable version compare"). It now opens in a Readable view, and Source keeps the old BBCode diff.
Readable view (new
wiki/readable_diff.php)Template:pages are compared as written (Source only), since their text doesn't make sense rendered on its own.Fixes in the compare page
u_wiki_versions, like the version history. Before, anyone could open?action=compare&from=…&to=…for any version IDs, including versions waiting for approval. Both versions must also belong to the article in the address.NO_VERSIONS_SELECTEDhad no text and showed as the raw key. It now reads "Choose two versions of this article to compare."Also
docs/TODO.md.Claude tested this on a seed-forum board with the wiki fixtures. It covered Main Page versions 1 → 3 (changed words, a removed line with a link, an added image and list) and Busy Article 17 → 46 in the readable view, plus the source view. It also checked that a guest is refused, that mismatched or missing version IDs give the new message, and that the compare page still links to approving and rejecting versions.
Investigated and written by Claude on behalf of William Jacoby (bonelifer).
🤖 Generated with Claude Code