2068 Commits

Author SHA1 Message Date
Paladox none
da64859ddd Fix polygerrit lint
Was failing with

/home/jenkins/.cache/bazel/_bazel_jenkins/3239551e333dc09ba2b5ef07ff4549b6/execroot/gerrit/bazel-out/local-fastbuild/bin/polygerrit-ui/app/lint_test.runfiles/gerrit/polygerrit-ui/app/lint_test: 14: /home/jenkins/.cache/bazel/_bazel_jenkins/3239551e333dc09ba2b5ef07ff4549b6/execroot/gerrit/bazel-out/local-fastbuild/bin/polygerrit-ui/app/lint_test.runfiles/gerrit/polygerrit-ui/app/lint_test: [[: not found
+ /usr/bin/eslint --ignore-pattern bower_components/ --ignore-pattern gr-linked-text --ignore-pattern scripts/vendor --ext .html,.js .

Change-Id: Ib4650dbacd4d29123f5f1d1021592a5a02377182
2017-05-22 18:09:35 +00:00
Becky Siegel
86563dfff6 Fix dropdown in Safari and Firefox
Safari and Firefox didn't correctly render gr-autocomplete-dropdown.
Instead of getting placed directly below content, it went off to the
right.

Adding a div around it fixes the problem and it renders correctly.

Bug: Issue 6268
Change-Id: I90aa5e9997aa2677bec532e8c5957a49431012f9
2017-05-22 17:34:06 +00:00
Becky Siegel
c89e5e31cf fix lint
Change-Id: I4202b557844e8641bddcf821693c7109b3881bdf
2017-05-22 09:59:39 -07:00
Becky Siegel
9f09b2240f Merge "Try to fix test flakiness" 2017-05-22 16:19:02 +00:00
Wyatt Allen
2b37d9363f Merge "Fix delete button again" 2017-05-19 23:09:03 +00:00
Becky Siegel
64cede2a14 Fix delete button again
In the previous fix, the function was not called and since it was
the function that set the class to 'hidden' it did not hide.

Change-Id: Ic8f908802cb515086860f20e2c82d0ddd06c0278
2017-05-19 23:08:16 +00:00
Kasper Nilsson
7ff31780db Merge "Switch scrollTop from history to viewState" 2017-05-19 22:53:01 +00:00
Becky Siegel
797f59f0c6 Switch scrollTop from history to viewState
Previously, scrollTop was stored in the history object. There is a
chrome bug where resetting history can cause the search box to close.

Instead of storing as part of the history object, the scrollTop of the
last viewed change is stored as part of the viewState object.

When a new change is loaded, scrollTop gets reset to 0.

Bug: Issue 5297
Change-Id: Ia9e2d0b6c43935f814a427e3a46eea331f1cd28b
2017-05-19 15:28:13 -07:00
Wyatt Allen
590fc9490b Merge "PolyGerrit: If your account does not have a name use a default name" 2017-05-19 21:46:51 +00:00
Becky Siegel
7aad56652f Merge "Add gr-autogrow-textarea element with emoji support" 2017-05-19 21:35:14 +00:00
Becky Siegel
0c7b0bf6d2 Fix console error when removing reviewer
Change-Id: I003f11006a7b08a808417462509f962d8b678487
2017-05-19 13:27:02 -07:00
Kasper Nilsson
5a93dbd4dd Fix lint errors
Change-Id: Ia1d631d1155b233897459e1ceb64aa1d61d84d8e
2017-05-19 10:43:02 -07:00
Becky Siegel
56299d27a1 Add gr-autogrow-textarea element with emoji support
gr-autogrow-textarea is a replacement for iron-autogrow-textarea that
includes emoji support. This uses gr-autocomplete-dropdown as a
sub-element.

The dropdown is triggered when ":" is added to the textarea followed by
one more character (that is not a space or a new line) shows the top 10
matches. As the user types, the matches update.

Note, that the matches show any substring match, and this can be
improved in further iterations. Once there are no matches, or the escape
key is pressed, the dropdown is closed.

It is up to the parent element to make sure the dropdown gets closed
correctly/when it is closed.

Future work:
- Add more emoji
- Determine how to deal with multiple matching keywords
- Determine better ways to show top choices.
- Possibly deal with resized windows while the emoji dropdown is open
- Refactor to work properly with shadow dom - there are some issues
  with keeping focus on the dropdown.

Change-Id: I11901676ed58fe9d3d0b36a43dd58002275f75db
2017-05-19 10:36:50 -07:00
Kasper Nilsson
d36f2bdf74 Merge "Fix for..of loop inside gr-reply-dialog" 2017-05-19 16:59:56 +00:00
Wyatt Allen
e013aada8a Fix for..of loop inside gr-reply-dialog
A for loop in gr-reply-dialog was upgraded from a for..in to a for..of
in Id69bd13fd, but the iteratee was not iterable. This thew an exception
in a unit test, but did so in a way that did not cause the test to fail.

With this change,
- The unit test is corrected to fail when the wrong for loop is used.
- An additional unit test is added for the problem method specifically.
- The loop is fixed in gr-reply-dialog.

Bug: Issue 6258
Change-Id: Idaa0e19066d5a9b273a402a5dd75024d3ffec17b
2017-05-19 09:54:05 -07:00
Paladox none
33cabbfee1 PolyGerrit: If your account does not have a name use a default name
When you create an account with no name it is very hard to go to
settings to change the name as the dropdown will be hidden. Lets do
what gwtui does and provide a fake name so that dropdown works.

Change-Id: I7a6cb6fadff6e12f02611af4020781eb7191e0f6
2017-05-19 15:38:35 +00:00
Wyatt Allen
837ed15453 Merge "PolyGerrit: Add support for muting and unmuting changes" 2017-05-18 22:30:44 +00:00
Kasper Nilsson
2a992d60ad Merge "Fix Polylint errors" 2017-05-18 22:07:32 +00:00
Paladox none
288f57c9a0 PolyGerrit: Add support for muting and unmuting changes
Bug: Issue 6191
Change-Id: I95f01ed91e839c213987e3d5da68ca612c6e311c
2017-05-18 22:41:05 +01:00
Paladox none
1f6008b319 PolyGerrit: Add support for private changes
Bug: Issue 6042
Change-Id: Iaf3edeeb21959fdc3fd7b0d48958606130a99975
2017-05-18 14:11:40 -07:00
Becky Siegel
94cf669dc0 Do not show delete button for admins when comment is a draft
There was a formatting issue caused by delete buttons in a draft change.
It really does not make sense for the button to be there for drafts
anyway. This change hides the delete button for admins on draft changes.

Bug: Issue 6257
Change-Id: I236eff9db1f0ca76ed658f3048132c9c675ee407
2017-05-18 13:15:09 -07:00
Kasper Nilsson
e23754b0b9 Fix autocomplete focus behavior
On keyboard completion, the autocomplete did not re-focus on the input.
This change fixes that, and prevents any regression by adding asserts
to the test suite.

Bug: Issue 6253
Change-Id: I76bae30e069d28c00d3029fe36ff9d731fd7631b
2017-05-18 11:31:08 -07:00
Logan Hanks
090e2b1cdc Merge "Move WIP button into overflow menu" 2017-05-18 17:10:17 +00:00
Aaron Gable
e82fb89df3 Move WIP button into overflow menu
Bug: issue 6247
Change-Id: I84ebe05385c75a205caea297e5231beed84cb48e
2017-05-18 16:49:56 +00:00
Kasper Nilsson
db2ca39d21 Remove certain lint rules from eslint config
During the migration step of the ESLint project, there were a few rules
that were stricter than need be -- specifically, the rules that force
devs to not use indexOf and Array.forEach.

There are several legitimate cases for using these functions, and as
all of the instances where ES6 features like Array.includes and for...of
would work better have been addressed, these rules ought to be removed.

Bug: Issue 6179
Change-Id: Ib8c730a98c8d4a22999b1669dc4ce1a5a85fd749
2017-05-18 09:46:49 -07:00
Wyatt Allen
0f63ca0f83 Merge "ES6ify /gr-diff-builder/*" 2017-05-18 00:50:38 +00:00
Wyatt Allen
13031eb098 Fix Polylint errors
Change-Id: Iaf18389c43a3eb3d93b63cb782b3dd2850cb26df
2017-05-17 17:45:11 -07:00
Wyatt Allen
c0aa3abec0 Merge "Catch-all fix for merged linter errors" 2017-05-18 00:34:59 +00:00
Kasper Nilsson
3a2f287d71 ES6ify /gr-diff-builder/*
Bug: Issue 6179
Change-Id: I9d72fb89a3c3ad916c9097bdf6e5fb31a1dd4cf0
2017-05-18 00:32:33 +00:00
Kasper Nilsson
72bd42419d Merge "ES6ify /gr-file-list/*" 2017-05-18 00:27:39 +00:00
Kasper Nilsson
fbad19e18e Catch-all fix for merged linter errors
Bug: Issue 6179
Change-Id: I436b6dbd88e83b4d901d5446a0c7900678be157d
2017-05-17 17:17:25 -07:00
Kasper Nilsson
3d300c39f8 ES6ify /gr-file-list/*
Bug: Issue 6179
Change-Id: I3e205a480e0b5fc148fa14d3e87bb5c05868e0c7
2017-05-17 17:08:54 -07:00
Kasper Nilsson
75f5614895 Merge "ES6ify /gr-diff-processor/*" 2017-05-17 22:50:13 +00:00
Kasper Nilsson
f86aa8d2ab Merge "ES6ify /gr-diff-view/*" 2017-05-17 22:50:07 +00:00
Kasper Nilsson
96fa08bea1 Merge "Fix faulty equality comparison in download dialog" 2017-05-17 22:45:49 +00:00
Kasper Nilsson
ef51194c11 ES6ify /gr-diff-view/*
Bug: Issue 6179
Change-Id: Ia2268dba166b9f98cd43fb407666a4a29bf285d2
2017-05-17 15:34:20 -07:00
Kasper Nilsson
98501986a8 ES6ify /gr-diff-processor/*
Prior change was reverted due to incorrect modification of lint config.

Bug: Issue 6179
Change-Id: Ieb795403ffa86752d41ae39a4b963e7a1b42b573
2017-05-17 15:33:02 -07:00
Becky Siegel
8fe83b5d4d Merge "ES6ify /gr-ranged-comment-layer/*" 2017-05-17 22:30:13 +00:00
Kasper Nilsson
b9451ec51c Fix faulty equality comparison in download dialog
In the change object, the revision number is represented as an integer.
In the download dialog, patchNum is passed as a string. Due to strict
equality comparison, the download schemes for a particular patchset were
never found.

This change parses the patchNum to an int every time an attempt to
compare it is made.

To protect against regressions, all of the mocked patchNum values in the
test suite have been changed to string values to more accurately reflect
the actual data.

Bug: Issue 6224
Change-Id: I3626cda9eaad48c05fb97efd97ba313f20ab5473
2017-05-17 15:24:54 -07:00
Becky Siegel
fb14d2e018 Try to fix test flakiness
Previously, tests were failing a percentage of the time at a consistent
point, right when gr-app_test.html was starting.

The console error read:
Suite `title` should be a "string" but "undefined" was given instead

After setting a breakpoint in the wct code that triggered the message,
a different error was surfaced:

Error: Timed out loading http://localhost:8081/elements/gr-app_test.html

It seems as if loading gr-app_test.html as the first test suite seems to
address the flakiness.

Change-Id: Ied565556c5b738776fca22bf0f0b7b18f4725da9
2017-05-17 15:02:54 -07:00
Kasper Nilsson
7cdfde1a92 Merge "Make sure 'Merge Conflict' displays on change view" 2017-05-17 21:03:58 +00:00
Becky Siegel
1f50cce86c Merge "ES6ify /gr-selection-action-box/*" 2017-05-17 20:40:43 +00:00
Kasper Nilsson
1c4ef42d74 Merge "Revert "ES6ify /gr-diff-processor/*"" 2017-05-17 20:39:04 +00:00
Kasper Nilsson
6a41c80d50 Revert "ES6ify /gr-diff-processor/*"
This reverts commit fb62c1768184698f6855851cd202c0389cbce591.

Reason for revert: Incorrectly added file

Change-Id: I4970d5b796a8b3ae59368445223323b529516ca0
2017-05-17 20:37:56 +00:00
Becky Siegel
ca9c93e3ee Make sure 'Merge Conflict' displays on change view
Previously, if a change status was 'NEW' the function that determines
if 'Merge Conflict' should be displayed was not called. This change
ensures that it is not bypassed if a change is 'NEW'

Change-Id: Ia273aa846682e7e4453370314044888c8e8c7f99
2017-05-17 13:34:46 -07:00
Kasper Nilsson
00004bc25c Merge "ES6ify /gr-diff-cursor/*" 2017-05-17 20:24:54 +00:00
Kasper Nilsson
e1372fbb66 Merge "ES6ify /gr-diff-highlight/*" 2017-05-17 20:24:14 +00:00
Kasper Nilsson
6f93b2f413 Merge "ES6ify /gr-diff-processor/*" 2017-05-17 20:23:59 +00:00
Kasper Nilsson
ab583c1b89 Merge "Fix spelling error" 2017-05-17 19:54:39 +00:00
Kasper Nilsson
c02ac2bac3 Merge "ES6ify /gr-diff-comment/*" 2017-05-17 19:45:48 +00:00