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
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
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
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
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
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
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
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
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
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
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
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