Introduced annotation that represent when one or more lines are added or deleted.
Feature Summary
On the current experience, instead of just displaying the paragraph split, the diff looks like an entire chunk of text was deleted and then added back. Also, if there’s a word change inside the paragraph that has been split, the change isn’t highlighted/noted anywhere. This error could lead to cases of vandalism that might be overlooked.
There is a difference in how the diff is represented when you press enter once vs. when you press enter twice.
When you press enter once, the diff takes it as adding a space, and not a new line. There isn’t a paragraph break. See this video on how it looks when you press enter once:
When you press enter twice, the diff takes it as a new line, and the paragraph is split. See this video:
Use cases
- As a viewer of the Two-column Wikitext Diff diff on Desktop: I am able to recognize when a new line or multiple new lines are added.
- As a viewer of the Two-column Wikitext Diff diff on Desktop: I am able to recognize when a paragraph has been split.
- As a viewer of the Two-column Wikitext Diff diff on Desktop: I am able to see a visual marker to show when a word changed within a paragraph that was split up as its own paragraph.
- As a viewer of the Two-column Wikitext Diff diff on Desktop: I am able to recognize when a line or multiple lines are deleted.
Benefits
All users of the diff view will better understand when a paragraph has been split, rather than text being deleted and re-added.
Details for QA
- Add test coverage for existing functionality, if missing
- Acceptance Criteria: This change must ensure "functionality parity" in all other diff stress tests
- Make sure markup/css changes to wikidiff do not break PHP engine output
Designs and details
One New line (pressing enter once)
The action of pressing enter once will be represented with the "↵newline" blue highlighted text.
Current experience | Proposed design |
---|---|
More than one new line - paragraph split (pressing enter more than once)
The action of pressing more than once:
- The first enter will be represented with the blue highlighted text: "↵newline"
- The additional enters will be represented with a highlight that extends throughout the whole box representing the addition of a new line with the text "↵newline" highlighted in blue.
Current experience | Proposed design |
---|---|
One or more lines deleted (pressing backspace or delete multiple times)
The action of pressing backspace or delete multiple times to delete a line or paragraph will be represented with the yellow boxes and "← delete" yellow highlighted text.
Engineering Considerations
Please review https://phabricator.wikimedia.org/T329894#8626789 for a possible technical approach.