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:
[[ https://drive.google.com/file/d/123-LbGAlEgyvzPHEE8sKEAwVl6quI73l/view?usp=sharing | Link ]]
When you press enter twice, the diff takes it as a new line, and the paragraph is split. See this video:
[[ https://drive.google.com/file/d/1jtkfR2mbWzvvASWJSiDfaW9bDqNDnWwy/view?usp=sharing | Link ]]
== 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 "line added" blue highlighted text.
| Current experience | Proposed design |
| ----- | ----- | ----- | -----
| {F36483058} | {F36864358}
**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: "line added"
- 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 "line added" highlighted in blue.
| Current experience | Proposed design |
| ----- | ----- | ----- | -----
| {F36483066} | {F36864361} {F36864388}
**Deleted line(s) (pressing backspace or delete multiple times)**
The action of pressing backspace or delete multiple times will be represented with the yellow boxes and "line deleted" yellow highlighted text.
{F36864399}
**Engineering Considerations **
Please review https://phabricator.wikimedia.org/T329894#8626789 for a possible technical approach.
== Impact ==
- Make a more accessible better diffs.
== Contact Person / Team ==
- Community Tech
== Related Conversations ==
Slack channels
- better-diffs
- diffs-working-group