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
F13254313: D19477.diff
Sat, May 25, 3:19 AM
F13230645: D19477.id46581.diff
Mon, May 20, 11:10 PM
F13189330: D19477.diff
Sat, May 11, 5:52 AM
Unknown Object (File)
May 1 2024, 12:13 AM
Unknown Object (File)
Apr 30 2024, 8:06 AM
Unknown Object (File)
Apr 19 2024, 7:45 PM
Unknown Object (File)
Apr 17 2024, 2:57 PM
Unknown Object (File)
Apr 11 2024, 2:27 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
Branch
trunc1
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 20385
Build 27683: Run Core Tests
Build 27682: arc lint + arc unit