Homec4science

Fix issues with Differential file toggling

Authored by Alan Huang <alanh@fb.com> on Aug 10 2012, 02:53.

Description

Fix issues with Differential file toggling

Summary:
See D2714#15.

  1. Give anchors an id equal to their name so JX.$ can find them.
  2. Listen for click s on <a> s instead of hashchange s to make toggling a bit more correct and consistent.
  3. Add a placeholder menu item when the file is unloaded. A previous patch by @jungejason had left the item blank in that case.
  4. In fixing (1) I found another exception when clicking on ToC links. Since those links are differential-load, they try to load the file before jumping to it. However, loading destroys the node it's looking for, so if you jump to an already-loaded file JX.$ complains at you.

Test Plan: Make a giant diff. Click on links and try toggling files.

Reviewers: epriestley, vrana

Reviewed By: vrana

CC: vrana, aran, Korvin

Maniphest Tasks: T370

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

Details

Committed
Alan Huang <alanh@fb.com>Aug 10 2012, 02:53
Pushed
aubortJan 31 2017, 17:16
Parents
rPH80d9a276f321: Automatically resolve merge conflicts in Celerity map
Branches
Unknown
Tags
Unknown

Event Timeline

Alan Huang <alanh@fb.com> committed rPHdbde4b9ff281: Fix issues with Differential file toggling (authored by Alan Huang <alanh@fb.com>).Aug 10 2012, 02:53