-
Notifications
You must be signed in to change notification settings - Fork 964
(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
base: main
Are you sure you want to change the base?
(v2) Bubble Tea v2 #1118
Conversation
d2bffc5
to
84b68c5
Compare
Without this, keyboard enhancements events won't be sent to update
…ements This change exposes the `KeyboardEnhancements` type and tracks requested and active enhancements in the `Program` struct. This change also renames the `KeyboardEnhancement` type to `KeyboardEnhancementOption` and `keyboardEnhancements` to `KeyboardEnhancements` as well as `EnableKeyboardEnhancements` to `RequestKeyboardEnhancements`.
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This implements the new cursed ferocious renderer. This is based on the new `cellbuf.Screen` renderer. This renderer is more efficient and flexible than the previous renderer. The renderer controls the altscreen buffer and cursor visibility which means we don't need to do so in Bubble Tea. Instead, Bubble Tea can focus on the event loop and the application state. This also removes the experimental flags and changes the renderer interface to be more explicit about the methods that are available.
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
…sted and active enhancements (#1286) refactor: keyboard: expose type and track requested and active enhancements This change exposes the `KeyboardEnhancements` type and tracks requested and active enhancements in the `Program` struct. This change also renames the `KeyboardEnhancement` type to `KeyboardEnhancementOption` as well as`EnableKeyboardEnhancements` to `RequestKeyboardEnhancements`. Fixes: #1283
* 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
The main and alternate screens have their own Kitty keyboard state stack. We need to request keyboard enhancements again when entering or exiting the alternate screen.
[v2] Use Ultraviolet
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1118 +/- ##
===========================================
- Coverage 70.10% 47.66% -22.45%
===========================================
Files 17 26 +9
Lines 1726 2031 +305
===========================================
- Hits 1210 968 -242
- Misses 469 989 +520
- Partials 47 74 +27 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
if p.requestedEnhancements.modifyOtherKeys > 0 { | ||
// XXX: Tmux has added support for Xterm modifyOtherKeys, but it | ||
// is not enabled by default and when enabled, it can cause | ||
// issues with some keys like escape and typeing. |
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.
// issues with some keys like escape and typeing. | |
// issues with some keys like escape and typing. |
Kitty keyboard can be set to a specific state instead of using the push/pop stack approach. The latter might break and sometimes won't work with things like Zellij.
This PR will keep track of the changes upcoming in Bubble Tea v2
MakeInit()
return the model