VisualEditor/Diffs/ru

С 2017 года Визуальный редактор предоставляет  (визуальное отображение различий). These are available in two places in the interface: when previewing changes to the document before the user saves the page, and (as a beta feature) within the standard MediaWiki diff display, accessed from the history page. In both cases, the visual diff shows up alongside the traditional two-column wikitext diff, and the user can toggle between the two displays.

Визуальное сравнение версий имеет два основных преимущества перед сравнением версий вики-текстом. The first is that editors can directly see the changes they and others have made without needing to understand wikitext. This is particularly helpful when looking at changes to graphical structures such as tables; for example, if an edit deletes a column from a table, the wikitext diff for it would be hard to understand, while the visual diff would be immediately obvious.

Второе — это то, что технологии могут использоваться для более точного отображения изменения читателю. For example, if an edit swapped two paragraphs (with or without changes to the paragraphs), the visual diff will identify that this is what occurred, while a wikitext diff makes it appear that a paragraph was deleted and an entirely new paragraph was added.

На классических страницах сравнения версий
Most of the examples and screenshots below are about using visual diffs during page previews when editing. However, VisualEditor's visual diffs can also be used on regular diff pages, on any wiki that has VisualEditor installed. You can see an example of it in use on the English-language Wikipedia here.

For wikis that have VisualEditor, there are several ways to activate this visual diff display:


 * Добавьте следующее к LocalSettings.php:
 * If your wiki has a "Beta features" tab within Special:Preferences, and you want to make visual diffs an "opt-in" feature for users, you can add the following to LocalSettings.php:
 * As seen in the Wikipedia example linked above, the visual diff mode can also be activated by simply adding "&visualdiff" to the URL of a diff page.

Как это работает
[[File:VisualEditor_visual_diff_tool_-_visual_diff.png|alt=Скриншот показывает некоторые изменения статьи. Большинство изменений выделены с форматированием текста.|left|thumb|300px|Если вы закончили редактировать страницы, напишите ваше описание изменений и затем выберите "".

В визуальном режиме, вы можете видеть дополнения, абсорбцию, новые ссылки и выделенное форматирование. Другие изменения, типа изменение размера изображения, описаны на стороне.]]





Используемые технологии



 * Google Diff, Match and Patch
 * TreeDiffer.js

Текущие ограничения

 * No notices for changes to "invisible", such as categories or TOC keywords.
 * Has issues with complex changes to tables.
 * Unavailable on certain special pages:
 * Undo "diff" pages.
 * Edit conflict pages

History
Эта функциональность была доступна в качестве первого инструмента сравнения версий в настольной версии Визуального редактора, начиная с версии 1.31.0-wmf-20 и в последующих (было реализовано для отдела производства Викимедиа 6 февраля 2018 года). Before that, it was a secondary tool from the 1.29.0-wmf-17 branch onwards (released to Wikimedia production on 21 March 2017).

Посмотрите также

 * 2016 Community Wishlist Survey/Categories/Reading#CW2016-R094
 * Community Tech/Improved diffs