12 Commits

Author SHA1 Message Date
Viktar Donich
b7c2cce46a Gr-diff retrofit: implement re-render.
Feature: Issue 3910
Change-Id: Ia85bb2302f8435fd6066873ce87bc9c08b9c63b1
2016-05-26 14:57:18 -07:00
Wyatt Allen
88678da403 Add support for images in diffs
If gr-diff recognizes that the file difference it's representing is
between images, it uses a different diff-builder that displays images
in a side-by-side-manner. In this case gr-diff will also make requests
for the image data itself, which it can pass down into the image-based
diff-builder.

Adds methods to gr-rest-api-interface to support rendering the data
relevant to image diffs. For images that are revisions of the current
change, provides "getChangeFileContents". For images that come from the
parent tree (i.e. if the basePatchNum is "PARENT") the interface
provides "getCommitInfo" to determine the SHA of the parent commit, and
"getCommitFileContents" which can get file contents for a given commit.

Bug: Issue 3822
Change-Id: I9be025b4e549fca97c87cdbeede6cb64dea5eac0
2016-05-26 12:02:29 -07:00
Urs Wolfer
c37b69ab9b Fix issues detected by 'JSHint' and 'JSCS'
Change-Id: Ibee5d0843da5776ab1ad43158227178105467d2e
2016-04-29 22:25:51 +02:00
Andrew Bonventre
2aa22125b6 Move gr-diff-new to gr-diff
Change-Id: Ifaad016f806c31f3df43143b3238b757faa18b20
2016-03-25 17:56:08 -04:00
Andrew Bonventre
6a9312f7b1 Properly remove discarded comments from model in gr-new-diff
Change-Id: Icb5d3ba1edd2cd3a75aa6568a152bacc5e0babda
2016-03-25 16:17:06 +00:00
Urs Wolfer
f531d0aeb9 Fix tests which are wonky in Safari
Change-Id: I5f60afd9302581204c9ab08eda10a2273677b4fa
2016-03-14 17:12:03 +01:00
Andrew Bonventre
8e5ac9d92a Move fake-app.js to test folder
Also exclude *_test.html files from BUCK app glob

Change-Id: If1890b46ffb7d4657bdea83786de5262343835ff
2016-03-10 19:30:31 -05:00
Shawn Pearce
54e7de87a5 Merge changes Idea54a38,Iaa77c408
* changes:
  Fetch diff comments via getDiffComments call
  Add getDiff() method to gr-rest-api-interface
2016-03-07 22:06:58 +00:00
Andrew Bonventre
af1c602139 Fetch diff comments via getDiffComments call
+ Cleans up interface for grouping comments within
  gr-rest-api-interface.
+ Removes gr-diff’s dep on gr-ajax and rest-client-behavior.

Change-Id: Idea54a38fa5d0b136ff00b7ec7322bd24ad5d1bd
2016-03-07 16:55:04 -05:00
Urs Wolfer
b603694158 Remove 'element#async' usages in tests
Tests which are using 'element#async' are wonky in Safari.
'flush' is also the documented way of testing dom manipulations.

Change-Id: I3ea99c7c80c952fa1c15bbd6289690e57bf8414b
2016-03-06 17:23:36 +01:00
Andrew Bonventre
cba7d44e69 Add getDiff() method to gr-rest-api-interface
+ Replace use of gr-ajax for retrieving the diff in gr-diff.
+ Add opt_params to fetchJSON so that query parameters can be
  passed.

Change-Id: Iaa77c4082d6e83099e23f49205d859a5c938dd31
2016-03-05 19:20:09 -05:00
Andrew Bonventre
78792e8e98 Refactor directory structure of components
There is no change in functionality. Only moving things around.

+ Separate html from the js.
+ Place the unit test for a component within the same folder.
+ Organize the components in subfolders.

Change-Id: I51fdc510db75fc1b33f040ca63decbbdfd4d5513
2016-03-04 18:02:24 -05:00