Skip to content

Conversation

@aymanbagabas
Copy link
Member

@aymanbagabas aymanbagabas commented Aug 28, 2024

This PR will keep track of the changes upcoming in Bubble Tea v2

See the Bubble Tea v2 discussion for more info.

@aymanbagabas aymanbagabas changed the title V2 exp (v2) Bubble Tea API Aug 28, 2024
@aymanbagabas aymanbagabas added this to the v2.0.0 milestone Aug 29, 2024
@aymanbagabas aymanbagabas force-pushed the v2-exp branch 7 times, most recently from d2bffc5 to 84b68c5 Compare September 20, 2024 20:09
@aymanbagabas aymanbagabas changed the title (v2) Bubble Tea API (v2) Bubble Tea v2 Jan 27, 2025
Copy link

@agca52 agca52 left a 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.
)

* 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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants