-
Notifications
You must be signed in to change notification settings - Fork 940
(v2) Bubble Tea v2 #1118
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
Draft
aymanbagabas
wants to merge
473
commits into
main
Choose a base branch
from
v2-exp
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
(v2) Bubble Tea v2 #1118
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d2bffc5
to
84b68c5
Compare
This was a hack to detect if the terminal supports keyboard enhancements. It hardcoded a timeout of 100ms to wait for the keyboard enhancements to be read from the terminal before sending an empty message. This is wrong because it assumes a fixed timeout for all terminals. While this is fine for now, we would never know if this timeout works for all terminals or if it is too short for something like an SSH session. Thus, we remove this hack and let the program handle message detection. A program can simply have a custom timeout message that gets fired after a certain time after sending all the terminal query commands.
Co-authored-by: Andrey Nering <[email protected]>
… API changes (#1425) * docs(examples): update textinput examples per Bubbles v2 API changes * docs(examples): clean up textinput example a little * docs(examples): update examples using textinput/textarea per API updates * docs(examples): bump bubbles/v2 to latest v2-exp
agca52
approved these changes
May 30, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This commit refactors the keyboard enhancements functionality by splitting the `WithKeyboardEnhancements` function into three separate functions: - `WithKeyReleases`: Enables support for reporting key release events. - `WithUniformKeyLayout`: Enables support for reporting key events in a uniform layout format. - `RequestKeyDisambiguation`: Enables support for disambiguated key events. This change improves clarity and usability by allowing users to enable specific keyboard enhancements individually, rather than requiring them to use a single function with multiple options.
* feat: create a panic trace file When Bubble Tea panics, it is really useful to have a trace file that contains the panic message and the stack trace. This does that exactly. * feat: make panic trace optional via TEA_DEBUG
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR will keep track of the changes upcoming in Bubble Tea v2
MakeInit()
return the model