Skip to content

fix: unify label widths when widgets passed to Container constructor#730

Open
tlambert03 wants to merge 1 commit into
mainfrom
claude/issue-729-7uhakv
Open

fix: unify label widths when widgets passed to Container constructor#730
tlambert03 wants to merge 1 commit into
mainfrom
claude/issue-729-7uhakv

Conversation

@tlambert03

Copy link
Copy Markdown
Member

Container(widgets=[...]) rendered with different label/control alignment
than an empty Container populated with append(). During init, widgets
are inserted before _initialized is set to True, but _unify_label_widths()
is a no-op until _initialized is True, so label widths were never unified
for constructor-supplied widgets.

Call _unify_label_widths() once after initialization completes.

Fixes #729

Container(widgets=[...]) rendered with different label/control alignment
than an empty Container populated with append(). During __init__, widgets
are inserted before _initialized is set to True, but _unify_label_widths()
is a no-op until _initialized is True, so label widths were never unified
for constructor-supplied widgets.

Call _unify_label_widths() once after initialization completes.

Fixes #729
@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.27%. Comparing base (2d985e7) to head (b0b9943).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #730   +/-   ##
=======================================
  Coverage   89.27%   89.27%           
=======================================
  Files          40       40           
  Lines        4821     4822    +1     
=======================================
+ Hits         4304     4305    +1     
  Misses        517      517           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Container(widgets=[...]) and Container.append(...) produce different label alignment

2 participants