Skip to content

Fix vertical table alignment for Unicode headers - #117

Merged
rolandwalker merged 1 commit into
dbcli:mainfrom
Rajvira10:fix/vertical-header-display-width
Oct 16, 2026
Merged

rolandwalker merged 1 commit into
dbcli:mainfrom
Rajvira10:fix/vertical-header-display-width

Conversation

@Rajvira10

Copy link
Copy Markdown
Contributor

Description

Vertical output misaligns headers such as 名前 and age because padding counts characters rather than terminal columns. Measure visible width before padding, including styled headers.

Three regression cases fail before the fix. Full suite: 92 passed, 4 skipped; without styling: 86 passed, 10 skipped.

Black ran directly because the hook configuration requires unavailable Python 3.7.

Checklist

  • I've added this contribution to the CHANGELOG.
  • I've added my name to the AUTHORS file.
  • I installed pre-commit hooks and ran black on my code.
  • Please squash merge this pull request.

@rolandwalker

Copy link
Copy Markdown
Contributor

Thanks! Makes sense! Any reason this PR is still a draft?

@rolandwalker rolandwalker self-assigned this Oct 16, 2026
@Rajvira10
Rajvira10 marked this pull request as ready for review October 16, 2026 15:38
@rolandwalker
rolandwalker merged commit 05a31a8 into dbcli:main Oct 16, 2026
@rolandwalker

Copy link
Copy Markdown
Contributor

Thank you!

j-bennet pushed a commit to dbcli/pgcli that referenced this pull request Nov 3, 2026
cli_helpers 2.15.2, released 2026-10-16, aligns vertical output by
display width (dbcli/cli_helpers#117), so the header 配列, two wide
characters, gets two fewer padding spaces. The test had the old
misalignment written down and fails with the new release.

The expectation now has the aligned output, and cli_helpers >= 2.15.2
keeps the test from depending on which release is installed: 2.15.1
fails it, as it should, since it misaligns.

Co-authored-by: Diego <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants