HomePhabricator

Truncate package names in diff table of contents views

Description

Truncate package names in diff table of contents views

Summary:
Ref T13151. See PHI654. Depends on D19477. If you have long package names, the table of contents (e.g., in Differential) can end up expanding to be gigantic.

Getting tables to behave nicely is hard (or, at least, I can't figure it out after spending a decent amount of time on it; see also AphrontTableView::renderSingleDisplayLine()). I tried a bunch of things and Googled for a bit but didn't make any progress on finding a CSS solution. Just truncate the package names to get reasonable behavior without falling down any kind of CSS rabbit hole.

Test Plan:

  • Created a package named "Very long package name...".
  • Created a package named "MMMMMMMMMMMMMMMMMMMMMM...".
  • Had them own a file in a Differential revision, viewed that revision.
  • Before: table is pushed out to several times the browser window width and everything is kind of a mess.
  • After: package names get truncated to something reasonable.

Screen Shot 2018-06-07 at 11.55.47 AM.png (620×1 px, 128 KB)

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13151

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

Details