Homec4science

Fix left/right detection of inline comments in unified view

Authored by epriestley <git@epriestley.com> on Mar 7 2015, 23:37.

Description

Fix left/right detection of inline comments in unified view

Summary:
Ref T2009. Currently, the code figures out if a comment is on the left or right by looking at the <th /> preceeding the enclosing <td />.

This gets the right result in 2-up, but in 1-up rows are always <th />, <th />, <td />, so it always detects every inline as being in the new file.

Because "old" and "new" cells aren't inherently distingushable in the 1up view, we can't use a DOM test for this at all. Instead, just track this state explicitly.

Test Plan:

  • Made left/right comments in 1up view and 2up view.
  • Viewed them in 1up and 2up views.
  • Hovered in 1up and 2up views.
  • Diff-of-diff'd and reviewed old/new comments, then made some more.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: epriestley

Maniphest Tasks: T2009

Differential Revision: https://secure.phabricator.com/D12011

Details

Committed
epriestley <git@epriestley.com>Mar 7 2015, 23:37
Pushed
aubortJan 31 2017, 17:16
Parents
rPH7705f452d238: Make inline comments more discoverable
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH1df321bf00a1: Fix left/right detection of inline comments in unified view (authored by epriestley <git@epriestley.com>).Mar 7 2015, 23:37