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
Unknown Object (File)
Jan 31 2025, 1:36 AM
Unknown Object (File)
Jan 30 2025, 11:12 AM
Unknown Object (File)
Jan 28 2025, 3:52 AM
Unknown Object (File)
Jan 27 2025, 6:55 AM
Unknown Object (File)
Jan 26 2025, 5:50 PM
Unknown Object (File)
Jan 22 2025, 11:53 PM
Unknown Object (File)
Jan 21 2025, 3:09 PM
Unknown Object (File)
Dec 28 2024, 3:13 PM
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