fix(deps): update module github.com/charmbracelet/bubbles to v0.20.0
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| github.com/charmbracelet/bubbles | v0.16.1 -> v0.20.0 |
Release Notes
charmbracelet/bubbles (github.com/charmbracelet/bubbles)
v0.20.0
Focus. Breathe.
This features support for Bubble Tea's new focus-blur feature as well as a quality-of-life update to paginator. Enjoy!
Focus
You heard that right. Focus-blur window events are now enabled for textinput and textarea which were recently added to Bubble Tea v1.1.0. As long as WithReportFocus is enabled in your Program you'll automatically get nicer inputs.
To enable focus reporting:
p := tea.NewProgram(model{}, tea.WithReportFocus())
Remember to stay focused and hydrated!
Paginator opts
Speaking of functional arguments, paginator also received some some new quality-of-life startup options, courtesy @nervo.
p := paginator.New(
paginator.WithPerPage(42),
paginator.WithTotalPages(42),
)
Of course, you can still set the values on the model directly too:
p := paginator.New()
p.PerPage = 42
p.TotalPages = 24
Happy paging!
Changelog
New!
d3bd075: feat(cursor): focus/blur support (#581) (@caarlos0)5110925: feat: Introduce paginator options (@nervo)
Deps
3eaf8da: feat(deps): bump github.com/charmbracelet/bubbletea from 0.27.0 to 1.0.0 (#604) (@dependabot[bot])6fc27e9: feat(deps): bump github.com/charmbracelet/bubbletea from 1.0.0 to 1.1.0 (#607) (@dependabot[bot])
Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.
v0.19.0
Bugs? Squashed (along with a few nice lil’ features).
Community-Driven Development?! Yep, the majority of the changes in this release were done by the community. Thank you all for your contributions that made this release possible.
Progress: custom chars
You can now customize the filled and empty characters of the progress bar.
p := progress.New(progress.WithFillCharacters('>', '.'))
Table improvements
Help is on the way
Table now includes a short and full help view so it's easier than ever to tell your users how to interact with the table.
// Render a table with its help.
t := table.New()
view := t.View() + "\n" + t.HelpView()
Accessing columns
You can also now get the table's columns (this already existed for rows).
package table
// Columns returns the current columns.
func (m Model) Columns() []Column
List: page navigation is fixed!
Previously, list.NextPage() and list.PrevPage() didn't work because the methods did not have pointer receivers. We've fixed this…by making them pointer receivers!
⚠️ Note that this is a minor API change and you might need to update your app to pass a pointer receiver to your model rather than a copy. Details in #458.
package progress
// NextPage moves to the next page, if available.
func (m *Model) NextPage()
// PrevPage moves to the previous page, if available.
func (m *Model) PrevPage()
What’s Changed
Changed
- Textarea: Improve setting width by @mikelorant in https://github.com/charmbracelet/bubbles/pull/496
- Textinput: fix out of range panic if no matched suggestions by @rdnt in https://github.com/charmbracelet/bubbles/pull/473
- List: Fix no-op list pagination functions by @nekopy in https://github.com/charmbracelet/bubbles/pull/458
- Table: Clarify position constant in JoinHorizontal by @aditipatelpro in https://github.com/charmbracelet/bubbles/pull/577
- Progress: make full/empty fill characters configurable by @rwinkhart in https://github.com/charmbracelet/bubbles/pull/409
- Dependencies: switch to x/ansi for text manipulation by @aymanbagabas in https://github.com/charmbracelet/bubbles/pull/505
Added
- Textarea: add help to textarea key bindings by @TravisYeah in https://github.com/charmbracelet/bubbles/pull/418
- Textarea: Add multiline placeholder by @mikelorant in https://github.com/charmbracelet/bubbles/pull/302
- Table: Add column return function by @abeleinin in https://github.com/charmbracelet/bubbles/pull/369
- Table: Implement help.Keymap interface and add quit mapping by @prgres in https://github.com/charmbracelet/bubbles/pull/440
- Ctrl+Left/Right for WordForward/Backward by @maaslalani in https://github.com/charmbracelet/bubbles/pull/387
- Use goreleaser for releases by @aymanbagabas in https://github.com/charmbracelet/bubbles/pull/526
Fixed
- Table: Render Row Tests by @maaslalani in https://github.com/charmbracelet/bubbles/pull/487
- Table: Only render columns with a positive width by @fabio42 in https://github.com/charmbracelet/bubbles/pull/465
- Table: Fix inheritence of SelectedStyle in StyleFunc by @gabrielfu in https://github.com/charmbracelet/bubbles/pull/539
- Table: Don't include header height in the total table size by @prgres in https://github.com/charmbracelet/bubbles/pull/434
- Table: Fix premature viewport scroll by @dzeleniak in https://github.com/charmbracelet/bubbles/pull/429
- Textarea: Fix end of buffer character by @mikelorant in https://github.com/charmbracelet/bubbles/pull/491
- Textarea: Set textarea default EndOfBufferCharacter to ' ' by @blvrd in https://github.com/charmbracelet/bubbles/pull/510
- Textarea: End of Buffer alignment by @maaslalani in https://github.com/charmbracelet/bubbles/pull/486
- Textinput: don't block input on validation by @GabrielNagy in https://github.com/charmbracelet/bubbles/pull/185
- Viewport: Fix division by zero in scrollpercentage by @zMoooooritz in https://github.com/charmbracelet/bubbles/pull/494
- Help: Fix centering by @gabe565 in https://github.com/charmbracelet/bubbles/pull/516
- Progress: Stop spring defaults from overriding WithStringOptions by @nervo in https://github.com/charmbracelet/bubbles/pull/540
- Cursor: Make SetMode method in cursor library handle invalid mode values correctly by @anirudhaCodes in https://github.com/charmbracelet/bubbles/pull/477
Test coverage :white_check_mark:
- Add tests for textarea view by @mikelorant in https://github.com/charmbracelet/bubbles/pull/485
- Add tests for paginator by @anirudhaCodes in https://github.com/charmbracelet/bubbles/pull/480
- Add tests for textInput Tests by @KevM in https://github.com/charmbracelet/bubbles/pull/500
- Improve textarea tests by @mikelorant in https://github.com/charmbracelet/bubbles/pull/490
New Contributors
- @rdnt made their first contribution in https://github.com/charmbracelet/bubbles/pull/473
- @rwinkhart made their first contribution in https://github.com/charmbracelet/bubbles/pull/409
- @mikelorant made their first contribution in https://github.com/charmbracelet/bubbles/pull/485
- @anirudhaCodes made their first contribution in https://github.com/charmbracelet/bubbles/pull/480
- @nekopy made their first contribution in https://github.com/charmbracelet/bubbles/pull/458
- @TravisYeah made their first contribution in https://github.com/charmbracelet/bubbles/pull/418
- @abeleinin made their first contribution in https://github.com/charmbracelet/bubbles/pull/369
- @fabio42 made their first contribution in https://github.com/charmbracelet/bubbles/pull/465
- @prgres made their first contribution in https://github.com/charmbracelet/bubbles/pull/440
- @zMoooooritz made their first contribution in https://github.com/charmbracelet/bubbles/pull/494
- @dzeleniak made their first contribution in https://github.com/charmbracelet/bubbles/pull/429
- @KevM made their first contribution in https://github.com/charmbracelet/bubbles/pull/500
- @gabe565 made their first contribution in https://github.com/charmbracelet/bubbles/pull/516
- @blvrd made their first contribution in https://github.com/charmbracelet/bubbles/pull/510
- @nervo made their first contribution in https://github.com/charmbracelet/bubbles/pull/540
- @gabrielfu made their first contribution in https://github.com/charmbracelet/bubbles/pull/539
- @aditipatelpro made their first contribution in https://github.com/charmbracelet/bubbles/pull/577
Full Changelog: https://github.com/charmbracelet/bubbles/compare/v0.18.0...v0.19.0
Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.
v0.18.0
Textarea, but faster
This release features several fixes and big performance improvements for the textarea bubble.
What's Changed
New
- Optional File Permissions and File Size by @maaslalani in https://github.com/charmbracelet/bubbles/pull/471
- Add Paginator OnFirstPage method by @maaslalani in https://github.com/charmbracelet/bubbles/pull/463
Improved
- Implement Memoization to Speed Up Textarea Rendering by @wesen in https://github.com/charmbracelet/bubbles/pull/427
- refactor(textinput): reduce allocations by @naglis in https://github.com/charmbracelet/bubbles/pull/413
- Use
uniseg.StringWidthby @maaslalani in https://github.com/charmbracelet/bubbles/pull/462
Fixed
- fix(textarea): correctly trim incoming paste by @muesli in https://github.com/charmbracelet/bubbles/pull/469
- fix(textinput): Placeholder No Longer Changes Width + Paste Calculation by @hopefulTex in https://github.com/charmbracelet/bubbles/pull/451
- fix(viewport): pad width to contentWidth by @ivanvc in https://github.com/charmbracelet/bubbles/pull/388
New Contributors
- @seanbanko made their first contribution in https://github.com/charmbracelet/bubbles/pull/442
- @hopefulTex made their first contribution in https://github.com/charmbracelet/bubbles/pull/451
- @ivanvc made their first contribution in https://github.com/charmbracelet/bubbles/pull/388
- @wesen made their first contribution in https://github.com/charmbracelet/bubbles/pull/427
Full Changelog: https://github.com/charmbracelet/bubbles/compare/v0.17.1...v0.18.0
Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.
v0.17.1
What's Changed
- feat: upgrade bubbletea and remove deprecated code by @aymanbagabas in https://github.com/charmbracelet/bubbles/pull/448
Full Changelog: https://github.com/charmbracelet/bubbles/compare/v0.17.0...v0.17.1
Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.
v0.17.0
Text input autocompletions and various improvements
Autocompletion in Text Input
So @toadle wanted textinputs to support autocompletion in a ghost-text kind of a way. Rather than wait for us to do it he did what any dedicated open source developer would: he sent a PR! And now we can all benefit from his hard work.
Autocompletion is super easy to use:
ti := textinput.New()
ti.SetSuggestions([]string{"meow", "purr"})
By default you can press ctrl+n and ctrl+p to cycle through suggestions, but those keybindings can be changed as you, the application developer, see fit. For details check out textinput.SetSuggestions and the corresponding KeyMap in the docs.
Is the progress bar done yet?
@yrashk acutely noticed that to nicely transition from one state to another after an animated progress bar fills up it's helpful to know when the animated has finished animating before transitioning. To solve for this he added an IsAnimating method to the progress model. Thanks, @yrashk!
Changelog
New!
- Support suggestions and autocompletion in textinput by @toadle in https://github.com/charmbracelet/bubbles/pull/407
- Add method for determining if progress bar is animating by @yrashk in https://github.com/charmbracelet/bubbles/pull/386
Improved
- Update fuzzy library by @caarlos0 in https://github.com/charmbracelet/bubbles/pull/379
- Reduce allocations in
filterItemsby @naglis in https://github.com/charmbracelet/bubbles/pull/396 - Improve message when list is empty by @maaslalani in https://github.com/charmbracelet/bubbles/pull/393
Fixed
- Fix unicode character encoding error by @lc-1010 in https://github.com/charmbracelet/bubbles/pull/421
Full Changelog: https://github.com/charmbracelet/bubbles/compare/v0.16.1...v0.17.0
New Contributors
- @yrashk made their first contribution in https://github.com/charmbracelet/bubbles/pull/386
- @naglis made their first contribution in https://github.com/charmbracelet/bubbles/pull/391
- @lc-1010 made their first contribution in https://github.com/charmbracelet/bubbles/pull/421
Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), 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.
- [ ] If you want to rebase/retry this PR, check this box
This PR was generated by Mend Renovate. View the repository job log.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
ecc7efe) 75.89% compared to head (844ca6c) 75.89%.
Additional details and impacted files
@@ Coverage Diff @@
## main #115 +/- ##
=======================================
Coverage 75.89% 75.89%
=======================================
Files 12 12
Lines 307 307
=======================================
Hits 233 233
Misses 65 65
Partials 9 9
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
ℹ Artifact update notice
File name: go.mod
In order to perform the update(s) described in the table above, Renovate ran the go get command, which resulted in the following additional change(s):
- 8 additional dependencies were updated
Details:
| Package | Change |
|---|---|
github.com/charmbracelet/bubbletea |
v0.24.2 -> v1.1.0 |
github.com/charmbracelet/lipgloss |
v0.8.0 -> v0.13.0 |
github.com/mattn/go-isatty |
v0.0.18 -> v0.0.20 |
github.com/mattn/go-runewidth |
v0.0.14 -> v0.0.16 |
github.com/muesli/ansi |
v0.0.0-20211018074035-2e021307bc4b -> v0.0.0-20230316100256-276c6243b2f6 |
github.com/rivo/uniseg |
v0.2.0 -> v0.4.7 |
golang.org/x/sync |
v0.1.0 -> v0.8.0 |
golang.org/x/sys |
v0.11.0 -> v0.24.0 |

