+ This does not cover on-keydown handlers within elements.
A follow-up change will account for those.
+ Keyboard shortcuts are disabled within gr-overlay, input,
and textarea elements.
+ Added tests for new behavior (plus some missing ones covering
broken behavior).
+ Removed blur hacks used on elements to placate the kb
shortcuts due to restrictions that have been removed.
Bug: Issue 4198
Change-Id: Ide8009a3bfc340a35a8ec8b9189a85b49c8a95aa
In GWTUI, quoted comments are prepended with ' > ' on each line. This
was causing strange formatting issues due to strings being trimmed on
the backend (see issue for more details), and also didn't really make
sense (who prefers 3 space tabs over 2 or 4?). This change removes the
leading space and denotes quote levels with '> '.
Bug: Issue 4811
Change-Id: Iee1a85b5b2f1a4ab46a35110be65a6b4f156eb6a
The gr-overlay element attempts to manage disabling and enabling
keyboard shortcuts. When multiple gr-overlay elements are available
on a page and one of them opens immediately, that overlay tries to
disable keyboard shortcuts, but the other elements initialize as
closed and enable them.
This change offers a new method for disabling keyboard shortcuts.
The caller can pass in an identifier to enable or disable. If keyboard
shortcuts are disabled by one or more identifiers, then they are
suppressed.
Change-Id: I82fe6efd922f09279e76a2f2c8cb5781f3afe395
This change adds keyboard shortcuts to the "gr-diff-comment-thread"
expand all comments when 'e' is pressed and collapse all comments when
'shift + e' is pressed. Note that the keyboard event is detected on the
thread instead of the comment to minimize the number of events getting
triggered.
Feature: Issue 4738
Change-Id: Iab77349bd1527d7af5e05a827919a78a86909835
Add comments that are replies to ones missing from comment thread as
top-level comments to the thread instead of discarding.
Change-Id: Ib93fa1c74f1ca004ee2361e017dc1210c42ec399
Update comments collection in gr-diff-comment-thread when its child
comment changes. Child comment is expected to send comment-update
event.
Change-Id: I8116820679b29b7511719f95ae73b48e2345102c
- gr-file-list recognizes local preferences (for hasRangedComments flag)
- gr-file-list reacts to cursor hotkey only if there is no range
selected (currently always false).
- Remove dead code from GrDiffBuilderSideBySide, GrDiffBuilder,
gr-diff-builder.html
- Bugfix: GrDiffBuilder.prototype.getGroupsByLineRange handles one-line
BOTH code sections correctly. Test updated as well.
- Added utitily methods added to gr-diff-builder.html to reduce
dependency on DOM structure and reduce amount of code copy-pasting:
- renderLineRange, getContentByLine, etc
- For gr-diff.js and gr-diff-comment-thread.js addDraft renamed to
addOrEditDraft because that's what it does.
- For both, addDraft method always creates a draft comment.
- Added support for ranged comments in gr-diff, gr-diff-comment-thread.
- Added mouseenter and mouseout events to gr-comment.js
- Refactored gr-comment.js to reduce code copy-paste, unify event
payload, and to eliminate need of accessing component instance for
patchNum. Tests updated as well.
- Refactored gr-diff.js UI data model update using gr-diff-builder.html
utility methods to make code more readable.
- Added support for creating ranged comments to gr-diff.js.
- gr-selection-action-box now reacts to click and tap to create a
comment.
Change-Id: I01480a4c6f460774a8b2826915702800b3f81d25
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
+ dom-repeat reuses elements for the sake of efficiency, and
according to [1], it’s considered an anti-pattern to do one-shot
state setup by inspecting attributes/properties in ready/attached.
+ Move state management to be more explicit instead of one-time
setup in ready().
[1] https://github.com/Polymer/polymer/issues/1713
Bug: Issue 3979
Change-Id: I5a7d2ae222223cf1ac8703cd30c66f004b606cfc
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