21 Commits

Author SHA1 Message Date
Kasper Nilsson
93b0ad4964 Add expand inline functionality to diffs
This commit enables the user to manually expand individual diffs
inline in the file list of the change view.

Bug: Issue 4382
Change-Id: I87d5af9971fed3aa5e1eb64523f4623a5ff2ac8d
2016-08-26 10:36:30 -07:00
Viktar Donich
c282d7b282 Toggle left diff on Shift+A
Feature: Issue 3926
Change-Id: Ia52334f2aefeae4b3f115e5779da3b61af25ba11
2016-08-10 12:54:49 -07:00
Viktar Donich
b34d1f87c7 Show file weblinks (e.g. gitles) in diff view
Bug: Issue 4205
Change-Id: Ib5c832bb29453aa51ebe73732c7b8e6885e7e12f
2016-08-03 14:52:13 -07:00
Urs Wolfer
33df005810 Fix issues detected by 'JSHint' and 'JSCS'
Change-Id: Ic1437333fcf82473ac57f8bdea25ee8188ddbfee
2016-07-15 20:32:27 +02:00
Wyatt Allen
66bfe0005d Move the diff cursor when the diff content is tapped
When a user taps a line number in a diff, the cursor is moved to that
line and that side of the diff. However, if the user taps the text
content of a diff, the cursor was not moved. With this change, the
cursor is moved to the appropriate line and side of a diff when either
is tapped.

Bug: Issue 4215
Change-Id: I47d24f678f487eb3f8173ea5572865a589d845e4
2016-06-21 13:58:22 -07:00
Viktar Donich
0f02cda57e Make gr-builder a Polymer component
Updated tests, fixed draft comments, context expanding.

Change-Id: Ic4bd9682c63edd8e80fbc2abcb4fa5e406a202ab
2016-06-03 10:22:47 -07:00
Andrew Bonventre
6c9d862e10 Revert "Make gr-builder a Polymer component"
This reverts commit 56689af0f92ce13f90ff9369544c5f9cc0412f09.

Reason for revert: This change broke adding draft comments in the diff
view.

Change-Id: Icfbd3eb4e24cce3e1690e7eaf12e14e5705c7e3e
2016-06-03 13:07:33 +00:00
Viktar Donich
56689af0f9 Make gr-builder a Polymer component
Change-Id: I0d99775332b0ef473459ad481970ad6033427c7d
2016-06-02 13:09:39 -07:00
Viktar Donich
7ad28920e9 Gr-diff retrofit: store comment state
Fixing UI data pipe line, re-rendering:
 - side, draft text and editing status in UI comment objects
 - update gr-diff UI model on comment save/update

Feature: Issue 3910
Change-Id: I96f714c7de9add6e316dcf64bb7d566690b9d3ae
2016-05-27 10:46:54 -07:00
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