[PR #288] [MERGED] Releasing Termdash v0.14. #307

Closed
opened 2026-03-03 16:23:48 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mum4k/termdash/pull/288
Author: @mum4k
Created: 12/30/2020
Status: Merged
Merged: 12/30/2020
Merged by: @mum4k

Base: masterHead: release-0-14


📝 Commits (10+)

📊 Changes

44 files changed (+4678 additions, -345 deletions)

View changed files

📝 .gitignore (+3 -0)
📝 CHANGELOG.md (+72 -1)
📝 README.md (+19 -10)
📝 container/container.go (+103 -21)
📝 container/container_test.go (+477 -30)
📝 container/focus.go (+97 -0)
📝 container/focus_test.go (+1110 -47)
📝 container/options.go (+229 -0)
doc/images/formdemo.gif (+0 -0)
📝 private/canvas/canvas.go (+7 -14)
📝 private/faketerm/diff.go (+3 -0)
📝 private/fakewidget/fakewidget.go (+36 -16)
📝 private/fakewidget/fakewidget_test.go (+117 -16)
📝 termdash_test.go (+20 -5)
📝 widgetapi/widgetapi.go (+25 -8)
📝 widgets/barchart/barchart.go (+2 -2)
📝 widgets/button/button.go (+170 -41)
📝 widgets/button/button_test.go (+1001 -62)
📝 widgets/button/options.go (+107 -21)
widgets/button/text_options.go (+85 -0)

...and 24 more files

📄 Description

Breaking API changes

  • The widgetapi.Widget.Keyboard and widgetapi.Widget.Mouse methods now
    accepts a second argument which provides widgets with additional metadata.
    All widgets implemented outside of the termdash repository will need to be
    updated similarly to the Barchart example below. Change the original method
    signatures:

    func (*BarChart) Keyboard(k *terminalapi.Keyboard) error { ... }
    
    func (*BarChart) Mouse(m *terminalapi.Mouse) error { ... }
    
    

    By adding the new *widgetapi.EventMeta argument as follows:

    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 when tcell 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 new container.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 method SetCallback that allows updating the
    callback function on an existing button instance.

Updates to the textinput widget

  • the textinput widget can now be configured to request keyboard events
    exclusively when focused.
  • the textinput widget can now be initialized with a default text in the
    input box.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mum4k/termdash/pull/288 **Author:** [@mum4k](https://github.com/mum4k) **Created:** 12/30/2020 **Status:** ✅ Merged **Merged:** 12/30/2020 **Merged by:** [@mum4k](https://github.com/mum4k) **Base:** `master` ← **Head:** `release-0-14` --- ### 📝 Commits (10+) - [`c0f1cfd`](https://github.com/mum4k/termdash/commit/c0f1cfdc12f6c7d0adfd515c22f4318a3402e888) first commit - [`8072326`](https://github.com/mum4k/termdash/commit/8072326b23bfe8a8669652757bc6882110d58c67) dev - [`29d7e65`](https://github.com/mum4k/termdash/commit/29d7e65c6a28e3073e5ff46c8178b9509bc91a2a) dev - [`65debbb`](https://github.com/mum4k/termdash/commit/65debbb18fd3240adb57444da240cfd3e5b7daab) Design APIs of the HeatMap widget - [`e5e6097`](https://github.com/mum4k/termdash/commit/e5e6097bdfcf507cd08f188e81394a1ce0bafc55) Update comments - [`2ac3bc5`](https://github.com/mum4k/termdash/commit/2ac3bc52a4b7571a0c7654c47d7bbb2f7d69adac) dev - [`f5dc333`](https://github.com/mum4k/termdash/commit/f5dc3335b305cf46b9fbd8f25429ba829ca160d0) dev - [`b7a73f0`](https://github.com/mum4k/termdash/commit/b7a73f0d4056d42baa43b2ec8e87fe7ff99cb822) dev - [`283801e`](https://github.com/mum4k/termdash/commit/283801e4ed7b551351f3bf2420f46c9e3e59c2ba) Rename AxisWith to axisWith and add comments - [`289e1dd`](https://github.com/mum4k/termdash/commit/289e1dd004af3f8bcc2e9e7e59feb5e85a9ef675) Merge pull request #267 from fgksgf/api ### 📊 Changes **44 files changed** (+4678 additions, -345 deletions) <details> <summary>View changed files</summary> 📝 `.gitignore` (+3 -0) 📝 `CHANGELOG.md` (+72 -1) 📝 `README.md` (+19 -10) 📝 `container/container.go` (+103 -21) 📝 `container/container_test.go` (+477 -30) 📝 `container/focus.go` (+97 -0) 📝 `container/focus_test.go` (+1110 -47) 📝 `container/options.go` (+229 -0) ➕ `doc/images/formdemo.gif` (+0 -0) 📝 `private/canvas/canvas.go` (+7 -14) 📝 `private/faketerm/diff.go` (+3 -0) 📝 `private/fakewidget/fakewidget.go` (+36 -16) 📝 `private/fakewidget/fakewidget_test.go` (+117 -16) 📝 `termdash_test.go` (+20 -5) 📝 `widgetapi/widgetapi.go` (+25 -8) 📝 `widgets/barchart/barchart.go` (+2 -2) 📝 `widgets/button/button.go` (+170 -41) 📝 `widgets/button/button_test.go` (+1001 -62) 📝 `widgets/button/options.go` (+107 -21) ➕ `widgets/button/text_options.go` (+85 -0) _...and 24 more files_ </details> ### 📄 Description ### Breaking API changes - The `widgetapi.Widget.Keyboard` and `widgetapi.Widget.Mouse` methods now accepts a second argument which provides widgets with additional metadata. All widgets implemented outside of the `termdash` repository will need to be updated similarly to the `Barchart` 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 when `tcell` 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 new `container.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 method `SetCallback` that allows updating the callback function on an existing `button` instance. #### Updates to the `textinput` widget - the `textinput` widget can now be configured to request keyboard events exclusively when focused. - the `textinput` widget can now be initialized with a default text in the input box. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-03 16:23:48 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/termdash#307
No description provided.