Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(textarea) Add multiline placeholder #302

Conversation

mikelorant
Copy link
Contributor

Add the capability to show a multiline placeholder. Some refactoring was required to improve readability and improve logic.

End of line buffer character was only shown when line numbers were displayed which requires some verification whether this is the intended outcome. This change resolves this issue.

textarea/textarea_test.go Outdated Show resolved Hide resolved
@mikelorant mikelorant force-pushed the feat/text-area-multiline-placeholder branch from 805ce3b to c5687de Compare December 6, 2022 23:01
@mikelorant mikelorant force-pushed the feat/text-area-multiline-placeholder branch 3 times, most recently from 3cff057 to 5585074 Compare January 28, 2024 09:12
@mikelorant
Copy link
Contributor Author

@meowgorithm @maaslalani Can I get approval to run the workflow? Thanks.

@mikelorant
Copy link
Contributor Author

Can I get someone from @charmbracelet to review this. Thanks.

@maaslalani
Copy link
Contributor

Hey @mikelorant. Thank you so much for this PR.

I'm seeing a bug with how this PR is handling line numbers:

This is what the textarea should look like:
image

Here is what it looks like using this PR (rebased on main):

image

@maaslalani
Copy link
Contributor

The testing code I'm using can be found here: https://github.com/charmbracelet/bubbletea/tree/master/examples/textarea

@mikelorant
Copy link
Contributor Author

Just to clarify, line numbers only display if there is user input (or cursor) on that line?

@mikelorant
Copy link
Contributor Author

Just did some basic investigation and it seems the aim is that it should look like Vim with line numbers enabled. Which means only lines with content get a number.

@maaslalani
Copy link
Contributor

Just did some basic investigation and it seems the aim is that it should look like Vim with line numbers enabled. Which means only lines with content get a number.

Yep, that's correct! Similar to vim!

@mikelorant mikelorant force-pushed the feat/text-area-multiline-placeholder branch from 5585074 to 97e8494 Compare January 31, 2024 07:26
@mikelorant
Copy link
Contributor Author

Have fixed the issue you have reported and here is the result using the code you linked:

CleanShot 2024-01-31 at 18 39 20

Using a multiline placeholder shows like this:

CleanShot 2024-01-31 at 18 40 17

I wish to make it clear that line numbers are only for lines that have a cursor or entered text. This is placeholder text, so only the first line will ever have a line number in this case. As soon as you start typing and adding new lines, none of this code is used.

I've had to extensively increase the unit tests because it was far too complex checking all the variations. As part of this process I needed a small helper function to strip ANSI and trailing white spaces to make comparison easier. I would have preferred to use golden files however I think this is a reasonable compromise. Unfortunately no other tests in textarea use testing tables so that will stand out as being different but as you can tell a requirement.

@mikelorant
Copy link
Contributor Author

One more reference image with the cursor visible.

CleanShot 2024-01-31 at 18 51 23

Check the test tables and let me know if that is the output you'd expect. I had to make some executive decisions and tried to base everything I could on how it was displayed in Vim.

@mikelorant
Copy link
Contributor Author

@maaslalani Any chance you could do a review, if this is working correctly I'd like to get it merged otherwise if there are problems, lets me get started on fixing them.

@maaslalani
Copy link
Contributor

maaslalani commented Feb 2, 2024

Hey @mikelorant, thanks again for your work on this one!

One issue I'm seeing is the CursorLine (if it has a background color, bleeds over to the line number column)

image

Here's what it should look like:

image

@mikelorant
Copy link
Contributor Author

mikelorant commented Feb 2, 2024

The default prompt which is being used here is defined at:
https://github.com/charmbracelet/bubbles/blob/master/textarea/textarea.go#L258C3-L258C59

Code as follows:

Prompt:               lipgloss.ThickBorder().Left + " ",

This has me thinking that both versions are wrong. The background colour should start at position 3 for each line.

|X123 Once upon a time...
|X    ~
|X    ~

The X space is part of that prompt and whatever styling that is applied to it is independent of everything else.

Thoughts?

Additional notes:

Consider the following change:

Prompt:               lipgloss.ThickBorder().Right + " ",

This would put the changed background colour outside the left border which would be very wrong.

@mikelorant
Copy link
Contributor Author

mikelorant commented Feb 2, 2024

@maaslalani I'll quickly do the update to this pull request providing the original functionality, but I still believe both implementations have it wrong.

Using Vim as the reference, highlighted cursor line goes as far as the beginning of the line number or end of buffer character. It is hard to know what we should do if we put a border around it since we cant do that in Vim.

@mikelorant
Copy link
Contributor Author

mikelorant commented Feb 2, 2024

Here are the two possibilities in one image:

CleanShot 2024-02-02 at 17 56 33

The top version is how it is currently implemented and the bottom version is how I think it should be. However as a lowly minion here to serve the wonderful Charm team 😄 I have pushed up the version that conforms with how it is also displayed when text is entered.

Thanks for helping make sure we catch all the little subtle things, very much appreciated @maaslalani.

@mikelorant mikelorant force-pushed the feat/text-area-multiline-placeholder branch from 97e8494 to 5f819d1 Compare February 2, 2024 07:02
@mikelorant
Copy link
Contributor Author

mikelorant commented Feb 2, 2024

Heres the example showing the line style for the cursor line leaking out of the prompt "border".
CleanShot 2024-02-02 at 18 06 47

Prompt to use to see this case:

ti.Prompt = lipgloss.ThickBorder().Right + " "

@mikelorant mikelorant force-pushed the feat/text-area-multiline-placeholder branch 2 times, most recently from fc81153 to a2668fb Compare February 2, 2024 07:37
@maaslalani
Copy link
Contributor

@mikelorant Thanks for the care you're putting into this PR! Yes, I see what you mean by the border. However, when the cursor line is defined with a background color I think it looks more correct (but maybe we will change this later since you are actually right about the correctness technically)

Also when a text area has a multiline placeholder I believe the cursor line background should be applied to the entire placeholder. In your screenshots it only applies to the first line.

@mikelorant
Copy link
Contributor Author

Here is a comparison of the two:

CleanShot 2024-02-03 at 08 58 06

I think it is very confusing to highlight more than the cursor line where there is a multiline placeholder. However, on the flip side it may help indicate that any typing will clear all that text away by keeping it "grouped".

