Problem to solve
In the current Timeline, to scrutinize the contents of every edit, users must open the diffs in a new tab. This makes using the Timeline a multiple-tab tool, which may decrease productivity.
Acceptance criteria
- When a user clicks on an edit box the diff container should open, which includes:
- A fixed header
- "Revision as of TIMESTAMP" linked to the revision, above each revision column
- "by USERNAME" linked to the userpage, above each revision column
- A close button in the top right corner. When clicked, the diff container should close.
- A two-column wikitext diff with the same styling as it does on standard desktop Wikimedia diff pages (example)
- Line numbers
- Color coding and highlighting
- + and - symbols
- The diff should have a maximum height of 500 pixels and should scroll within if needed
- A fixed header
- Multiple diffs should be able to be opened on the same page.
Wireframe
Notes
There should probably be an onClick() handler on the revision card. When clicked, it will dispatch an action to go get the diff (if it doesn't already exist). The diff should probably be stored within the revision object. If this needs a loading indicator, you would probably have to add some sort of loading flag on each revision. It might not need a full-blown loading indicator, it could be something subtle... like the hover color sticks around or something like that.
API
Edit: https://test.wikipedia.org/w/api.php?action=compare&fromrev=338496&torelative=prev&formatversion=2
New Page: https://test.wikipedia.org/w/api.php?action=compare&fromrev=338495&torelative=prev&formatversion=2