Bubbletea Versions Save

A powerful little TUI framework 🏗

v0.18.0

2 years ago

Hello, ANSI compressor!

The big news in this release is the integration of @muesli’s ANSI compressor from his new ANSI package. The compressor, which has been integrated into the renderer, automatically removes redundant ANSI sequences and, as such, it can be considered lossless. This should improve rendering speeds both locally and over the wire.

Other stuff

When quitting a Bubble Tea program from the outside you previously had to…

p.Send(tea.Quit())

…which works, but also feels a little silly. So now you can just…

p.Quit()

Here’s the full changelog.


Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter or The Fediverse.

The Charm logo

v0.17.0

2 years ago

Windows Stuff

This release adds mouse support in Windows! It also fixes a regression introduced in v0.16.0 where the arrow keys didn't work on Windows.

As a side effect to the above, cancelable reads have been disabled in Windows for now. This means applications running in Windows can not run multiple Programs in succession in the context of a single application, nor can user input be reliably read after a Program has exited until the Go application exits. This is temporary and a solution is in development.

Changelog

New

  • Mouse support in Windows

Fixed

  • Arrow keys work properly in Windows again

Changed

  • Input will no longer reliably close on Windows after exiting a Bubble Tea program as it did in v0.16.0. This will be addressed in a subsequent release.

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter or The Fediverse.

The Charm logo

v0.16.0

2 years ago

Cancelable Reads

This release implements a cancelable input reader which allows user input to be read after a Program has exited. This means that you can now run multiple Programs in succession in a single application as well as generally read user input in other after a Program has exited in the context of a single application.

In addition, all Goroutines are now gracefully terminated before Program.Start() returns, resulting in reliable behavior between subsequent Programs.

This update has been a major undertaking by @erikgeiser, who built specific implementations for Linux, BSD/macOS, and Windows as well as a general purpose implementation for other flavors of unix.


Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter or The Fediverse.

The Charm logo

v0.15.0

2 years ago

Interop and Inputs

The big, new feature in this update is Program.Send(Msg), which allows you to send messages to the Update loop from outside a Bubble Tea program. This simplifies Bubble Tea’s interoperability with other libraries quite a lot and we’re excited to see what you do with it.

Beyond that, we’ve made a lot of small changes under the hood to allow Bubble Tea to work better with more types of terminal input such as PTYs over SSH. The program option WithInputTTY has also been added to make it easier to open a TTY (or console input device on Windows) on demand.

Changelog

New

  • Msgs can now be sent to Programs with Program.Send(Msg)
  • WithInputTTY is a new ProgramOption for explicitly opening a new TTY (or console on Windows) for input

Fixed

  • Fixed a send on closed channel panic that could happen during a shutdown when messages are being sent super fast
  • The cursor will now always hide/show itself during startup/shutdown, regardless of whether input is a terminal
  • Input will now attempt to be read regardless of whether input is a terminal

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter or The Fediverse.

The Charm logo

v0.14.1

2 years ago

Renderer Bugfix: Honor Explicitly Ignored Lines

This release fixes a bug where lines requested to be ignored weren't always honored by the renderer. Most notably, this affected high performance scrolling in the Bubbles Viewport.


Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or right here in GitHub Discussions.

The Charm logo

v0.14.0

3 years ago

Improvements: Races and Rendering

This release introduces three new ProgramOptions for starting programs with the altscreen and mouse enabled. This was implemented to solve both race conditions when initializing programs as well as correctness with regard to custom inputs.

// New! This is the recommended way to start your program with the mouse and altscreen active.
p := tea.NewProgram(model, tea.WithAltScreen(), tea.WithMouseAllMotion())

// Deprecated as this will only operate on stdout, as opposed to a custom output you may have set.
p := tea.NewProgram(model)
p.EnableAltScreen()
p.EnableMouseAllMotion()

// Strongly discouraged as these commands could be sent before starting the renderer, resulting
// in rendering artifacts. This is due to the fact that commands run asynchronously in a goroutine.
func (m model) Init() tea.Cmd {
    return tea.Batch(tea.EnterAltScreen, tea.EnableMouseAllMotion)
}

Also included are two subtle—yet important—rendering improvements.

Changelog

New

  • Added ProgramOption WithAltScreen for starting programs in the alternate screen buffer.
  • Added ProgramOptions WithMouseCellMotion and WithMouseAllMotion for starting programs with the mouse enabled.

Fixed

  • Programs will no longer render artifacts when exiting due to an error or panic.
  • If a view returns the empty string output will be cleared. Previously, rendering would be skipped entirely.

Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or right here in GitHub Discussions.

The Charm logo

v0.13.4

3 years ago

Rendering Hotfix

This bugfix release corrects a mis-rendering that could occur when the number of lines increases.

✌️ Special thanks for @fiws for reporting this one.


Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or right here in GitHub Discussions.

The Charm logo

v0.13.3

3 years ago

Faster Rendering

This release introduces a performance optimization to the Bubble Tea standard renderer where only lines that have changed since the last render will be drawn.

Note that there's already an optimization in place that will skip rendering entirely if nothing has changed.


Thoughts? Questions? We love hearing from you. Feel free to reach out on Twitter, The Fediverse, or right here in GitHub Discussions.

The Charm logo

v0.13.2

3 years ago

This bugfix release ensures Bubble Tea clears the bottom line before exiting, preventing the cursor the last row of output from potentially appearing behind the prompt. It also fixes a data race in the default renderer and improves compatibility with rxvt-based terminals.


Thoughts? Questions? Feel free to reach out on Twitter and The Fediverse.

The Charm logo

v0.13.1

3 years ago

This bugfix release prevents a data race in the default renderer.


Thoughts? Questions? Feel free to reach out on Twitter and The Fediverse.

The Charm logo