termdash v0.14.0 Release Notes
-
๐ฅ Breaking API changes
- The
widgetapi.Widget.Keyboard
andwidgetapi.Widget.Mouse
methods now accepts a second argument which provides widgets with additional metadata. All widgets implemented outside of thetermdash
repository will need to be updated similarly to theBarchart
example below. Change the original method signatures: ```go func (*BarChart) Keyboard(k *terminalapi.Keyboard) error { ... }
func (*BarChart) Mouse(m *terminalapi.Mouse) error { ... }
By adding the new `*widgetapi.EventMeta` argument as follows: ```go func (*BarChart) Keyboard(k *terminalapi.Keyboard, meta *widgetapi.EventMeta) error { ... } func (*BarChart) Mouse(m *terminalapi.Mouse, meta *widgetapi.EventMeta) error { ... }
๐ Fixed
termdash
no longer crashes whentcell
is used and the terminal window downsizes while content is being drawn.
โ Added
Text input form functionality with keyboard navigation
- โ added a new
formdemo
that demonstrates a text input form with keyboard navigation.
Infrastructure changes
- ๐ง
container
now allows users to configure keyboard keys that move focus to the next or the previous container. - ๐ containers can request to be skipped when focus is moved using keyboard keys.
- containers can register into separate focus groups and specific keyboard keys can be configured to move the focus within each focus group.
- widgets can now request keyboard events exclusively when focused.
- ๐ users can now set a
container
as focused using the newcontainer.Focused
option.
โก๏ธ Updates to the
button
widget- the
button
widget allows users to specify multiple trigger keys. - ๐ the
button
widget now supports different keys for the global and focused scope. - the
button
widget can now be drawn without the shadow or the press animation. - the
button
widget can now be drawn without horizontal padding around its text. - the
button
widget now allows specifying cell options for each cell of the displayed text. Separate cell options can be specified for each of button's main states (up, focused and up, down). - the
button
widget allows specifying separate fill color values for each of its main states (up, focused and up, down). - โก๏ธ the
button
widget now has a methodSetCallback
that allows updating the callback function on an existingbutton
instance.
โก๏ธ Updates to the
textinput
widget- ๐ง the
textinput
widget can now be configured to request keyboard events exclusively when focused. - 0๏ธโฃ the
textinput
widget can now be initialized with a default text in the input box.
- The