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

(v2) Bubble Tea API #1118

Draft
wants to merge 301 commits into
base: main
Choose a base branch
from
Draft

(v2) Bubble Tea API #1118

wants to merge 301 commits into from

Conversation

aymanbagabas
Copy link
Member

@aymanbagabas aymanbagabas commented Aug 28, 2024

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

  • Input sequence parser
  • Kitty keyboard
  • Xterm modifyOtherKeys
  • Mode 2027 (grapheme clustering)
  • Setting/getting terminal background/foreground/cursor colors
  • Setting/getting the clipboard using OSC52
  • Make Init() return the model
  • New Key/Mouse API (v2) Use KeyMsg/MouseMsg interfaces #1111

aymanbagabas and others added 30 commits August 19, 2024 12:18
Use our in-house x/windows package to provide Windows API and fix the
Windows API incorrectly parsing "ctrl+" keys.

TODO: use versioned github.com/charmbracelet/x/windows

Needs: charmbracelet/x#158

---

Support Windows Input Mode. This is an alternative keyboard input
protocol to Kitty keyboard and Xterm modifyOtherKeys. It's supported by
few terminals such as Wezterm and Windows Terminal.


https://github.com/microsoft/terminal/blob/main/doc/specs/%234999%20-%20Improved%20keyboard%20handling%20in%20Conpty.md
We can add them once we need them
We can export them when we need them
This adds the ability to use a custom renderer using a modified version
of the existing `renderer` interface.
This moves the GetSize call after initializing the renderer.
Use Render instead of Write/WriteString
Only disable enabled capabilities. Keep track of mouse mode state.
Use Mode/SetMode instead of EnableAltScreenBuffer/DisableAltScreenBuffer
etc. This uses less code and makes it more usable in the future to
accommodate for more terminal capabilities and modes.
aymanbagabas and others added 30 commits December 12, 2024 13:37
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.
…rd renderer

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 <[email protected]>
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.
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.

4 participants