Releases: Textualize/textual
The compacted release
There are a few interesting features in this release.
Many widgets have grown a compact
reactive. If you set this to True
then the widget will have a compact (borderless) style.
Reactives have a new toggle_class
attribute, that toggles a TCSS classname according to the truthyness of its value. If that sounds complicated, it really isn't in practice. Let's see it in action:
class MyWidget(Widget):
compact = reactive(False, toggle_class="-textual-compact")
This adds a boolean attribute to the widget. If you set compact=True
then it will add the class "-textual-compact". If you set compact=False
it will remove the class. Simples.
We also have breakpoint support, so you can build UIs that adjust to the dimensions of the screen. This was always possible, but it was a pattern before. Now it is a first class feature. See the breakpoints.py example.
We also have two new pseudo classes: :first-child
and :last-child
, which have the same meaning as browser CSS. Contributed by @sponsfreixes
There is one potential breaking change. RadioSet
now has a default width of 1fr, meaning they will take up the full available space. This makes RadioSet size like other widgets. If you want the original behavior, then set the width to "auto"
[3.2.0] - 2025-05-02
Fixed
- Fixed
OptionList
causing excessive redrawing #5766 - Log messages could be written to stdout when there was no app, which could happen when using run_async or threads. Now they will be suppressed, unless the env var
TEXTUAL_DEBUG
is set #5782
Added
- Added
:first-child
and:last-child
pseudo classes #5776 - Added
toggle_class
parameter to reactives #5778 - Added
compact
parameter and reactive toButton
,Input
,ToggleButton
,RadioSet
,OptionList
,TextArea
#5778 - Added
HORIZONTAL_BREAKPOINTS
andVERTICAL_BREAKPOINTS
toApp
andScreen
#5779
Changed
RadioSet
now has a default width of1fr
#5778
The dim tinted release
The Dim the Lights Release
Mostly fixes, some API enhancements. See below.
[3.1.0] - 2025-04-12
Fixed
- Fixed markup escaping edge cases #5697
- Fixed incorrect auto height in Collapsible #5703
- Fixed issue with keymaps and single-letter keys #5726
- Fixed
OptionList
size after removing or clearing options #5728 - Fixed footer / key panel not updating when keymaps are applied #5724
- Fixed alignment not being applied when there are min and max limits on dimensions #5732
- Fixed issues with OptionList scrollbar not updating #5736
- Fixed allow_focus method not overriding
can_focus()
#5737 - Fixed overlap of Input / TextArea selection with arbitrary text selection #5739
Changed
- Collapsible title now accepts str, Text, or Content #5697
- Rich Text objects will be converted to Content in OptionList and other widgets #5712
- Textual will always convert dim attributes to RGB by default #5715
- Notifications will now use content markup (previously they used Console markup) #5719
Added
- Added
TEXTUAL_DIM_FACTOR
env var to set the opacity of the 'dim' ANSI attribute #5715 notify()
now accepts amarkup
parameter to disable rendering the message as markup #5719- Added
Screen.text_selection_started_signal
#5739 - Added
App.clear_selection()
helper method to clear arbitrary text selection of active screen #5739
The Nobody's Fool Release
Fixes an issue with modal dialogs not refreshing.
[3.0.1] - 2025-04-01
Fixed
- Fixed issue with modal dialog not refreshing #5696
The Too Hot Release
Mostly small enhancements, and fixes. This is a major version bump, due to a change in how app.query works. Previously this would query the active screen, but this would yield surprising results if you push a screen. Now app.query, gets results from the default screen.
This is unlikely to impact many apps. If it does, use app.screen.query
where you previously used app.query
.
[3.0.0] - 2025-03-27
Changed
- Breaking change:
App.query
and friends will now always query the default (first) screen, not necessarily the active screen. - Content now has a default argument of an empty string, so
Content()
is equivalent toContent("")
- Assigned names to Textual-specific threads:
textual-input
,textual-output
. These should become visible in monitoring tools (ps, top, htop) as of Python 3.14. #5654 - Tabs now accept Content or content markup #5657
- Breaking change: Buttons will now use Textual markup rather than console markup
- tree-sitter languages are now loaded lazily, improving cold-start time #563
Fixed
- Static and Label now accept Content objects, satisfying type checkers #5618
- Fixed click selection not being disabled when allow_select was set to false #5627
- Fixed crash on clicking line API border #5641
- Fixed Select.selection now correctly returns None if Select.BLANK is selected instead of an AssertionError
- Fixed additional spaces after text-wrapping #5657
- Added missing
scroll_end
parameter to theLog.write_line
method #5672 - Restored support for blink #5675
- Fixed scrolling breaking on DataTable with
overflow: hidden
#5681
Added
- Added Widget.preflight_checks to perform some debug checks after a widget is instantiated, to catch common errors. #5588
- Added text-padding style #5657
- Added
Content.first_line
property #5657 - Added
Content.from_text
constructor #5657 - Added
Content.empty
constructor #5657 - Added
Content.pad
method #5657 - Added
Style.has_transparent_foreground
property #5657
The fuzzy release
A fix for the command palette's fuzzy search. Will not affect most people.
[2.1.2] - 2025-02-26
Fixed
- Fixed command palette fuzzy search bailing too early #5579
The interrupted release
Mostly fixes here. There is a small change to behavior around scroll_end. Changes below...
[2.1.1] - 2025-02-22
Fixed
- Fixed
Link
binding to open the link #5564 - Fixed IndexError in OptionList #5574
- Fixed issue with clear_panes breaking tabbed content #5573
Changed
- The user can now interrupt a scroll to end by grabbing the scrollbar or scrolling in any other way. Press ++end++ or scroll to the end to restore default behavior. This is more intuitive that it may sound.
The pointed release
Mostly fixes in this release, and a small feature.
The mouse event adds pointer_*
attributes which contain the pointer coordinates in pixel resolution (if supported by your terminal).
[2.1.0] - 2025-02-19
Fixed
- Fixed smooth scrolling broken on iTerm over SSH #5551
- Fixed height of auto container which contains auto height children #5552
- Fixed
Content.from_markup
not stripping control codes #5557 - Fixed
delta_x
anddelta_y
in mouse events when smooth scrolling is enabled #5556 - Fixed flipped title colors in panel border #5548
- Fixed detection of smooth scrolling #5558
Added
- Added
pointer_x
,pointer_y
,pointer_screen_x
, andpointer_screen_y
attributes to mouse events #5556
Changed
The criminally smooth hotfix release
[2.0.4] - 2025-02-17
Fixed
- Fixed smooth scrolling breaking mouse support in VSCode (and probably others) #5549