-
Notifications
You must be signed in to change notification settings - Fork 1.1k
(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
722
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
caarlos0
approved these changes
Dec 10, 2024
caarlos0
reviewed
Feb 12, 2025
agca52
approved these changes
May 30, 2025
agca52
left a comment
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.
👍
v2: fix: renderer: delay redraw on resize
This change replaces the previous hit testing mechanism with a more flexible callback function in the View struct. This allows views to handle messages directly, enabling more customizable behavior that is not limited to mouse hits.
v2: feat: make view content a string and add view callback support
When the cursed renderer is stopped and then started again, we need to restore some state to ensure it functions correctly. This commit introduces a flag to track when the renderer is starting up again after being stopped. When this flag is set, we bypass the optimization that skips rendering if there are no changes, ensuring that the renderer properly redraws the screen. One example is when tea.Exec is used to run a program that stops the renderer and then starts it again. Without this fix, the renderer will do nothing and print an empty screen until it needs to like when it receives an update that changes the view.
movements and erasing line background color
) * fix(renderer): reset kitty keyboard protocol on alt screen switch We need to reset the kitty keyboard protocol when switching between main and alt screens. This is because kitty maintains separate keyboard protocol registries for each screen, and failing to reset the protocol can lead to issues such as the inability to use the Ctrl key in some editor that don't support kitty's keyboard protocol. * chore: update golden files to match the renderer output
Fixes: fdb8651 (fix(renderer): always move cursor to bottom on close)
When rendering to terminal, always assume raw mode even if the input is not a TTY. This ensures consistent behavior across different terminal emulators and environments. Fixes: #1572
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
See the Bubble Tea v2 discussion for more info.