All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Added
TreeNode.expand_all
Textualize#1430 - Added
TreeNode.collapse_all
Textualize#1430 - Added
TreeNode.toggle_all
Textualize#1430 - Added the coroutines
Animator.wait_until_complete
andpilot.wait_for_scheduled_animations
that allow waiting for all current and scheduled animations Textualize#1658 - Added the method
Animator.is_being_animated
that checks if an attribute of an object is being animated or is scheduled for animation - Added more keyboard actions and related bindings to
Input
Textualize#1676 - Added App.scroll_sensitivity_x and App.scroll_sensitivity_y to adjust how many lines the scroll wheel moves the scroll position Textualize#928
- Added Shift+scroll wheel and ctrl+scroll wheel to scroll horizontally
- Added
Tree.action_toggle_node
to toggle a node without selecting, and bound it to Space Textualize#1433 - Added
Tree.reset
to fully reset aTree
Textualize#1437
- Breaking change:
TreeNode
can no longer be imported fromtextual.widgets
; it is now available viafrom textual.widgets.tree import TreeNode
. Textualize#1637 Tree
now shows a (subdued) cursor for a highlighted node when focus has moved elsewhere Textualize#1471
- Fixed stuck screen Textualize#1632
- Fixed programmatic style changes not refreshing children layouts when parent widget did not change size Textualize#1607
- Fixed relative units in
grid-rows
andgrid-columns
being computed with respect to the wrong dimension Textualize#1406 - Fixed bug with animations that were triggered back to back, where the second one wouldn't start Textualize#1372
- Fixed bug with animations that were scheduled where all but the first would be skipped Textualize#1372
- Programmatically setting
overflow_x
/overflow_y
refreshes the layout correctly Textualize#1616 - Fixed double-paste into
Input
Textualize#1657 - Added a workaround for an apparent Windows Terminal paste issue Textualize#1661
- Fixed issue with renderable width calculation Textualize#1685
- Fixed issue with app not processing Paste event Textualize#1666
- Fixed glitch with view position with auto width inputs Textualize#1693
- Added Strip.text property Textualize#1620
- Fixed
textual diagnose
crash on older supported Python versions. Textualize#1622
- The default filename for screenshots uses a datetime format similar to ISO8601, but with reserved characters replaced by underscores Textualize#1518
0.10.0 - 2023-01-19
- Added
TreeNode.parent
-- a read-only property for accessing a node's parent Textualize#1397 - Added public
TreeNode
label access viaTreeNode.label
Textualize#1396 - Added read-only public access to the children of a
TreeNode
viaTreeNode.children
Textualize#1398 - Added
Tree.get_node_by_id
to allow getting a node by its ID Textualize#1535 - Added a
Tree.NodeHighlighted
message, giving aon_tree_node_highlighted
event handler Textualize#1400 - Added a
inherit_component_classes
subclassing parameter to control whether component classes are inherited from base classes Textualize#1399 - Added
diagnose
as atextual
command Textualize#1542 - Added
row
andcolumn
cursors toDataTable
Textualize#1547 - Added an optional parameter
selector
to the methodsScreen.focus_next
andScreen.focus_previous
that enable using a CSS selector to narrow down which widgets can get focus Textualize#1196
MouseScrollUp
andMouseScrollDown
now inherit fromMouseEvent
and have attached modifier keys. Textualize#1458- Fail-fast and print pretty tracebacks for Widget compose errors Textualize#1505
- Added Widget._refresh_scroll to avoid expensive layout when scrolling Textualize#1524
events.Paste
now bubbles Textualize#1434- Improved error message when style flag
none
is mixed with other flags (e.g., when settingtext-style
) Textualize#1420 - Clock color in the
Header
widget now matches the header color Textualize#1459 - Programmatic calls to scroll now optionally scroll even if overflow styling says otherwise (introduces a new
force
parameter to all thescroll_*
methods) Textualize#1201 COMPONENT_CLASSES
are now inherited from base classes Textualize#1399- Watch methods may now take no parameters
- Added
compute
parameter to reactive - A
TypeError
raised duringcompose
now carries the full traceback - Removed base class
NodeMessage
from which all node-relatedTree
events inherited
- The styles
scrollbar-background-active
andscrollbar-color-hover
are no longer ignored Textualize#1480 - The widget
Placeholder
can now have its width set toauto
Textualize#1508 - Behavior of widget
Input
when rendering after programmatic value change and related scenarios Textualize#1477 Textualize#1443 DataTable.show_cursor
now correctly allows cursor toggling Textualize#1547- Fixed cursor not being visible on
DataTable
mount whenfixed_columns
were used Textualize#1547 - Fixed
DataTable
cursors not resetting to origin onclear()
Textualize#1601 - Fixed TextLog wrapping issue Textualize#1554
- Fixed issue with TextLog not writing anything before layout Textualize#1498
- Fixed an exception when populating a child class of
ListView
purely fromcompose
Textualize#1588 - Fixed freeze in tests Textualize#1608
0.9.1 - 2022-12-30
- Added textual._win_sleep for Python on Windows < 3.11 Textualize#1457
0.9.0 - 2022-12-30
- Added textual.strip.Strip primitive
- Added textual._cache.FIFOCache
- Added an option to clear columns in DataTable.clear() Textualize#1427
- Widget.render_line now returns a Strip
- Fix for slow updates on Windows
- Bumped Rich dependency
0.8.2 - 2022-12-28
- Fixed issue with TextLog.clear() Textualize#1447
0.8.1 - 2022-12-25
- Fix for overflowing tree issue Textualize#1425
0.8.0 - 2022-12-22
- Fixed issues with nested auto dimensions Textualize#1402
- Fixed watch method incorrectly running on first set when value hasn't changed and init=False Textualize#1367
App.dark
can now be set fromApp.on_load
without an error being raised Textualize#1369- Fixed setting
visibility
changes needing arefresh
Textualize#1355
- Added
textual.actions.SkipAction
exception which can be raised from an action to allow parents to process bindings. - Added
textual keys
preview. - Added ability to bind to a character in addition to key name. i.e. you can bind to "." or "full_stop".
- Added TextLog.shrink attribute to allow renderable to reduce in size to fit width.
- Deprecated
PRIORITY_BINDINGS
class variable. - Renamed
char
tocharacter
on Key event. - Renamed
key_name
toname
on Key event. - Queries/
walk_children
no longer includes self in results by default Textualize#1416
0.7.0 - 2022-12-17
- Added
PRIORITY_BINDINGS
class variable, which can be used to control if a widget's bindings have priority by default. Textualize#1343
- Renamed the
Binding
argumentuniversal
topriority
. Textualize#1343 - When looking for bindings that have priority, they are now looked from
App
downwards. Textualize#1343 BINDINGS
on anApp
-derived class have priority by default. Textualize#1343BINDINGS
on aScreen
-derived class have priority by default. Textualize#1343- Added a message parameter to Widget.exit
- Fixed validator not running on first reactive set Textualize#1359
- Ensure only printable characters are used as key_display Textualize#1361
0.6.0 - 2022-12-11
- Added "inherited bindings" -- BINDINGS classvar will be merged with base classes, unless inherit_bindings is set to False
- Added
Tree
widget which replacesTreeControl
. - Added widget
Placeholder
Textualize#1200.
- Rebuilt
DirectoryTree
with newTree
control. - Empty containers with a dimension set to
"auto"
will now collapse instead of filling up the available space. - Container widgets now have default height of
1fr
. - The default
width
of aLabel
is nowauto
.
- Type selectors can now contain numbers Textualize#1253
- Fixed visibility not affecting children Textualize#1313
- Fixed issue with auto width/height and relative children Textualize#1319
- Fixed issue with offset applied to containers Textualize#1256
- Fixed default CSS retrieval for widgets with no
DEFAULT_CSS
that inherited from widgets withDEFAULT_CSS
Textualize#1335 - Fixed merging of
BINDINGS
when binding inheritance is set toNone
Textualize#1351
0.5.0 - 2022-11-20
- Add get_child_by_id and get_widget_by_id, remove get_child Textualize#1146
- Add easing parameter to Widget.scroll_* methods Textualize#1144
- Added Widget.call_later which invokes a callback on idle.
DOMNode.ancestors
no longer includesself
.- Added
DOMNode.ancestors_with_self
, which retains the old behaviour ofDOMNode.ancestors
. - Improved the speed of
DOMQuery.remove
. - Added DataTable.clear
- Added low-level
textual.walk
methods. - It is now possible to
await
aWidget.remove
. Textualize#1094 - It is now possible to
await
aDOMQuery.remove
. Note that this changes the return value ofDOMQuery.remove
, which used to returnself
. Textualize#1094 - Added Pilot.wait_for_animation
- Added
Widget.move_child
Textualize#1121 - Added a
Label
widget Textualize#1190 - Support lazy-instantiated Screens (callables in App.SCREENS) Textualize#1185
- Display of keys in footer has more sensible defaults Textualize#1213
- Add App.get_key_display, allowing custom key_display App-wide Textualize#1213
- Watchers are now called immediately when setting the attribute if they are synchronous. Textualize#1145
- Widget.call_later has been renamed to Widget.call_after_refresh.
- Button variant values are now checked at runtime. Textualize#1189
- Added caching of some properties in Styles object
- Fixed DataTable row not updating after add Textualize#1026
- Fixed issues with animation. Now objects of different types may be animated.
- Fixed containers with transparent background not showing borders Textualize#1175
- Fixed auto-width in horizontal containers Textualize#1155
- Fixed Input cursor invisible when placeholder empty Textualize#1202
- Fixed deadlock when removing widgets from the App Textualize#1219
0.4.0 - 2022-11-08
https://textual.textualize.io/blog/2022/11/08/version-040/#version-040
- Dropped support for mounting "named" and "anonymous" widgets via
App.mount
andWidget.mount
. Both methods now simply take one or more widgets as positional arguments. DOMNode.query_one
now raises aTooManyMatches
exception if there is more than one matching node. Textualize#1096App.mount
andWidget.mount
have newbefore
andafter
parameters Textualize#778
- Added
init
param to reactive.watch CSS_PATH
can now be a list of CSS files Textualize#1079- Added
DOMQuery.only_one
Textualize#1096 - Writes to stdout are now done in a thread, for smoother animation. Textualize#1104
0.3.0 - 2022-10-31
- Fixed issue where scrollbars weren't being unmounted
- Fixed fr units for horizontal and vertical layouts Textualize#1067
- Fixed
textual run
breaking sys.argv Textualize#1064 - Fixed footer not updating styles when toggling dark mode
- Fixed how the app title in a
Header
is centred Textualize#1060 - Fixed the swapping of button variants Textualize#1048
- Fixed reserved characters in screenshots Textualize#993
- Fixed issue with TextLog max_lines Textualize#1058
- DOMQuery now raises InvalidQueryFormat in response to invalid query strings, rather than cryptic CSS error
- Dropped quit_after, screenshot, and screenshot_title from App.run, which can all be done via auto_pilot
- Widgets are now closed in reversed DOM order
- Input widget justify hardcoded to left to prevent text-align interference
- Changed
textual run
so that it patchesargv
in more situations - DOM classes and IDs are now always treated fully case-sensitive Textualize#1047
- Added Unmount event
- Added App.run_async method
- Added App.run_test context manager
- Added auto_pilot to App.run and App.run_async
- Added Widget._get_virtual_dom to get scrollbars
- Added size parameter to run and run_async
- Added always_update to reactive
- Returned an awaitable from push_screen, switch_screen, and install_screen Textualize#1061
0.2.1 - 2022-10-23
- Updated meta data for PyPI
0.2.0 - 2022-10-23
- CSS support
- Too numerous to mention
0.1.18 - 2022-04-30
- Bump typing extensions
0.1.17 - 2022-03-10
- Bumped Rich dependency
0.1.16 - 2022-03-10
- Fixed escape key hanging on Windows
0.1.15 - 2022-01-31
- Added Windows Driver
0.1.14 - 2022-01-09
- Updated Rich dependency to 11.X
0.1.13 - 2022-01-01
- Fixed spurious characters when exiting app
- Fixed increasing delay when exiting
0.1.12 - 2021-09-20
- Added geometry.Spacing
- Fixed calculation of virtual size in scroll views
0.1.11 - 2021-09-12
- Changed message handlers to use prefix handle_
- Renamed messages to drop the Message suffix
- Events now bubble by default
- Refactor of layout
- Added App.measure
- Added auto_width to Vertical Layout, WindowView, an ScrollView
- Added big_table.py example
- Added easing.py example
0.1.10 - 2021-08-25
- Added keyboard control of tree control
- Added Widget.gutter to calculate space between renderable and outside edge
- Added margin, padding, and border attributes to Widget
- Callbacks may be async or non-async.
- Event handler event argument is optional.
- Fixed exception in clock example Textualize#52
- Added Message.wait() which waits for a message to be processed
- Key events are now sent to widgets first, before processing bindings
0.1.9 - 2021-08-06
- Added hover over and mouse click to activate keys in footer
- Added verbosity argument to Widget.log
- Simplified events. Remove Startup event (use Mount)
- Changed geometry.Point to geometry.Offset and geometry.Dimensions to geometry.Size
0.1.8 - 2021-07-17
- Fixed exiting mouse mode
- Fixed slow animation
- New log system
0.1.7 - 2021-07-14
- Added functionality to calculator example.
- Scrollview now shows scrollbars automatically
- New handler system for messages that doesn't require inheritance
- Improved traceback handling