Releases: Textualize/textual
We're not superstitious!
Fix for batch updates
Batch updates would occasionally leave a glitched screen until you moved the mouse.
[0.12.1] - 2023-02-25
Fixed
- Fix for batch update glitch #1880
New disabled property and compose method
Blog post: https://textual.textualize.io/blog/2023/02/24/textual-0120-adds-syntactical-sugar-and-batch-updates/
Some additions to the API. Now all widgets may be disabled. There is a new batch_update
context manager on App, and a prevent
context manager to temporarily prevent message types from being sent. Plus usual fixes. Details below.
[0.12.0] - 2023-02-24
Added
- Added
App.batch_update
#1832 - Added horizontal rule to Markdown #1832
- Added
Widget.disabled
#1785 - Added
DOMNode.notify_style_update
to replacemessages.StylesUpdated
message #1861 - Added
MessagePump.prevent
context manager to temporarily suppress a given message type #1866
Changed
- Scrolling by page now adds to current position.
- Markdown lists have been polished: a selection of bullets, better alignment of numbers, style tweaks #1832
- Added alternative method of composing Widgets #1847
Removed
- Removed
screen.visible_widgets
andscreen.widgets
- Removed
StylesUpdate
message. #1861
Fixed
Massive speed gains in the DataTable!
Getting down with Markdown
This release adds an enhanced Markdown widget. See the blog post for details:
https://textual.textualize.io/blog/2023/02/15/textual-0110-adds-a-beautiful-markdown-widget/
[0.11.0] - 2023-02-15
Added
- Added
TreeNode.expand_all
#1430 - Added
TreeNode.collapse_all
#1430 - Added
TreeNode.toggle_all
#1430 - Added the coroutines
Animator.wait_until_complete
andpilot.wait_for_scheduled_animations
that allow waiting for all current and scheduled animations #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
#1676 - Added App.scroll_sensitivity_x and App.scroll_sensitivity_y to adjust how many lines the scroll wheel moves the scroll position #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 #1433 - Added
Tree.reset
to fully reset aTree
#1437 - Added
DataTable.sort
to sort rows #1638 - Added
DataTable.get_cell
to retrieve a cell by column/row keys #1638 - Added
DataTable.get_cell_at
to retrieve a cell by coordinate #1638 - Added
DataTable.update_cell
to update a cell by column/row keys #1638 - Added
DataTable.update_cell_at
to update a cell at a coordinate #1638 - Added
DataTable.ordered_rows
property to retrieveRow
s as they're currently ordered #1638 - Added
DataTable.ordered_columns
property to retrieveColumn
s as they're currently ordered #1638 - Added
DataTable.coordinate_to_cell_key
to find the key for the cell at a coordinate #1638 - Added
DataTable.is_valid_coordinate
#1638 - Added
DataTable.is_valid_row_index
#1638 - Added
DataTable.is_valid_column_index
#1638 - Added attributes to events emitted from
DataTable
indicating row/column/cell keys #1638 - Added
DataTable.get_row
to retrieve the values from a row by key #1786 - Added
DataTable.get_row_at
to retrieve the values from a row by index #1786 - Added
DataTable.get_column
to retrieve the values from a column by key #1786 - Added
DataTable.get_column_at
to retrieve the values from a column by index #1786 - Added
DataTable.HeaderSelected
which is posted when header label clicked #1788 - Added
DOMNode.watch
andDOMNode.is_attached
methods #1750 - Added
DOMNode.css_tree
which is a renderable that shows the DOM and CSS #1778 - Added
DOMNode.children_view
which is a view on to a nodes children list, use for querying #1778 - Added
Markdown
andMarkdownViewer
widgets. - Added
--screenshot
option totextual run
Changed
- Breaking change:
TreeNode
can no longer be imported fromtextual.widgets
; it is now available viafrom textual.widgets.tree import TreeNode
. #1637 Tree
now shows a (subdued) cursor for a highlighted node when focus has moved elsewhere #1471DataTable.add_row
now acceptskey
argument to uniquely identify the row #1638DataTable.add_column
now acceptskey
argument to uniquely identify the column #1638DataTable.add_row
andDataTable.add_column
now return lists of keys identifying the added rows/columns #1638- Breaking change:
DataTable.get_cell_value
renamed toDataTable.get_value_at
#1638 DataTable.row_count
is now a property #1638- Breaking change:
DataTable.cursor_cell
renamed toDataTable.cursor_coordinate
#1638- The method
validate_cursor_cell
was renamed tovalidate_cursor_coordinate
. - The method
watch_cursor_cell
was renamed towatch_cursor_coordinate
.
- The method
- Breaking change:
DataTable.hover_cell
renamed toDataTable.hover_coordinate
#1638- The method
validate_hover_cell
was renamed tovalidate_hover_coordinate
.
- The method
- Breaking change:
DataTable.data
structure changed, and will be made private in upcoming release #1638 - Breaking change:
DataTable.refresh_cell
was renamed toDataTable.refresh_coordinate
#1638 - Breaking change:
DataTable.get_row_height
now takes aRowKey
argument instead of a row index #1638 - Breaking change:
DataTable.data
renamed toDataTable._data
(it's now private) #1786 - The
_filter
module was made public (now calledfilter
) #1638 - Breaking change: renamed
Checkbox
toSwitch
#1746 App.install_screen
name is no longer optional #1778App.query
now only includes the current screen #1778DOMNode.tree
now displays simple DOM structure only #1778App.install_screen
now returns None rather than AwaitMount #1778DOMNode.children
is now a simple sequence, the NodesList is exposed asDOMNode._nodes
#1778DataTable
cursor can now enter fixed columns #1799
Fixed `textual diagnose` on Python 3.7
A hotfix release for the textual diagnose
command which didn't run on Python 3.7
[0.10.1] - 2023-01-20
Added
- Added Strip.text property #1620
Fixed
- Fixed
textual diagnose
crash on older supported Python versions. #1622
Changed
- The default filename for screenshots uses a datetime format similar to ISO8601, but with reserved characters replaced by underscores #1518
Cursor-tastic release
Version 0.10.0 sees new cursor types on the DataTable to select rows and column, and corresponding events.
datatable-cursors-16jan23.mov
There are also a number of fixes and optimizations. See below for details.
[0.10.0] - 2023-01-19
Added
- Added
TreeNode.parent
-- a read-only property for accessing a node's parent #1397 - Added public
TreeNode
label access viaTreeNode.label
#1396 - Added read-only public access to the children of a
TreeNode
viaTreeNode.children
#1398 - Added
Tree.get_node_by_id
to allow getting a node by its ID #1535 - Added a
Tree.NodeHighlighted
message, giving aon_tree_node_highlighted
event handler #1400 - Added a
inherit_component_classes
subclassing parameter to control whether component classes are inherited from base classes #1399 - Added
diagnose
as atextual
command #1542 - Added
row
andcolumn
cursors toDataTable
#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 #1196
Changed
MouseScrollUp
andMouseScrollDown
now inherit fromMouseEvent
and have attached modifier keys. #1458- Fail-fast and print pretty tracebacks for Widget compose errors #1505
- Added Widget._refresh_scroll to avoid expensive layout when scrolling #1524
events.Paste
now bubbles #1434- Improved error message when style flag
none
is mixed with other flags (e.g., when settingtext-style
) #1420 - Clock color in the
Header
widget now matches the header color #1459 - Programmatic calls to scroll now optionally scroll even if overflow styling says otherwise (introduces a new
force
parameter to all thescroll_*
methods) #1201 COMPONENT_CLASSES
are now inherited from base classes #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
Fixed
- The styles
scrollbar-background-active
andscrollbar-color-hover
are no longer ignored #1480 - The widget
Placeholder
can now have its width set toauto
#1508 - Behavior of widget
Input
when rendering after programmatic value change and related scenarios #1477 #1443 DataTable.show_cursor
now correctly allows cursor toggling #1547- Fixed cursor not being visible on
DataTable
mount whenfixed_columns
were used #1547 - Fixed
DataTable
cursors not resetting to origin onclear()
#1601 - Fixed TextLog wrapping issue #1554
- Fixed issue with TextLog not writing anything before layout #1498
- Fixed an exception when populating a child class of
ListView
purely fromcompose
#1588 - Fixed freeze in tests #1608
The last release of the year, for real this time
Only Python 3.11 has a high resolution sleep by default. This adds a more accurate sleep for windows on Python < 3.11
[0.9.1] - 2022-12-30
Added
- Added textual._win_sleep for Python on Windows < 3.11 #1457
The performance release
No new functionality so speak of, but performance has improved over the 0.8.x version. A change to how rendered content is stored has made updates faster.
There is also a fix for slow updates on Windows. See this blog post for details.
This is likely the last release of the year, so I would like to share this music video which seems strangely appropriate.
https://www.youtube.com/watch?v=kAFxLXqP8UM&ab_channel=Nightwish
[0.9.0] - 2022-12-30
Added
- Added textual.strip.Strip primitive
- Added textual._cache.FIFOCache
- Added an option to clear columns in DataTable.clear() #1427
Changed
- Widget.render_line now returns a Strip
- Fix for slow updates on Windows
- Bumped Rich dependency