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

undocumented limit for Text? #501

Open
ByteDick opened this issue Dec 24, 2024 · 6 comments
Open

undocumented limit for Text? #501

ByteDick opened this issue Dec 24, 2024 · 6 comments

Comments

@ByteDick
Copy link

found that it can add at most 100 lines in for Text. any solution to allow more lines?

@jonas-grgt
Copy link

huh.Text depends on bubbles textarea.Model which has a defaultMaxHeight of 99

textarea.Model exposes a MaxHeight field

Unfortunately huh.Text does not expose its internal textarea.Model.

Maybe it would be a good idea to just expose the textarea.Model in huh.Text ?

Or else a delegate func needs to be added for every textarea.Model func you want to expose through `huh.Text.

WDYT?

@meowgorithm
Copy link
Member

Good catch. We removed default character limit in a recent commit (charmbracelet/bubbles@398e92c) so this should just be a matter of doing a bubbles release and then bumping the dep in huh.

@jonas-grgt
Copy link

@meowgorithm defaultCharLimit is indeed set to zero but defaultMaxHeight still remains 99 in that commit which is the cause of this issue.

@meowgorithm
Copy link
Member

True! However we also separated the notions of max lines and max height to allow for large inputs. Here's the full PR:

charmbracelet/bubbles#672

Let me know if I'm wrong, but I believe this should solve for this one.

@jonas-grgt
Copy link

I believe so, thanks for pointing that out. I will close my PR.

I think we can leave this one open until a bubbles release has been done containing the aforementioned changes.

@meowgorithm
Copy link
Member

Agreed. Thanks for helping get to the bottom of this one (and thanks @ByteDick for flagging).

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

No branches or pull requests

3 participants