Skip to content

Releases: patrick91/rich-toolkit

0.17.1

17 Dec 10:49
21b9d72

Choose a tag to compare

Fix inline menu option wrapping by using spaces instead of tabs.

When using inline menus (e.g., app.confirm()), options like "Yes" and "No" were wrapping to separate lines due to tab character separators expanding unpredictably in fixed-width table columns. This release replaces tab separators with two spaces for consistent, predictable spacing.

Before:

● Yes
○ No

After:

● Yes  ○ No

This release was contributed by @patrick91 in #44

0.17.0

27 Nov 11:10
ee14dd1

Choose a tag to compare

Add scrolling support for menus with many options.

When a menu has more options than can fit on the terminal screen, it now
automatically scrolls as the user navigates with arrow keys. This prevents
the UI from breaking when the terminal is too small to display all options.

Features:

  • Automatic scrolling based on terminal height
  • Scroll indicators (↑ more / ↓ more) show when more options exist
  • Works with both TaggedStyle and BorderedStyle
  • Works with filterable menus (scroll resets when filter changes)
  • Optional max_visible parameter for explicit control

Example usage:

from rich_toolkit import RichToolkit
from rich_toolkit.styles.tagged import TaggedStyle

# Auto-scrolling based on terminal height
with RichToolkit(style=TaggedStyle()) as app:
    result = app.ask(
        "Select a country:",
        options=[{"name": country, "value": country} for country in countries],
        allow_filtering=True,
    )

# Or with explicit max_visible limit
from rich_toolkit.menu import Menu

menu = Menu(
    label="Pick an option:",
    options=[{"name": f"Option {i}", "value": i} for i in range(50)],
    max_visible=10,  # Only show 10 options at a time
)
result = menu.ask()

This release was contributed by @patrick91 in #41

0.16.0

19 Nov 15:26
da9fc52

Choose a tag to compare

        Add Pydantic v1/v2 compatibility for Input validators using a Protocol-based approach.

The Input component now accepts any object with a validate_python method through the new Validator protocol, making it compatible with both Pydantic v1 and v2.

Usage with Pydantic v2:

from pydantic import TypeAdapter

validator = TypeAdapter(int)
app.input("Enter a number:", validator=validator)

Usage with Pydantic v1:

from pydantic import parse_obj_as

class V1Validator:
    def __init__(self, type_):
        self.type_ = type_

    def validate_python(self, value):
        return parse_obj_as(self.type_, value)

validator = V1Validator(int)
app.input("Enter a number:", validator=validator)

Changes:

  • Added Validator protocol that accepts any object with a validate_python method
  • Improved error message extraction from Pydantic validation errors
  • Added cross-version compatibility tests
  • Updated CI to test both Pydantic v1 and v2 across Python 3.8-3.14

This release was contributed by @patrick91 in #39

0.15.1

04 Sep 09:28
f004cff

Choose a tag to compare

This release add proper support for CJK characters

This release was contributed by @patrick91 in #38

0.15.0

11 Aug 10:55
21ab146

Choose a tag to compare

        This release increases the paste buffer from 32 to 4096 characters, enabling users to paste longer text into input fields.

It also adds full Windows compatibility with proper special key handling and fixes how password fields to always show asterisks.

This release was contributed by @patrick91 in #36

v0.14.9

28 Jul 13:25
69802d9

Choose a tag to compare

What's Changed

  • Always restore cursor when component is done by @patrick91 in #34

Full Changelog: v0.14.8...v0.14.9

v0.14.8

30 Jun 22:05
5d1ae57

Choose a tag to compare

What's Changed

  • Restore terminal settings in all circumstances when querying terminal colors by @adambenali in #33

New Contributors

Full Changelog: v0.14.7...v0.14.8

v0.14.7

27 May 15:47
85c3232

Choose a tag to compare

What's Changed

Full Changelog: v0.14.6...v0.14.7

v0.14.6

12 May 19:18
4e38232

Choose a tag to compare

What's Changed

Full Changelog: v0.14.5...v0.14.6

v0.14.5

05 May 10:19
98d0108

Choose a tag to compare

What's Changed

Full Changelog: v0.14.4...v0.14.5