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