It was possible to cause a JS error when creating a ranged comment that
started at the very end of the first line (selecting no content on that
line). The relevant null-guard needed an additional set of parens to
avoid evaluating the second OR operand with a bad argument in this case.
Addresses the null-guard boolean expressions in `_normalizeStart` and
`_normalizeEnd` and reduces the number of calls to `_getLength` from
thrice to once per iteration. Adds a relevant unit test.
Change-Id: I98848f9f6089fd3240bda175765770c9f9c5ba30
Changes:
- wrapping in HL now adds cssClass instead of discarding previous ones.
- getLength accounts for tab tags correctly.
- generic splitNode, potentially should be moved into util.
- more tests.
Feature: Issue 3915
Change-Id: Id8a646a5de4fd702aa112678c039df9ff8dd8c0b
Creates action box, that creates range comment on mouse down and hotkey
over selected text in diff. Makes best effort in guessing correct start
and end points for the selection.
Known issues listed as TODO items in test and code.
Feature: Issue 3915
Change-Id: I0a3e41d062e559c8cdb4b847829429f65622eb72
Listen and update diff on comment events:
- call appropriate methods to apply comment ranges on comment creation
- re-render diff on and thread comment discard
- apply highlight on comment mouse over
- remove highlight on comment mouse out
- tests for all above
Feature: Issue 3910
Change-Id: I501ddcd063407777355b9c887118fcae53dcb5f1
Utility methods for applying comment range highlights to diff, with
tests including some of the corner cases.
Feature: Issue 3910
Change-Id: Id7de2dd4ff027ce96479a2d596e9414a0cadd6bf
This change cleans up all lint errors reported by gjslint,
with the exception of third-party code in the gr-linked-text
element and everything under bower_components:
$ gjslint --custom_jsdoc_tags event --check_html \
-e bower_components,gr-linked-text -r app
Skipping 577 file(s).
181 files checked, no errors found.
Change-Id: I080d58bdd33b2d4b8dd22a717f06eebd7bbfb63d