Implement a word-diff mode for merge requests
<!--IssueSummary start--> <details> <summary> Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards. </summary> - [Collaborate/take over this issue](https://contributors.gitlab.com/manage-issue?action=work&projectId=278964&issueIid=324806) </details> <!--IssueSummary end--> Belongs to https://gitlab.com/groups/gitlab-org/-/epics/1373 epic. ## Prerequisites 1. Word-diff parser - https://gitlab.com/gitlab-org/gitlab/-/merge_requests/55105 2. Word-diff support on gitaly side - https://gitlab.com/gitlab-org/gitlab/-/issues/324805 ## Proposal We want to display a `git diff --word-diff` response on UI. User will have an option to choose `Word-diff` mode on merge request screen. ### Technical implementation User sends an extra attribute to enable `word-diff` mode [to the backend controller](https://gitlab.com/gitlab-org/gitlab/blob/0e04af27aefb0c7e8c375c75b30495b02c684dab/app/controllers/projects/merge_requests/diffs_controller.rb#L24). GitLab ruby application will pass this attribute to Gitaly via [Gitaly::CommitDiffRequest](https://gitlab.com/gitlab-org/gitlab/-/blob/f0ddfaf0e31c81b00b5702587c991ac1d9774fba/lib/gitlab/gitaly_client/commit_service.rb#L436). The response will be parsed by [Gitlab::WordDiff::Parser](https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/word_diff/parser.rb) and returned back to the frontend. ### Screenshots The expected result approximately looks like this: ![Screenshot_2021-02-04_at_18.33.23](/uploads/d7175fe0bffd27d8524304a90ac30df3/Screenshot_2021-02-04_at_18.33.23.png)
issue