How should I proceed?

@maaslalani
Copy link
Contributor

In my opinion the second option is correct here as the entire line is highlighted with the cursor line and if the user types that exact placeholder then the same highlighting will occur.

@mikelorant mikelorant force-pushed the feat/text-area-multiline-placeholder branch from a2668fb to bf2cc79 Compare February 2, 2024 22:17
@mikelorant
Copy link
Contributor Author

@maaslalani Commit updated to highlight all lines of the placeholder.

@mikelorant mikelorant force-pushed the feat/text-area-multiline-placeholder branch from bf2cc79 to 699fb3e Compare February 3, 2024 00:42
@mikelorant
Copy link
Contributor Author

@meowgorithm Not at all. This one is ready to go.

This has nothing to do with emojis or grapheme clusters.

@mikelorant mikelorant force-pushed the feat/text-area-multiline-placeholder branch from 1e8da29 to 54bf36a Compare March 9, 2024 00:37
@mikelorant
Copy link
Contributor Author

@maaslalani Rebase completed and all unit tests are passing.

🤞 that there are no more issues.

@mikelorant
Copy link
Contributor Author

@meowgorithm @maaslalani Can we please get this reviewed. Want to get this finalised so I can move off using my own fork.

@maaslalani
Copy link
Contributor

@mikelorant Will take a look today

@maaslalani
Copy link
Contributor

maaslalani commented Mar 13, 2024

@mikelorant I'm still seeing the bug of long placeholders, let me know if I'm doing something incorrectly.

But, if I set the placeholder to:

	ti.Placeholder = "Once upon a time in a land far far away..."

Then the text is broken.

image

However if I add a new line it works as expected:

	ti.Placeholder = "Once upon a time in a land far far\naway..."
image

I wouldn't mind truncating the placeholder like we currently do if the user has not explicitly opted into the newline, if that easier.

