{"action":"created","issue":{"url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/3112","repository_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5","labels_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/3112/labels{/name}","comments_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/3112/comments","events_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/3112/events","html_url":"https://github.com/Jermolene/TiddlyWiki5/pull/3112","id":296188653,"number":3112,"title":"Incorporate “diff” engine to show visual differences","user":{"login":"Jermolene","id":174761,"avatar_url":"https://avatars1.githubusercontent.com/u/174761?v=4","gravatar_id":"","url":"https://api.github.com/users/Jermolene","html_url":"https://github.com/Jermolene","followers_url":"https://api.github.com/users/Jermolene/followers","following_url":"https://api.github.com/users/Jermolene/following{/other_user}","gists_url":"https://api.github.com/users/Jermolene/gists{/gist_id}","starred_url":"https://api.github.com/users/Jermolene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jermolene/subscriptions","organizations_url":"https://api.github.com/users/Jermolene/orgs","repos_url":"https://api.github.com/users/Jermolene/repos","events_url":"https://api.github.com/users/Jermolene/events{/privacy}","received_events_url":"https://api.github.com/users/Jermolene/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-02-11T13:05:37Z","updated_at":"2018-02-12T10:23:30Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/pulls/3112","html_url":"https://github.com/Jermolene/TiddlyWiki5/pull/3112","diff_url":"https://github.com/Jermolene/TiddlyWiki5/pull/3112.diff","patch_url":"https://github.com/Jermolene/TiddlyWiki5/pull/3112.patch"},"body":"It is proposed to add a “diff-match-patch” engine to TiddlyWiki to enable the display of visual differences like this:\r\n\r\n<img width=\"627\" alt=\"screenshot 2018-02-11 12 51 11\" src=\"https://user-images.githubusercontent.com/174761/36073528-44d27a14-0f2a-11e8-825a-0b492e4aab19.png\">\r\n\r\nI've pushed this branch to https://tiddlywiki.com/prerelease for you to try out.\r\n\r\n# Mechanism\r\n\r\nThis PR uses the [Google diff-match-path](https://code.google.com/archive/p/google-diff-match-patch/) library, exposed as a new `<$diff-text>` widget which is in turn available via `<<compareTiddlers>>` macro.\r\n\r\n# User Interface\r\n\r\nThe differencing engine is exposed in several different places.\r\n\r\nA new editor preview panel showing the differences between the current state of the tiddler being edited and when it was last saved:\r\n\r\n<img width=\"988\" alt=\"screenshot 2018-02-11 12 52 36\" src=\"https://user-images.githubusercontent.com/174761/36073540-75277e12-0f2a-11e8-9c04-e7f194c8431b.png\">\r\n\r\nA new editor preview panel for shadow tiddlers showing the differences between the current state of the tiddler being edited and the underlying shadow:\r\n\r\n<img width=\"982\" alt=\"screenshot 2018-02-11 12 53 15\" src=\"https://user-images.githubusercontent.com/174761/36073547-89f55648-0f2a-11e8-84ec-59c8f97805d8.png\">\r\n\r\nA revised “$:/Import” listing that shows the differences between incoming tiddlers and any existing text:\r\n\r\n<img width=\"969\" alt=\"screenshot 2018-02-11 12 53 58\" src=\"https://user-images.githubusercontent.com/174761/36073555-a4757bb0-0f2a-11e8-8237-78adb444e25a.png\">\r\n\r\n# Todo\r\n\r\n* Documentation\r\n* Figure out any other useful places for diffing\r\n* Figure out other uses for the match and patch parts of the library\r\n * Compactly storing versions as diffs is one example\r\n* Display differences for other fields, not just “text”\r\n* Add extension points for visual differencing of bitmaps\r\n\r\nWe also need to decide whether this should go into the core, or be refactored as a plugin. I'm inclined to keep it in the core because I believe that the functionality that it offers is both fundamental and universal: every TiddlyWiki user edits tiddlers, and seeing visual differences is a critical aid to understanding those edits. Having said that, this patch adds approximately 30,000 bytes to empty.html, taking it from 2,016,354 to 2,047,137 bytes, so we should be asking the question."},"comment":{"url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/comments/364881724","html_url":"https://github.com/Jermolene/TiddlyWiki5/pull/3112#issuecomment-364881724","issue_url":"https://api.github.com/repos/Jermolene/TiddlyWiki5/issues/3112","id":364881724,"user":{"login":"pmario","id":374655,"avatar_url":"https://avatars2.githubusercontent.com/u/374655?v=4","gravatar_id":"","url":"https://api.github.com/users/pmario","html_url":"https://github.com/pmario","followers_url":"https://api.github.com/users/pmario/followers","following_url":"https://api.github.com/users/pmario/following{/other_user}","gists_url":"https://api.github.com/users/pmario/gists{/gist_id}","starred_url":"https://api.github.com/users/pmario/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmario/subscriptions","organizations_url":"https://api.github.com/users/pmario/orgs","repos_url":"https://api.github.com/users/pmario/repos","events_url":"https://api.github.com/users/pmario/events{/privacy}","received_events_url":"https://api.github.com/users/pmario/received_events","type":"User","site_admin":false},"created_at":"2018-02-12T10:23:30Z","updated_at":"2018-02-12T10:23:30Z","author_association":"CONTRIBUTOR","body":"@danielo515 ... oh. I think, I did misunderstand the side-by-side option. ... The config I did talk about, is about word or line diffs. \r\n\r\nA diff like this, in [line 66](https://github.com/Jermolene/TiddlyWiki5/pull/3073/commits/bca1a5f5d695efc59a7d2242efd2179a4efd774b) don't work out of the box. ... This would need 2 different diffs. One word/char based and one line-based.\r\n\r\n"}}
{"actor":{"display_login":"pmario"}}