fix(examples): add missing WithWidth to table example#1598
Merged
andreynering merged 1 commit intocharmbracelet:mainfrom Feb 26, 2026
Merged
fix(examples): add missing WithWidth to table example#1598andreynering merged 1 commit intocharmbracelet:mainfrom
andreynering merged 1 commit intocharmbracelet:mainfrom
Conversation
Without an explicit width, the table renders with no rows visible. Width should be the sum of all column widths (34) plus borders (8) = 42. Fixes charmbracelet#1597
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1598 +/- ##
=======================================
Coverage 56.18% 56.18%
=======================================
Files 25 25
Lines 1285 1285
=======================================
Hits 722 722
Misses 479 479
Partials 84 84 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Maks1mS
pushed a commit
to stplr-dev/stplr
that referenced
this pull request
Mar 3, 2026
This PR contains the following updates: | Package | Type | Update | Change | OpenSSF | |---|---|---|---|---| | [charm.land/bubbletea/v2](https://github.com/charmbracelet/bubbletea) | require | patch | `v2.0.0` → `v2.0.1` | [](https://securityscorecards.dev/viewer/?uri=github.com/charmbracelet/bubbletea) | --- >⚠️ **Warning** > > Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/23) for more information. --- ### Release Notes <details> <summary>charmbracelet/bubbletea (charm.land/bubbletea/v2)</summary> ### [`v2.0.1`](https://github.com/charmbracelet/bubbletea/releases/tag/v2.0.1) [Compare Source](charmbracelet/bubbletea@v2.0.0...v2.0.1) A small patch release to fix opening the proper default stdin file for input. #### Changelog ##### Fixed - [`110a919`](charmbracelet/bubbletea@110a919): fix(examples): add missing `WithWidth` to table example ([#​1598](charmbracelet/bubbletea#1598)) ([@​shv-ng](https://github.com/shv-ng)) - [`66b7abd`](charmbracelet/bubbletea@66b7abd): fix: check if os.Stdin is a terminal before opening the TTY ([@​aymanbagabas](https://github.com/aymanbagabas)) ##### Docs - [`c751374`](charmbracelet/bubbletea@c751374): docs: correct whats new link ([@​aymanbagabas](https://github.com/aymanbagabas)) - [`736fba2`](charmbracelet/bubbletea@736fba2): docs: upgrade guide: correct badge url ([@​aymanbagabas](https://github.com/aymanbagabas)) *** <a href="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3Ca+href%3D"https://charm.land/"><img" rel="nofollow">https://charm.land/"><img alt="The Charm logo" src="proxy.php?url=https%3A%2F%2Fgithub.com%2F%3Ca+href%3D"https://stuff.charm.sh/charm-banner-next.jpg" rel="nofollow">https://stuff.charm.sh/charm-banner-next.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [X](https://x.com/charmcli), [Discord](https://charm.land/discord), [Slack](https://charm.land/slack), [The Fediverse](https://mastodon.social/@​charmcli), [Bluesky](https://bsky.app/profile/charm.land). </details> --- ### Configuration 📅 **Schedule**: Branch creation - At 12:00 AM through 04:59 AM and 10:00 PM through 11:59 PM, Monday through Friday ( * 0-4,22-23 * * 1-5 ), Only on Sunday and Saturday ( * * * * 0,6 ) (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My40OC4yIiwidXBkYXRlZEluVmVyIjoiNDMuNDguMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiS2luZC9EZXBlbmRlbmNpZXMiXX0=--> Reviewed-on: https://altlinux.space/stapler/stplr/pulls/342 Co-authored-by: Renovate Bot <[email protected]> Co-committed-by: Renovate Bot <[email protected]>
zmwangx
added a commit
to zmwangx/bubbles
that referenced
this pull request
Mar 6, 2026
Table now requires an explicit width or the table body is rendered as blank. This is fixed in the official example in charmbracelet/bubbletea#1598, but it was not at all obvious from reading the upgrade guide, making for a confusing upgrade experience.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add missing
table.WithWidth(42)to the table example.Root cause
Without an explicit width set, the table has no bounds to render rows within,
resulting in a blank table body.
The width is derived from the sum of all column widths:
Rank(4) + City(10) + Country(10) + Population(10) = 34
+ 8 for borders = 42
Before
Table renders with no rows visible.
After
Table renders correctly with all rows and scroll behavior working.
Fixes #1597
CONTRIBUTING.md.