Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow toggling patch checkbox by clicking on lines #1429

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Commits on Oct 30, 2020

  1. Clean up closing </span> detritus

    Browser HTML-parsers are tolerant, but still...
    simonwiles committed Oct 30, 2020
    Configuration menu
    Copy the full SHA
    699eb88 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3f2f10a View commit details
    Browse the repository at this point in the history
  3. Prevent pointer-events on line-number elements

    Note that this actually *allows* clicking on line numbers to toggle checkboxes in patch mode.
    simonwiles committed Oct 30, 2020
    Configuration menu
    Copy the full SHA
    939adc4 View commit details
    Browse the repository at this point in the history
  4. Don't use jQuery to toggle the checkbox state

    This is mainly just because it's the easiest way to satisfy the linter...
    simonwiles committed Oct 30, 2020
    Configuration menu
    Copy the full SHA
    b582f78 View commit details
    Browse the repository at this point in the history
  5. Update CHANGELOG.md

    simonwiles committed Oct 30, 2020
    Configuration menu
    Copy the full SHA
    1f293c8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    c51cd13 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ea2057f View commit details
    Browse the repository at this point in the history
  8. Prevent re-render when text on a single line is selected

    The change introduced [here](FredrikNoren#1429 (comment)) (moving the click event to the row) requires a re-render when the row is clicked, and this causes selection issues when selecting text on a single line only.  This commit prevent the handler from running when patch mode is not enabled, and so makes selections from a single line possible at least in this case.
    simonwiles committed Oct 30, 2020
    Configuration menu
    Copy the full SHA
    58a3838 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    45a5f82 View commit details
    Browse the repository at this point in the history
  10. Remove unnecessary setting of initial checked state

    Prettier seems to insist on this on one line.
    simonwiles committed Oct 30, 2020
    Configuration menu
    Copy the full SHA
    8eb616d View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    55d5f6a View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    9175d26 View commit details
    Browse the repository at this point in the history
  13. Re-render when patchLineList has been reset

    When the edit state has been reset because all the patch line checkboxes have been cleared, `patchLineList` is reset to an empty list.  Comparing the before and after html strings is not adequate to detect this change, because `TextDiffViewModel.render` always renders with patchLineList initialized to all `true` values regardless.  Adding this check prevents the UI state from becoming inconsistent, while not rerendering on the `detectReActivity` event.
    simonwiles committed Oct 30, 2020
    Configuration menu
    Copy the full SHA
    3ded019 View commit details
    Browse the repository at this point in the history
  14. Don't toggle lines' patch status when selecting text

    This isn't perfect, but it's better than it was before.
    simonwiles committed Oct 30, 2020
    Configuration menu
    Copy the full SHA
    59b8135 View commit details
    Browse the repository at this point in the history