Page MenuHomePhabricator

Ensure empty lines do not appear with large widths on last column of PhutilConsoleTable
ClosedPublic

Authored by hach-que on Jan 11 2015, 10:55 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 18, 4:27 AM
Unknown Object (File)
Tue, Dec 17, 10:39 PM
Unknown Object (File)
Mon, Dec 9, 11:08 AM
Unknown Object (File)
Thu, Dec 5, 12:55 AM
Unknown Object (File)
Oct 27 2024, 11:35 PM
Unknown Object (File)
Oct 25 2024, 10:17 AM
Unknown Object (File)
Oct 21 2024, 8:56 AM
Unknown Object (File)
Oct 14 2024, 1:21 PM
Subscribers

Details

Summary

If the last column has a large width, it will space out the content of the last column even if no borders are shown. This causes empty lines to appear (that have no content).

Instead, no spacing should be performed on the data of the last column if the column is left aligned and no borders are shown. Long data in the last column will wrap in the terminal (as it would anyway), but rows with short data won't cause empty lines.

Test Plan

Tested under Omni.

Diff Detail

Repository
rPHU libphutil
Branch
phutil-no-spacing
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 3757
Build 3768: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

hach-que retitled this revision from to Ensure empty lines do not appear with large widths on last column of PhutilConsoleTable.
hach-que updated this object.
hach-que edited the test plan for this revision. (Show Details)
hach-que added a reviewer: epriestley.
epriestley edited edge metadata.
epriestley added inline comments.
src/console/PhutilConsoleTable.php
197

This might read a little more clearly as shouldAddSpacing() (i.e., invert all the outputs and logic), but hwatever.

This revision is now accepted and ready to land.Jan 11 2015, 5:37 PM
hach-que edited edge metadata.

Rename to shouldAddSpacing

This revision was automatically updated to reflect the committed changes.