Update module github.com/charmbracelet/bubbles to v0.20.0 #51

Open
abs3nt wants to merge 1 commits from renovate/github.com-charmbracelet-bubbles-0.x into main
Owner

This PR contains the following updates:

Package Type Update Change
github.com/charmbracelet/bubbles require minor v0.18.0 -> v0.20.0

Release Notes

charmbracelet/bubbles (github.com/charmbracelet/bubbles)

v0.20.0

Compare Source

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!
Deps

The Charm logo

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or on Discord.

v0.19.0

Compare Source

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('>', '.'))

progress bar example

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
Added
Fixed
Test coverage

New Contributors

Full Changelog: https://github.com/charmbracelet/bubbles/compare/v0.18.0...v0.19.0


The Charm logo

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 has been generated by Renovate Bot.

This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [github.com/charmbracelet/bubbles](https://github.com/charmbracelet/bubbles) | require | minor | `v0.18.0` -> `v0.20.0` | --- ### Release Notes <details> <summary>charmbracelet/bubbles (github.com/charmbracelet/bubbles)</summary> ### [`v0.20.0`](https://github.com/charmbracelet/bubbles/releases/tag/v0.20.0) [Compare Source](https://github.com/charmbracelet/bubbles/compare/v0.19.0...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](https://github.com/charmbracelet/bubbletea/releases/tag/v1.1.0). As long as [`WithReportFocus`](https://pkg.go.dev/github.com/charmbracelet/bubbletea#WithReportFocus) is enabled in your Program you'll automatically get nicer inputs. To enable focus reporting: ```go 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 [@&#8203;nervo](https://github.com/nervo). ```go p := paginator.New( paginator.WithPerPage(42), paginator.WithTotalPages(42), ) ``` Of course, you can still set the values on the model directly too: ```go p := paginator.New() p.PerPage = 42 p.TotalPages = 24 ``` Happy paging! #### Changelog ##### New! - [`d3bd075`](https://github.com/charmbracelet/bubbles/commit/d3bd075ed2b27a3b5d76bb79b5d1c928dcd780d0): feat(cursor): focus/blur support ([#&#8203;581](https://github.com/charmbracelet/bubbles/issues/581)) ([@&#8203;caarlos0](https://github.com/caarlos0)) - [`5110925`](https://github.com/charmbracelet/bubbles/commit/5110925e8788a8ecfd206df0da8dbeed36cde0f0): feat: Introduce paginator options ([@&#8203;nervo](https://github.com/nervo)) ##### Deps - [`3eaf8da`](https://github.com/charmbracelet/bubbles/commit/3eaf8da348203f12a72ce4f994334dc4cd8d91ba): feat(deps): bump github.com/charmbracelet/bubbletea from 0.27.0 to 1.0.0 ([#&#8203;604](https://github.com/charmbracelet/bubbles/issues/604)) ([@&#8203;dependabot](https://github.com/dependabot)\[bot]) - [`6fc27e9`](https://github.com/charmbracelet/bubbles/commit/6fc27e99d3b0e0cf5db13111e518b47435c42f5a): feat(deps): bump github.com/charmbracelet/bubbletea from 1.0.0 to 1.1.0 ([#&#8203;607](https://github.com/charmbracelet/bubbles/issues/607)) ([@&#8203;dependabot](https://github.com/dependabot)\[bot]) *** <a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.technology/@&#8203;charm), or on [Discord](https://charm.sh/chat). ### [`v0.19.0`](https://github.com/charmbracelet/bubbles/releases/tag/v0.19.0) [Compare Source](https://github.com/charmbracelet/bubbles/compare/v0.18.0...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. ```go p := progress.New(progress.WithFillCharacters('>', '.')) ``` ![progress bar example](https://github.com/user-attachments/assets/ee1a1351-ebee-4f39-8543-af464e60b099) #### 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. ```go // Render a table with its help. t := table.New() view := t.View() + "\n" + t.HelpView() ``` <img src="https://github.com/user-attachments/assets/22195043-5578-4201-982d-a8f9b7eefc5f" width="600"> ##### Accessing columns You can also now get the table's columns (this already existed for rows). ```go 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 [#&#8203;458](https://github.com/charmbracelet/bubbles/issues/458). ```go 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 [@&#8203;mikelorant](https://github.com/mikelorant) in https://github.com/charmbracelet/bubbles/pull/496 - Textinput: fix out of range panic if no matched suggestions by [@&#8203;rdnt](https://github.com/rdnt) in https://github.com/charmbracelet/bubbles/pull/473 - List: Fix no-op list pagination functions by [@&#8203;nekopy](https://github.com/nekopy) in https://github.com/charmbracelet/bubbles/pull/458 - Table: Clarify position constant in JoinHorizontal by [@&#8203;aditipatelpro](https://github.com/aditipatelpro) in https://github.com/charmbracelet/bubbles/pull/577 - Progress: make full/empty fill characters configurable by [@&#8203;rwinkhart](https://github.com/rwinkhart) in https://github.com/charmbracelet/bubbles/pull/409 - Dependencies: switch to x/ansi for text manipulation by [@&#8203;aymanbagabas](https://github.com/aymanbagabas) in https://github.com/charmbracelet/bubbles/pull/505 ##### Added - Textarea: add help to textarea key bindings by [@&#8203;TravisYeah](https://github.com/TravisYeah) in https://github.com/charmbracelet/bubbles/pull/418 - Textarea: Add multiline placeholder by [@&#8203;mikelorant](https://github.com/mikelorant) in https://github.com/charmbracelet/bubbles/pull/302 - Table: Add column return function by [@&#8203;abeleinin](https://github.com/abeleinin) in https://github.com/charmbracelet/bubbles/pull/369 - Table: Implement help.Keymap interface and add quit mapping by [@&#8203;prgres](https://github.com/prgres) in https://github.com/charmbracelet/bubbles/pull/440 - Ctrl+Left/Right for WordForward/Backward by [@&#8203;maaslalani](https://github.com/maaslalani) in https://github.com/charmbracelet/bubbles/pull/387 - Use goreleaser for releases by [@&#8203;aymanbagabas](https://github.com/aymanbagabas) in https://github.com/charmbracelet/bubbles/pull/526 ##### Fixed - Table: Render Row Tests by [@&#8203;maaslalani](https://github.com/maaslalani) in https://github.com/charmbracelet/bubbles/pull/487 - Table: Only render columns with a positive width by [@&#8203;fabio42](https://github.com/fabio42) in https://github.com/charmbracelet/bubbles/pull/465 - Table: Fix inheritence of SelectedStyle in StyleFunc by [@&#8203;gabrielfu](https://github.com/gabrielfu) in https://github.com/charmbracelet/bubbles/pull/539 - Table: Don't include header height in the total table size by [@&#8203;prgres](https://github.com/prgres) in https://github.com/charmbracelet/bubbles/pull/434 - Table: Fix premature viewport scroll by [@&#8203;dzeleniak](https://github.com/dzeleniak) in https://github.com/charmbracelet/bubbles/pull/429 - Textarea: Fix end of buffer character by [@&#8203;mikelorant](https://github.com/mikelorant) in https://github.com/charmbracelet/bubbles/pull/491 - Textarea: Set textarea default EndOfBufferCharacter to ' ' by [@&#8203;blvrd](https://github.com/blvrd) in https://github.com/charmbracelet/bubbles/pull/510 - Textarea: End of Buffer alignment by [@&#8203;maaslalani](https://github.com/maaslalani) in https://github.com/charmbracelet/bubbles/pull/486 - Textinput: don't block input on validation by [@&#8203;GabrielNagy](https://github.com/GabrielNagy) in https://github.com/charmbracelet/bubbles/pull/185 - Viewport: Fix division by zero in scrollpercentage by [@&#8203;zMoooooritz](https://github.com/zMoooooritz) in https://github.com/charmbracelet/bubbles/pull/494 - Help: Fix centering by [@&#8203;gabe565](https://github.com/gabe565) in https://github.com/charmbracelet/bubbles/pull/516 - Progress: Stop spring defaults from overriding WithStringOptions by [@&#8203;nervo](https://github.com/nervo) in https://github.com/charmbracelet/bubbles/pull/540 - Cursor: Make SetMode method in cursor library handle invalid mode values correctly by [@&#8203;anirudhaCodes](https://github.com/anirudhaCodes) in https://github.com/charmbracelet/bubbles/pull/477 ##### Test coverage :white_check_mark: - Add tests for textarea view by [@&#8203;mikelorant](https://github.com/mikelorant) in https://github.com/charmbracelet/bubbles/pull/485 - Add tests for paginator by [@&#8203;anirudhaCodes](https://github.com/anirudhaCodes) in https://github.com/charmbracelet/bubbles/pull/480 - Add tests for textInput Tests by [@&#8203;KevM](https://github.com/KevM) in https://github.com/charmbracelet/bubbles/pull/500 - Improve textarea tests by [@&#8203;mikelorant](https://github.com/mikelorant) in https://github.com/charmbracelet/bubbles/pull/490 #### New Contributors - [@&#8203;rdnt](https://github.com/rdnt) made their first contribution in https://github.com/charmbracelet/bubbles/pull/473 - [@&#8203;rwinkhart](https://github.com/rwinkhart) made their first contribution in https://github.com/charmbracelet/bubbles/pull/409 - [@&#8203;mikelorant](https://github.com/mikelorant) made their first contribution in https://github.com/charmbracelet/bubbles/pull/485 - [@&#8203;anirudhaCodes](https://github.com/anirudhaCodes) made their first contribution in https://github.com/charmbracelet/bubbles/pull/480 - [@&#8203;nekopy](https://github.com/nekopy) made their first contribution in https://github.com/charmbracelet/bubbles/pull/458 - [@&#8203;TravisYeah](https://github.com/TravisYeah) made their first contribution in https://github.com/charmbracelet/bubbles/pull/418 - [@&#8203;abeleinin](https://github.com/abeleinin) made their first contribution in https://github.com/charmbracelet/bubbles/pull/369 - [@&#8203;fabio42](https://github.com/fabio42) made their first contribution in https://github.com/charmbracelet/bubbles/pull/465 - [@&#8203;prgres](https://github.com/prgres) made their first contribution in https://github.com/charmbracelet/bubbles/pull/440 - [@&#8203;zMoooooritz](https://github.com/zMoooooritz) made their first contribution in https://github.com/charmbracelet/bubbles/pull/494 - [@&#8203;dzeleniak](https://github.com/dzeleniak) made their first contribution in https://github.com/charmbracelet/bubbles/pull/429 - [@&#8203;KevM](https://github.com/KevM) made their first contribution in https://github.com/charmbracelet/bubbles/pull/500 - [@&#8203;gabe565](https://github.com/gabe565) made their first contribution in https://github.com/charmbracelet/bubbles/pull/516 - [@&#8203;blvrd](https://github.com/blvrd) made their first contribution in https://github.com/charmbracelet/bubbles/pull/510 - [@&#8203;nervo](https://github.com/nervo) made their first contribution in https://github.com/charmbracelet/bubbles/pull/540 - [@&#8203;gabrielfu](https://github.com/gabrielfu) made their first contribution in https://github.com/charmbracelet/bubbles/pull/539 - [@&#8203;aditipatelpro](https://github.com/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 *** <a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg?1" width="400"></a> Thoughts? Questions? We love hearing from you. Feel free to reach out on [Twitter](https://twitter.com/charmcli), [The Fediverse](https://mastodon.social/@&#8203;charm), or on [Discord](https://charm.sh/chat). </details> --- ### 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. --- - [ ] <!-- 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:eyJjcmVhdGVkSW5WZXIiOiIzOS40OS4wIiwidXBkYXRlZEluVmVyIjoiMzkuNDkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
abs3nt added 1 commit 2024-12-05 11:48:17 +00:00
Author
Owner

ℹ 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.26.6 -> v1.1.0
github.com/charmbracelet/lipgloss v0.12.1 -> v0.13.0
golang.org/x/sync v0.7.0 -> v0.8.0
github.com/charmbracelet/x/ansi v0.1.4 -> v0.2.3
github.com/charmbracelet/x/term v0.1.1 -> v0.2.0
github.com/mattn/go-runewidth v0.0.15 -> v0.0.16
github.com/sahilm/fuzzy v0.1.1-0.20230530133925-c48e322e2a8f -> v0.1.1
golang.org/x/sys v0.22.0 -> v0.24.0
### ℹ 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.26.6` -> `v1.1.0` | | `github.com/charmbracelet/lipgloss` | `v0.12.1` -> `v0.13.0` | | `golang.org/x/sync` | `v0.7.0` -> `v0.8.0` | | `github.com/charmbracelet/x/ansi` | `v0.1.4` -> `v0.2.3` | | `github.com/charmbracelet/x/term` | `v0.1.1` -> `v0.2.0` | | `github.com/mattn/go-runewidth` | `v0.0.15` -> `v0.0.16` | | `github.com/sahilm/fuzzy` | `v0.1.1-0.20230530133925-c48e322e2a8f` -> `v0.1.1` | | `golang.org/x/sys` | `v0.22.0` -> `v0.24.0` |
This pull request can be merged automatically.
You are not authorized to merge this pull request.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin renovate/github.com-charmbracelet-bubbles-0.x:renovate/github.com-charmbracelet-bubbles-0.x
git checkout renovate/github.com-charmbracelet-bubbles-0.x
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: abs3nt/gospt#51
No description provided.