Comment on lines +843 to +1446
view: heredoc.Doc(`
> placeholder the first line that is
> longer than the max width
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to add a test where the CursorLine is styled like we see in the bubbletea example.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots more tests coming up.

@mikelorant
Copy link
Contributor Author

I wouldn't mind truncating the placeholder like we currently do if the user has not explicitly opted into the newline, if that easier.

No truncating, will work out what is going on.

Just need lots more tests to find all these weird edge cases that keep popping up. Not sure why this feature has been so difficult to implement 😢

Thanks for finding these problems.

@mikelorant
Copy link
Contributor Author

mikelorant commented Mar 13, 2024

Found the bug and unfortunately it seems like we may have 2 bugs 😢

Firstly, my bug is quite simple, I was using m.MaxWidth to determine the width instead of m.width. Easy fix.

However, this has uncovered something new with all the tests we have added.

Looking into the function SetWidth, there is a lot of work done to make sure the width removes the prompt and line numbers. However the last check causing an edge case.

if m.MaxWidth > 0 {
    m.width = clamp(inputWidth, minWidth, m.MaxWidth)
} else {
    m.width = max(inputWidth, minWidth)
}

If the MaxWidth is smaller than inputWidth we pick MaxWidth. Cool? Cool. However, we never subtracted the prompt and line numbers from this. We need to pick whether we use inputWidth, minWidth or m.MaxWidth first and then subtract the prompt and line numbers.

Hoping my logic here is correct, will keep hacking away and see where this leads.

@mikelorant
Copy link
Contributor Author

Going to add another problem, setting MaxWidth on the model does not call SetWidth() so updating of the model width is not being done.

I believe the order we need to follow is:

ta := textarea.New()
ta.MaxWidth = 25
ta.SetWidth(20)

This might be a case where MaxWidth should have been a function so it then it could call SetWidth() before it returns.

Definitely need some guidance on how this should work.

@mikelorant
Copy link
Contributor Author

Sorted out all the problems, however this is now dependent on #496.

@maaslalani
Copy link
Contributor

Thanks for debugging the SetWidth and improving it in #496, I can take a look at this one when it is ready to go!

@mikelorant mikelorant force-pushed the feat/text-area-multiline-placeholder branch from 54bf36a to ef0557f Compare April 6, 2024 05:51
@mikelorant
Copy link
Contributor Author

Have fixed the conflicts and unit tests now pass.

Will run some manual tests to see if we have all the issues finally resolved 😄

@mikelorant
Copy link
Contributor Author

@maaslalani Actually, everything looks OK from both unit tests and manual tests. Hopefully you see the same results.

@mikelorant
Copy link
Contributor Author

@maaslalani Can we get another review of this one, I am hoping this one passes now that we have the SetWidth method fixed.

@mikelorant mikelorant force-pushed the feat/text-area-multiline-placeholder branch from ef0557f to 8c0be42 Compare May 30, 2024 23:36
Add the capability to show a multiline placeholder. Some refactoring was
required to improve readability and improve logic.

End of line buffer character was only shown when line numbers were
displayed which requires some verification whether this is the intended
outcome. This change resolves this issue.
@mikelorant mikelorant force-pushed the feat/text-area-multiline-placeholder branch from 8c0be42 to 36483f4 Compare May 30, 2024 23:39
@mikelorant
Copy link
Contributor Author

@maaslalani Can you please take another look at this? I have rebased it from master and made the fixes required to resolve the conflicts.

@maaslalani
Copy link
Contributor

Thanks @mikelorant, I will take a look! Thanks for the reminder!

@maaslalani maaslalani merged commit 296fcf7 into charmbracelet:master May 31, 2024
9 checks passed
@maaslalani
Copy link
Contributor

Thanks @mikelorant, tested things out in the example and worked well. Thank you so much for the extensive test suite also, it really makes these PRs easier to merge.

Really appreciate the patience and great work ❤️

@mikelorant
Copy link
Contributor Author

Wahoo. Finally merged! Thank you so much for your efforts in making sure we keep the quality high.

@mikelorant mikelorant deleted the feat/text-area-multiline-placeholder branch May 31, 2024 00:41
mikelorant added a commit to mikelorant/committed that referenced this pull request Jun 1, 2024
Upgrade dependencies to latest releases. As part of this upgrade there
were two packages worth mentioning.

The `bubbles` package was previously using a modified fork that added
support for [textarea multiline placeholders][1]. This change has now
been merged upstream and there is no longer a need to rely on the
custom version.

The `coloredcobra` package which provides the colours for the CLI help
text was impacted by the upgrade of the `color` package. A [fix][2] has
been applied that currently only exists in a forked version. This is
necessary until the upstream merges the pull reques to fix this
problem.

[1]: charmbracelet/bubbles#302
[2]: ivanpirog/coloredcobra#5
ReallyLiri pushed a commit to ReallyLiri/bubbles that referenced this pull request Jun 13, 2024
Add the capability to show a multiline placeholder. Some refactoring was
required to improve readability and improve logic.

End of line buffer character was only shown when line numbers were
displayed which requires some verification whether this is the intended
outcome. This change resolves this issue.
andrewpollock referenced this pull request in google/osv-scanner Aug 23, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence | Type |
Update |
|---|---|---|---|---|---|---|---|
| [deps.dev/api/v3](https://togithub.com/google/deps.dev) |
`v3.0.0-20240730004939-e80e6658c33b` ->
`v3.0.0-20240807013505-16da96fe8b66` |
[![age](https://developer.mend.io/api/mc/badges/age/go/deps.dev%2fapi%2fv3/v3.0.0-20240807013505-16da96fe8b66?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/deps.dev%2fapi%2fv3/v3.0.0-20240807013505-16da96fe8b66?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/deps.dev%2fapi%2fv3/v3.0.0-20240730004939-e80e6658c33b/v3.0.0-20240807013505-16da96fe8b66?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/deps.dev%2fapi%2fv3/v3.0.0-20240730004939-e80e6658c33b/v3.0.0-20240807013505-16da96fe8b66?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| require | patch |
| [deps.dev/util/maven](https://togithub.com/google/deps.dev) |
`e80e665` -> `16da96f` |
[![age](https://developer.mend.io/api/mc/badges/age/go/deps.dev%2futil%2fmaven/v0.0.0-20240807013505-16da96fe8b66?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/deps.dev%2futil%2fmaven/v0.0.0-20240807013505-16da96fe8b66?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/deps.dev%2futil%2fmaven/v0.0.0-20240730004939-e80e6658c33b/v0.0.0-20240807013505-16da96fe8b66?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/deps.dev%2futil%2fmaven/v0.0.0-20240730004939-e80e6658c33b/v0.0.0-20240807013505-16da96fe8b66?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| require | digest |
| [deps.dev/util/resolve](https://togithub.com/google/deps.dev) |
`e80e665` -> `16da96f` |
[![age](https://developer.mend.io/api/mc/badges/age/go/deps.dev%2futil%2fresolve/v0.0.0-20240807013505-16da96fe8b66?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/deps.dev%2futil%2fresolve/v0.0.0-20240807013505-16da96fe8b66?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/deps.dev%2futil%2fresolve/v0.0.0-20240730004939-e80e6658c33b/v0.0.0-20240807013505-16da96fe8b66?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/deps.dev%2futil%2fresolve/v0.0.0-20240730004939-e80e6658c33b/v0.0.0-20240807013505-16da96fe8b66?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| require | digest |
| [deps.dev/util/semver](https://togithub.com/google/deps.dev) |
`e80e665` -> `16da96f` |
[![age](https://developer.mend.io/api/mc/badges/age/go/deps.dev%2futil%2fsemver/v0.0.0-20240807013505-16da96fe8b66?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/deps.dev%2futil%2fsemver/v0.0.0-20240807013505-16da96fe8b66?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/deps.dev%2futil%2fsemver/v0.0.0-20240730004939-e80e6658c33b/v0.0.0-20240807013505-16da96fe8b66?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/deps.dev%2futil%2fsemver/v0.0.0-20240730004939-e80e6658c33b/v0.0.0-20240807013505-16da96fe8b66?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| require | digest |
|
[github.com/charmbracelet/bubbles](https://togithub.com/charmbracelet/bubbles)
| `v0.18.0` -> `v0.19.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fcharmbracelet%2fbubbles/v0.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fcharmbracelet%2fbubbles/v0.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fcharmbracelet%2fbubbles/v0.18.0/v0.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fcharmbracelet%2fbubbles/v0.18.0/v0.19.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| require | minor |
|
[github.com/charmbracelet/bubbletea](https://togithub.com/charmbracelet/bubbletea)
| `v0.26.6` -> `v0.27.1` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fcharmbracelet%2fbubbletea/v0.27.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fcharmbracelet%2fbubbletea/v0.27.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fcharmbracelet%2fbubbletea/v0.26.6/v0.27.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fcharmbracelet%2fbubbletea/v0.26.6/v0.27.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| require | minor |
|
[github.com/charmbracelet/lipgloss](https://togithub.com/charmbracelet/lipgloss)
| `v0.12.1` -> `v0.13.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fcharmbracelet%2flipgloss/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fcharmbracelet%2flipgloss/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fcharmbracelet%2flipgloss/v0.12.1/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fcharmbracelet%2flipgloss/v0.12.1/v0.13.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| require | minor |
|
[github.com/google/go-containerregistry](https://togithub.com/google/go-containerregistry)
| `v0.20.1` -> `v0.20.2` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fgoogle%2fgo-containerregistry/v0.20.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fgoogle%2fgo-containerregistry/v0.20.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fgoogle%2fgo-containerregistry/v0.20.1/v0.20.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fgoogle%2fgo-containerregistry/v0.20.1/v0.20.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| require | patch |
|
[github.com/ianlancetaylor/demangle](https://togithub.com/ianlancetaylor/demangle)
| `bd984b5` -> `81f5be9` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2fianlancetaylor%2fdemangle/v0.0.0-20240805132620-81f5be970eca?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2fianlancetaylor%2fdemangle/v0.0.0-20240805132620-81f5be970eca?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2fianlancetaylor%2fdemangle/v0.0.0-20240312041847-bd984b5ce465/v0.0.0-20240805132620-81f5be970eca?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2fianlancetaylor%2fdemangle/v0.0.0-20240312041847-bd984b5ce465/v0.0.0-20240805132620-81f5be970eca?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| require | digest |
| [github.com/urfave/cli/v2](https://togithub.com/urfave/cli) |
`v2.27.3` -> `v2.27.4` |
[![age](https://developer.mend.io/api/mc/badges/age/go/github.com%2furfave%2fcli%2fv2/v2.27.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/github.com%2furfave%2fcli%2fv2/v2.27.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/github.com%2furfave%2fcli%2fv2/v2.27.3/v2.27.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/github.com%2furfave%2fcli%2fv2/v2.27.3/v2.27.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| require | patch |
| golang.org/x/exp | `8a7402a` -> `778ce7b` |
[![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fexp/v0.0.0-20240822175202-778ce7bba035?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fexp/v0.0.0-20240822175202-778ce7bba035?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fexp/v0.0.0-20240719175910-8a7402abbf56/v0.0.0-20240822175202-778ce7bba035?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fexp/v0.0.0-20240719175910-8a7402abbf56/v0.0.0-20240822175202-778ce7bba035?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| require | digest |
| golang.org/x/term | `v0.22.0` -> `v0.23.0` |
[![age](https://developer.mend.io/api/mc/badges/age/go/golang.org%2fx%2fterm/v0.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/golang.org%2fx%2fterm/v0.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/golang.org%2fx%2fterm/v0.22.0/v0.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/golang.org%2fx%2fterm/v0.22.0/v0.23.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| require | minor |

---

### Release Notes

<details>
<summary>charmbracelet/bubbles
(github.com/charmbracelet/bubbles)</summary>

###
[`v0.19.0`](https://togithub.com/charmbracelet/bubbles/releases/tag/v0.19.0)

[Compare
Source](https://togithub.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://togithub.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://togithub.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://togithub.com/mikelorant) in
[https://github.com/charmbracelet/bubbles/pull/496](https://togithub.com/charmbracelet/bubbles/pull/496)
- Textinput: fix out of range panic if no matched suggestions by
[@&#8203;rdnt](https://togithub.com/rdnt) in
[https://github.com/charmbracelet/bubbles/pull/473](https://togithub.com/charmbracelet/bubbles/pull/473)
- List: Fix no-op list pagination functions by
[@&#8203;nekopy](https://togithub.com/nekopy) in
[https://github.com/charmbracelet/bubbles/pull/458](https://togithub.com/charmbracelet/bubbles/pull/458)
- Table: Clarify position constant in JoinHorizontal by
[@&#8203;aditipatelpro](https://togithub.com/aditipatelpro) in
[https://github.com/charmbracelet/bubbles/pull/577](https://togithub.com/charmbracelet/bubbles/pull/577)
- Progress: make full/empty fill characters configurable by
[@&#8203;rwinkhart](https://togithub.com/rwinkhart) in
[https://github.com/charmbracelet/bubbles/pull/409](https://togithub.com/charmbracelet/bubbles/pull/409)
- Dependencies: switch to x/ansi for text manipulation by
[@&#8203;aymanbagabas](https://togithub.com/aymanbagabas) in
[https://github.com/charmbracelet/bubbles/pull/505](https://togithub.com/charmbracelet/bubbles/pull/505)

##### Added

- Textarea: add help to textarea key bindings by
[@&#8203;TravisYeah](https://togithub.com/TravisYeah) in
[https://github.com/charmbracelet/bubbles/pull/418](https://togithub.com/charmbracelet/bubbles/pull/418)
- Textarea: Add multiline placeholder by
[@&#8203;mikelorant](https://togithub.com/mikelorant) in
[https://github.com/charmbracelet/bubbles/pull/302](https://togithub.com/charmbracelet/bubbles/pull/302)
- Table: Add column return function by
[@&#8203;abeleinin](https://togithub.com/abeleinin) in
[https://github.com/charmbracelet/bubbles/pull/369](https://togithub.com/charmbracelet/bubbles/pull/369)
- Table: Implement help.Keymap interface and add quit mapping by
[@&#8203;prgres](https://togithub.com/prgres) in
[https://github.com/charmbracelet/bubbles/pull/440](https://togithub.com/charmbracelet/bubbles/pull/440)
- Ctrl+Left/Right for WordForward/Backward by
[@&#8203;maaslalani](https://togithub.com/maaslalani) in
[https://github.com/charmbracelet/bubbles/pull/387](https://togithub.com/charmbracelet/bubbles/pull/387)
- Use goreleaser for releases by
[@&#8203;aymanbagabas](https://togithub.com/aymanbagabas) in
[https://github.com/charmbracelet/bubbles/pull/526](https://togithub.com/charmbracelet/bubbles/pull/526)

##### Fixed

- Table: Render Row Tests by
[@&#8203;maaslalani](https://togithub.com/maaslalani) in
[https://github.com/charmbracelet/bubbles/pull/487](https://togithub.com/charmbracelet/bubbles/pull/487)
- Table: Only render columns with a positive width by
[@&#8203;fabio42](https://togithub.com/fabio42) in
[https://github.com/charmbracelet/bubbles/pull/465](https://togithub.com/charmbracelet/bubbles/pull/465)
- Table: Fix inheritence of SelectedStyle in StyleFunc by
[@&#8203;gabrielfu](https://togithub.com/gabrielfu) in
[https://github.com/charmbracelet/bubbles/pull/539](https://togithub.com/charmbracelet/bubbles/pull/539)
- Table: Don't include header height in the total table size by
[@&#8203;prgres](https://togithub.com/prgres) in
[https://github.com/charmbracelet/bubbles/pull/434](https://togithub.com/charmbracelet/bubbles/pull/434)
- Table: Fix premature viewport scroll by
[@&#8203;dzeleniak](https://togithub.com/dzeleniak) in
[https://github.com/charmbracelet/bubbles/pull/429](https://togithub.com/charmbracelet/bubbles/pull/429)
- Textarea: Fix end of buffer character by
[@&#8203;mikelorant](https://togithub.com/mikelorant) in
[https://github.com/charmbracelet/bubbles/pull/491](https://togithub.com/charmbracelet/bubbles/pull/491)
- Textarea: Set textarea default EndOfBufferCharacter to ' ' by
[@&#8203;blvrd](https://togithub.com/blvrd) in
[https://github.com/charmbracelet/bubbles/pull/510](https://togithub.com/charmbracelet/bubbles/pull/510)
- Textarea: End of Buffer alignment by
[@&#8203;maaslalani](https://togithub.com/maaslalani) in
[https://github.com/charmbracelet/bubbles/pull/486](https://togithub.com/charmbracelet/bubbles/pull/486)
- Textinput: don't block input on validation by
[@&#8203;GabrielNagy](https://togithub.com/GabrielNagy) in
[https://github.com/charmbracelet/bubbles/pull/185](https://togithub.com/charmbracelet/bubbles/pull/185)
- Viewport: Fix division by zero in scrollpercentage by
[@&#8203;zMoooooritz](https://togithub.com/zMoooooritz) in
[https://github.com/charmbracelet/bubbles/pull/494](https://togithub.com/charmbracelet/bubbles/pull/494)
- Help: Fix centering by [@&#8203;gabe565](https://togithub.com/gabe565)
in
[https://github.com/charmbracelet/bubbles/pull/516](https://togithub.com/charmbracelet/bubbles/pull/516)
- Progress: Stop spring defaults from overriding WithStringOptions by
[@&#8203;nervo](https://togithub.com/nervo) in
[https://github.com/charmbracelet/bubbles/pull/540](https://togithub.com/charmbracelet/bubbles/pull/540)
- Cursor: Make SetMode method in cursor library handle invalid mode
values correctly by
[@&#8203;anirudhaCodes](https://togithub.com/anirudhaCodes) in
[https://github.com/charmbracelet/bubbles/pull/477](https://togithub.com/charmbracelet/bubbles/pull/477)

##### Test coverage ✅

- Add tests for textarea view by
[@&#8203;mikelorant](https://togithub.com/mikelorant) in
[https://github.com/charmbracelet/bubbles/pull/485](https://togithub.com/charmbracelet/bubbles/pull/485)
- Add tests for paginator by
[@&#8203;anirudhaCodes](https://togithub.com/anirudhaCodes) in
[https://github.com/charmbracelet/bubbles/pull/480](https://togithub.com/charmbracelet/bubbles/pull/480)
- Add tests for textInput Tests by
[@&#8203;KevM](https://togithub.com/KevM) in
[https://github.com/charmbracelet/bubbles/pull/500](https://togithub.com/charmbracelet/bubbles/pull/500)
- Improve textarea tests by
[@&#8203;mikelorant](https://togithub.com/mikelorant) in
[https://github.com/charmbracelet/bubbles/pull/490](https://togithub.com/charmbracelet/bubbles/pull/490)

#### New Contributors

- [@&#8203;rdnt](https://togithub.com/rdnt) made their first
contribution in
[https://github.com/charmbracelet/bubbles/pull/473](https://togithub.com/charmbracelet/bubbles/pull/473)
- [@&#8203;rwinkhart](https://togithub.com/rwinkhart) made their first
contribution in
[https://github.com/charmbracelet/bubbles/pull/409](https://togithub.com/charmbracelet/bubbles/pull/409)
- [@&#8203;mikelorant](https://togithub.com/mikelorant) made their first
contribution in
[https://github.com/charmbracelet/bubbles/pull/485](https://togithub.com/charmbracelet/bubbles/pull/485)
- [@&#8203;anirudhaCodes](https://togithub.com/anirudhaCodes) made their
first contribution in
[https://github.com/charmbracelet/bubbles/pull/480](https://togithub.com/charmbracelet/bubbles/pull/480)
- [@&#8203;nekopy](https://togithub.com/nekopy) made their first
contribution in
[https://github.com/charmbracelet/bubbles/pull/458](https://togithub.com/charmbracelet/bubbles/pull/458)
- [@&#8203;TravisYeah](https://togithub.com/TravisYeah) made their first
contribution in
[https://github.com/charmbracelet/bubbles/pull/418](https://togithub.com/charmbracelet/bubbles/pull/418)
- [@&#8203;abeleinin](https://togithub.com/abeleinin) made their first
contribution in
[https://github.com/charmbracelet/bubbles/pull/369](https://togithub.com/charmbracelet/bubbles/pull/369)
- [@&#8203;fabio42](https://togithub.com/fabio42) made their first
contribution in
[https://github.com/charmbracelet/bubbles/pull/465](https://togithub.com/charmbracelet/bubbles/pull/465)
- [@&#8203;prgres](https://togithub.com/prgres) made their first
contribution in
[https://github.com/charmbracelet/bubbles/pull/440](https://togithub.com/charmbracelet/bubbles/pull/440)
- [@&#8203;zMoooooritz](https://togithub.com/zMoooooritz) made their
first contribution in
[https://github.com/charmbracelet/bubbles/pull/494](https://togithub.com/charmbracelet/bubbles/pull/494)
- [@&#8203;dzeleniak](https://togithub.com/dzeleniak) made their first
contribution in
[https://github.com/charmbracelet/bubbles/pull/429](https://togithub.com/charmbracelet/bubbles/pull/429)
- [@&#8203;KevM](https://togithub.com/KevM) made their first
contribution in
[https://github.com/charmbracelet/bubbles/pull/500](https://togithub.com/charmbracelet/bubbles/pull/500)
- [@&#8203;gabe565](https://togithub.com/gabe565) made their first
contribution in
[https://github.com/charmbracelet/bubbles/pull/516](https://togithub.com/charmbracelet/bubbles/pull/516)
- [@&#8203;blvrd](https://togithub.com/blvrd) made their first
contribution in
[https://github.com/charmbracelet/bubbles/pull/510](https://togithub.com/charmbracelet/bubbles/pull/510)
- [@&#8203;nervo](https://togithub.com/nervo) made their first
contribution in
[https://github.com/charmbracelet/bubbles/pull/540](https://togithub.com/charmbracelet/bubbles/pull/540)
- [@&#8203;gabrielfu](https://togithub.com/gabrielfu) made their first
contribution in
[https://github.com/charmbracelet/bubbles/pull/539](https://togithub.com/charmbracelet/bubbles/pull/539)
- [@&#8203;aditipatelpro](https://togithub.com/aditipatelpro) made their
first contribution in
[https://github.com/charmbracelet/bubbles/pull/577](https://togithub.com/charmbracelet/bubbles/pull/577)

**Full Changelog**:
charmbracelet/bubbles@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>

<details>
<summary>charmbracelet/bubbletea
(github.com/charmbracelet/bubbletea)</summary>

###
[`v0.27.1`](https://togithub.com/charmbracelet/bubbletea/releases/tag/v0.27.1)

[Compare
Source](https://togithub.com/charmbracelet/bubbletea/compare/v0.27.0...v0.27.1)

This is a lil’ workaround for a hang that can occur when starting a
program using Lip Gloss. For details see
[https://github.com/charmbracelet/bubbletea/pull/1107](https://togithub.com/charmbracelet/bubbletea/pull/1107).

#### Changelog

##### Bug fixes

-
[`d6458e0`](https://togithub.com/charmbracelet/bubbletea/commit/d6458e03f27245a597a30234a532ef345af31d36):
fix: force query the terminal bg before running any programs
([@&#8203;aymanbagabas](https://togithub.com/aymanbagabas))

***

<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.27.0`](https://togithub.com/charmbracelet/bubbletea/releases/tag/v0.27.0)

[Compare
Source](https://togithub.com/charmbracelet/bubbletea/compare/v0.26.6...v0.27.0)

### Suspending, environment hacking, and more

Hi! This release has three nice little features and some bug fixes.
Let's take a look:

#### Suspending and resuming

At last, now you can programmatically suspend and resume programs with
the
[`tea.Suspend`](https://pkg.go.dev/github.com/charmbracelet/bubbletea#Suspend)
command and handle resumes with the
[`tea.ResumeMsg`](https://pkg.go.dev/github.com/charmbracelet/bubbletea#ResumeMsg)
message:

```go
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
	switch msg := msg.(type) {

	// Suspend with ctrl+z!
	case tea.KeyMsg:
		switch msg.String() {
		case "ctrl+z":
			m.suspended = true
			return m, tea.Suspend
		}

	// Handle resumes
	case tea.ResumeMsg:
		m.suspended = false
		return m, nil
	}

	// ...
}
```


[Example](https://togithub.com/charmbracelet/bubbletea/blob/d6a19f0eb5a983610bd65a1647f5955abe3ee69e/examples/suspend/main.go)

There's also a
[`tea.SuspendMsg`](https://pkg.go.dev/github.com/charmbracelet/bubbletea#SuspendMsg)
that flows through `Update` on suspension.

Special thanks to [@&#8203;knz](https://togithub.com/knz) for
prototyping the original implementation of this.

#### Setting the environment

When Bubble Tea is behind
[Wish](https://togithub.com/charmbracelet/wish) you may have needed to
pass environment variables from the remote session to the `Program`. Now
you can with the all new
[tea.WithEnvironment](https://pkg.go.dev/github.com/charmbracelet/bubbletea#WithEnvironment):

```go
var sess ssh.Session // ssh.Session is a type from the github.com/charmbracelet/ssh package
pty, _, _ := sess.Pty()
environ := append(sess.Environ(), "TERM="+pty.Term)
p := tea.NewProgram(model, tea.WithEnvironment(environ)
```

#### Requesting the window dimensions

All the Bubble Tea pros know that you get a `tea.WindowSizeMsg` when the
`Program` starts and when the window resizes. Now you can just query it
on demand too with the
[`tea.WindowSize`](https://pkg.go.dev/github.com/charmbracelet/bubbletea#WindowSize)
command.

#### Changelog

##### New!

-
[`7d70838`](https://togithub.com/charmbracelet/bubbletea/commit/7d708384a105005dfbcec2290bfe4ea1d0e8d9f0):
feat: add a cmd to request window size
([#&#8203;988](https://togithub.com/charmbracelet/bubbletea/issues/988))
([@&#8203;aymanbagabas](https://togithub.com/aymanbagabas))
-
[`ea13ffb`](https://togithub.com/charmbracelet/bubbletea/commit/ea13ffb9a18d0925491eeb580c66b4c6b2f4284f):
feat: allow to suspend bubbletea programs
([#&#8203;1054](https://togithub.com/charmbracelet/bubbletea/issues/1054))
([@&#8203;caarlos0](https://togithub.com/caarlos0))
-
[`cae9acd`](https://togithub.com/charmbracelet/bubbletea/commit/cae9acdf7b37b5723078bae2eaa99ca14c6bcd05):
feat: set the program environment variables
([#&#8203;1063](https://togithub.com/charmbracelet/bubbletea/issues/1063))
([@&#8203;aymanbagabas](https://togithub.com/aymanbagabas))

##### Fixed

-
[`7c1bfc0`](https://togithub.com/charmbracelet/bubbletea/commit/7c1bfc0e55e65bc6d52ec1e126d97ee45ddbeb08):
query window-size in a goroutine
([#&#8203;1059](https://togithub.com/charmbracelet/bubbletea/issues/1059))
([@&#8203;aymanbagabas](https://togithub.com/aymanbagabas))
-
[`4497aa9`](https://togithub.com/charmbracelet/bubbletea/commit/4497aa9eef1ce78044d016782e9301dcb1b7c288):
reset cursor position on renderer exit
([#&#8203;1058](https://togithub.com/charmbracelet/bubbletea/issues/1058))
([@&#8203;aymanbagabas](https://togithub.com/aymanbagabas))
-
[`d6a19f0`](https://togithub.com/charmbracelet/bubbletea/commit/d6a19f0eb5a983610bd65a1647f5955abe3ee69e):
wrap `ErrProgramKilled` error
([@&#8203;aymanbagabas](https://togithub.com/aymanbagabas))
-
[`4a9620e`](https://togithub.com/charmbracelet/bubbletea/commit/4a9620e7134978771059ff7b481b6c9a8c611ac3):
fix bugs in package-manager example
([@&#8203;AkshayKalose](https://togithub.com/AkshayKalose))

***

<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).

</details>

<details>
<summary>charmbracelet/lipgloss
(github.com/charmbracelet/lipgloss)</summary>

###
[`v0.13.0`](https://togithub.com/charmbracelet/lipgloss/releases/tag/v0.13.0)

[Compare
Source](https://togithub.com/charmbracelet/lipgloss/compare/v0.12.1...v0.13.0)

### Woodn’t you know, Lip Gloss has trees!

Lip Gloss now ships with a tree rendering sub-package!

```go
import "github.com/charmbracelet/lipgloss/tree"
```

Define a new tree.

```go
t := tree.Root(".").
  Child("A", "B", "C")
```

Print the tree.

```go
fmt.Println(t)

// .
// ├── A
// ├── B
// └── C
```

Trees have the ability to nest.

```go
t := tree.Root(".").
  Child("Item 1").
  Child(
    tree.Root("Item 2").
      Child("Item 2.1").
      Child("Item 2.2").
      Child("Item 2.3"),
  ).
  Child(
    tree.Root("Item 3").
      Child("Item 3.1").
      Child("Item 3.2"),
  )
```

Print the tree.

```go
fmt.Println(t)
```

<p align="center">
<img width="400" alt="Tree Example (simple)"
src="https://stuff.charm.sh/lipgloss/tree/simple.png">
</p>

Trees can be customized via their enumeration function as well as using
`lipgloss.Style`s.

```go
enumeratorStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("99")).MarginRight(1)
itemStyle := lipgloss.NewStyle().Foreground(lipgloss.Color("212")).MarginRight(1)

t := tree.Root("Makeup").
  Child(
    "Glossier",
    "Claire’s Boutique",
    "Nyx",
    "Mac",
    "Milk",
  ).
  Enumerator(tree.RoundedEnumerator).
  EnumeratorStyle(enumeratorStyle).
  ItemStyle(itemStyle).
  RootStyle(lipgloss.NewStyle().Foreground(lipgloss.Color("#&#8203;04B575")))
```

Print the tree.

<p align="center">
<img width="600" alt="Tree Example (makeup)"
src="https://stuff.charm.sh/lipgloss/tree/makeup.png">
</p>

The predefined enumerators for trees are `DefaultEnumerator` and
`RoundedEnumerator`.

If you need, you can also build trees incrementally:

```go
t := tree.New()

for i := 0; i < repeat; i++ {
    t.Child("Lip Gloss")
}
```

#### There’s more where that came from

See [all the tree
examples](https://togithub.com/charmbracelet/lipgloss/tree/master/examples/tree).

<p align="center">
<img width="600"
src="https://github.com/user-attachments/assets/d6056837-44cf-4fd8-aff5-31873bb70938">
</p>

***

#### Changelog

##### New Features

-
[`0618c73`](https://togithub.com/charmbracelet/lipgloss/commit/0618c73743d90bb724af8f5a75e4c17bced1ff87):
feat(test): add test for `JoinHorizontal`
([#&#8203;346](https://togithub.com/charmbracelet/lipgloss/issues/346))
([@&#8203;aditipatelpro](https://togithub.com/aditipatelpro))
-
[`feb42a9`](https://togithub.com/charmbracelet/lipgloss/commit/feb42a9be4a0577fd10b8e9ba80541ca759fb60c):
feat: move tree to root
([#&#8203;342](https://togithub.com/charmbracelet/lipgloss/issues/342))
([@&#8203;caarlos0](https://togithub.com/caarlos0))

##### Bug fixes

-
[`8a0e640`](https://togithub.com/charmbracelet/lipgloss/commit/8a0e6405b71da72f705fbdb6a98eba0095ddbabe):
fix: remove unnecessary if
([@&#8203;aymanbagabas](https://togithub.com/aymanbagabas))

##### Documentation updates

-
[`bc0de5c`](https://togithub.com/charmbracelet/lipgloss/commit/bc0de5ca26463c5d6f6f8abcb28a5d3090019fd8):
docs(README): make tree example match output
([@&#8203;bashbunni](https://togithub.com/bashbunni))
-
[`bb3e339`](https://togithub.com/charmbracelet/lipgloss/commit/bb3e3398bb98de0faf2966331c4686b360f7eab4):
docs(README): match tree example alignment with list examples
([@&#8203;bashbunni](https://togithub.com/bashbunni))
-
[`185fde3`](https://togithub.com/charmbracelet/lipgloss/commit/185fde35318b966319d590e960e3382233f72c6f):
docs(README): update tree images
([@&#8203;bashbunni](https://togithub.com/bashbunni))
-
[`ed7f56e`](https://togithub.com/charmbracelet/lipgloss/commit/ed7f56e2a7e910c5a63983683c2d7e387d09d024):
docs: fix `CompleteColor` example
([#&#8203;345](https://togithub.com/charmbracelet/lipgloss/issues/345))
([@&#8203;bashbunni](https://togithub.com/bashbunni))
-
[`cf0a7c6`](https://togithub.com/charmbracelet/lipgloss/commit/cf0a7c615f558ed2a522babdcf6288f46667a5bb):
docs: fix tree screenshot
([@&#8203;caarlos0](https://togithub.com/caarlos0))

***

<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).

</details>

<details>
<summary>google/go-containerregistry
(github.com/google/go-containerregistry)</summary>

###
[`v0.20.2`](https://togithub.com/google/go-containerregistry/releases/tag/v0.20.2)

[Compare
Source](https://togithub.com/google/go-containerregistry/compare/v0.20.1...v0.20.2)

#### What's Changed

- deps: bump docker dep by
[@&#8203;imjasonh](https://togithub.com/imjasonh) in
[https://github.com/google/go-containerregistry/pull/1991](https://togithub.com/google/go-containerregistry/pull/1991)

**Full Changelog**:
google/go-containerregistry@v0.20.1...v0.20.2

</details>

<details>
<summary>urfave/cli (github.com/urfave/cli/v2)</summary>

### [`v2.27.4`](https://togithub.com/urfave/cli/releases/tag/v2.27.4)

[Compare
Source](https://togithub.com/urfave/cli/compare/v2.27.3...v2.27.4)

#### What's Changed

- Fix:(issue\_1962) Fix tests failing on 32 bit architectures by
[@&#8203;dearchap](https://togithub.com/dearchap) in
[https://github.com/urfave/cli/pull/1963](https://togithub.com/urfave/cli/pull/1963)

**Full Changelog**:
urfave/cli@v2.27.3...v2.27.4

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 6am on monday" in timezone
Australia/Sydney, 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.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job
log](https://developer.mend.io/github/google/osv-scanner).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19-->
abs3ntdev pushed a commit to abs3ntdev/gspot that referenced this pull request Aug 27, 2024
…(#33)

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.19.0` |

---

### Release Notes

<details>
<summary>charmbracelet/bubbles (github.com/charmbracelet/bubbles)</summary>

### [`v0.19.0`](https://github.com/charmbracelet/bubbles/releases/tag/v0.19.0)

[Compare Source](charmbracelet/bubbles@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](charmbracelet/bubbles#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 charmbracelet/bubbles#496
-   Textinput: fix out of range panic if no matched suggestions by [@&#8203;rdnt](https://github.com/rdnt) in charmbracelet/bubbles#473
-   List: Fix no-op list pagination functions by [@&#8203;nekopy](https://github.com/nekopy) in charmbracelet/bubbles#458
-   Table: Clarify position constant in JoinHorizontal by [@&#8203;aditipatelpro](https://github.com/aditipatelpro) in charmbracelet/bubbles#577
-   Progress: make full/empty fill characters configurable by [@&#8203;rwinkhart](https://github.com/rwinkhart) in charmbracelet/bubbles#409
-   Dependencies: switch to x/ansi for text manipulation by [@&#8203;aymanbagabas](https://github.com/aymanbagabas) in charmbracelet/bubbles#505

##### Added

-   Textarea: add help to textarea key bindings by [@&#8203;TravisYeah](https://github.com/TravisYeah) in charmbracelet/bubbles#418
-   Textarea: Add multiline placeholder by [@&#8203;mikelorant](https://github.com/mikelorant) in charmbracelet/bubbles#302
-   Table: Add column return function by [@&#8203;abeleinin](https://github.com/abeleinin) in charmbracelet/bubbles#369
-   Table: Implement help.Keymap interface and add quit mapping by [@&#8203;prgres](https://github.com/prgres) in charmbracelet/bubbles#440
-   Ctrl+Left/Right for WordForward/Backward by [@&#8203;maaslalani](https://github.com/maaslalani) in charmbracelet/bubbles#387
-   Use goreleaser for releases by [@&#8203;aymanbagabas](https://github.com/aymanbagabas) in charmbracelet/bubbles#526

##### Fixed

-   Table: Render Row Tests by [@&#8203;maaslalani](https://github.com/maaslalani) in charmbracelet/bubbles#487
-   Table: Only render columns with a positive width by [@&#8203;fabio42](https://github.com/fabio42) in charmbracelet/bubbles#465
-   Table: Fix inheritence of SelectedStyle in StyleFunc by [@&#8203;gabrielfu](https://github.com/gabrielfu) in charmbracelet/bubbles#539
-   Table: Don't include header height in the total table size by [@&#8203;prgres](https://github.com/prgres) in charmbracelet/bubbles#434
-   Table: Fix premature viewport scroll by [@&#8203;dzeleniak](https://github.com/dzeleniak) in charmbracelet/bubbles#429
-   Textarea: Fix end of buffer character by [@&#8203;mikelorant](https://github.com/mikelorant) in charmbracelet/bubbles#491
-   Textarea: Set textarea default EndOfBufferCharacter to ' ' by [@&#8203;blvrd](https://github.com/blvrd) in charmbracelet/bubbles#510
-   Textarea: End of Buffer alignment by [@&#8203;maaslalani](https://github.com/maaslalani) in charmbracelet/bubbles#486
-   Textinput: don't block input on validation by [@&#8203;GabrielNagy](https://github.com/GabrielNagy) in charmbracelet/bubbles#185
-   Viewport: Fix division by zero in scrollpercentage by [@&#8203;zMoooooritz](https://github.com/zMoooooritz) in charmbracelet/bubbles#494
-   Help: Fix centering by [@&#8203;gabe565](https://github.com/gabe565) in charmbracelet/bubbles#516
-   Progress: Stop spring defaults from overriding WithStringOptions by [@&#8203;nervo](https://github.com/nervo) in charmbracelet/bubbles#540
-   Cursor: Make SetMode method in cursor library handle invalid mode values correctly by [@&#8203;anirudhaCodes](https://github.com/anirudhaCodes) in charmbracelet/bubbles#477

##### Test coverage ✅

-   Add tests for textarea view by [@&#8203;mikelorant](https://github.com/mikelorant) in charmbracelet/bubbles#485
-   Add tests for paginator by [@&#8203;anirudhaCodes](https://github.com/anirudhaCodes) in charmbracelet/bubbles#480
-   Add tests for textInput Tests by [@&#8203;KevM](https://github.com/KevM) in charmbracelet/bubbles#500
-   Improve textarea tests by [@&#8203;mikelorant](https://github.com/mikelorant) in charmbracelet/bubbles#490

#### New Contributors

-   [@&#8203;rdnt](https://github.com/rdnt) made their first contribution in charmbracelet/bubbles#473
-   [@&#8203;rwinkhart](https://github.com/rwinkhart) made their first contribution in charmbracelet/bubbles#409
-   [@&#8203;mikelorant](https://github.com/mikelorant) made their first contribution in charmbracelet/bubbles#485
-   [@&#8203;anirudhaCodes](https://github.com/anirudhaCodes) made their first contribution in charmbracelet/bubbles#480
-   [@&#8203;nekopy](https://github.com/nekopy) made their first contribution in charmbracelet/bubbles#458
-   [@&#8203;TravisYeah](https://github.com/TravisYeah) made their first contribution in charmbracelet/bubbles#418
-   [@&#8203;abeleinin](https://github.com/abeleinin) made their first contribution in charmbracelet/bubbles#369
-   [@&#8203;fabio42](https://github.com/fabio42) made their first contribution in charmbracelet/bubbles#465
-   [@&#8203;prgres](https://github.com/prgres) made their first contribution in charmbracelet/bubbles#440
-   [@&#8203;zMoooooritz](https://github.com/zMoooooritz) made their first contribution in charmbracelet/bubbles#494
-   [@&#8203;dzeleniak](https://github.com/dzeleniak) made their first contribution in charmbracelet/bubbles#429
-   [@&#8203;KevM](https://github.com/KevM) made their first contribution in charmbracelet/bubbles#500
-   [@&#8203;gabe565](https://github.com/gabe565) made their first contribution in charmbracelet/bubbles#516
-   [@&#8203;blvrd](https://github.com/blvrd) made their first contribution in charmbracelet/bubbles#510
-   [@&#8203;nervo](https://github.com/nervo) made their first contribution in charmbracelet/bubbles#540
-   [@&#8203;gabrielfu](https://github.com/gabrielfu) made their first contribution in charmbracelet/bubbles#539
-   [@&#8203;aditipatelpro](https://github.com/aditipatelpro) made their first contribution in charmbracelet/bubbles#577

**Full Changelog**: charmbracelet/bubbles@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:eyJjcmVhdGVkSW5WZXIiOiIzOC40NC4zIiwidXBkYXRlZEluVmVyIjoiMzguNDQuMyIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6W119-->

Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
Reviewed-on: https://git.asdf.cafe/abs3nt/gspot/pulls/33
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.

3 participants