Page MenuHomePhabricator

Improve string truncation behavior for strings truncated in a very long word
ClosedPublic

Authored by epriestley on Jun 7 2018, 6:50 PM.
Tags
None
Referenced Files
F13123083: D19477.diff
Tue, Apr 30, 8:06 AM
Unknown Object (File)
Fri, Apr 19, 7:45 PM
Unknown Object (File)
Wed, Apr 17, 2:57 PM
Unknown Object (File)
Thu, Apr 11, 2:27 AM
Unknown Object (File)
Tue, Apr 2, 1:51 AM
Unknown Object (File)
Mon, Apr 1, 10:14 AM
Unknown Object (File)
Mar 31 2024, 6:50 PM
Unknown Object (File)
Mar 29 2024, 4:32 AM
Subscribers
None

Details

Summary

Ref T13151. See PHI654. When truncating strings like package names in the form "X: YYYYYYYYYYYY", we currently render "X...".

A better rendering in this case is "X: YYYYYY...", where we chop the long word in the middle.

Tweak the logic a bit to handle this case better.

This will support improving the display behavior of long package names in the table of contents view.

Test Plan

Added/modified unit tests, got a clean result.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Not Applicable
Unit
Tests Not Applicable