v0.73.0
Textualize/textualv0.73.0Jul 18, 2024by willmcgugan
AI Summary
A comprehensive release featuring DataTable optimizations, a gradient feature for the ProgressBar, and various fixes for tabs, scrolling, and tree navigation.
Key Highlights
- Significant performance optimizations for DataTable.
- Added gradient parameter to the ProgressBar widget.
- Improved `TreeNode` positioning with `before` and `after` arguments.
- Fixed issue where disabled tabs in `Tabs` could still be activated.
New Features
- `TextArea.line_number_start`
- `TextArea.matching_bracket_location`
- `DOMNode.mutate_reactive`
- `textual.color.Gradient` quality parameter
- `Gradient.get_rich_color`
- `Widget.remove_children` iterable support
- `Tree.move_cursor`
- `Footer` component style padding handling
- `StringKey` export from `data_table`
- `TreeNode` `before` and `after` arguments
- `ProgressBar` gradient
Full Release Notes
This is a rather large release. Lots of fixes and enhancements, including optimizations to the DataTable. There's also a rather nifty addition to the `ProgressBar` widget. Checkout the gradient: https://github.com/user-attachments/assets/adee9cf8-ace6-4ca0-b9fe-13861a9c0bcf We've also polished the API docs, which should hopefully make them easier to navigate... https://textual.textualize.io/api/app/ ## [0.73.0] - 2024-07-18 ### Added - Added `TextArea.line_number_start` reactive attribute https://github.com/Textualize/textual/pull/4471 - Added `TextArea.matching_bracket_location` property https://github.com/Textualize/textual/pull/4764 - Added `DOMNode.mutate_reactive` https://github.com/Textualize/textual/pull/4731 - Added "quality" parameter to `textual.color.Gradient` https://github.com/Textualize/textual/pull/4739 - Added `textual.color.Gradient.get_rich_color` https://github.com/Textualize/textual/pull/4739 - `Widget.remove_children` now accepts an iterable if widgets in addition to a selector https://github.com/Textualize/textual/issues/4735 - Raise `ValueError` with improved error message when number of cells inserted using `DataTable.add_row` doesn't match the number of columns in the table https://github.com/Textualize/textual/pull/4742 - Add `Tree.move_cursor` to programmatically move the cursor without selecting the node https://github.com/Textualize/textual/pull/4753 - Added `Footer` component style handling of padding for the key/description https://github.com/Textualize/textual/pull/4651 - `StringKey` is now exported from `data_table` https://github.com/Textualize/textual/pull/4760 - `TreeNode.add` and `TreeNode.add_leaf` now accepts `before` and `after` arguments to position a new node https://github.com/Textualize/textual/pull/4772 - Added a `gradient` parameter to the `ProgressBar` widget https://github.com/Textualize/textual/pull/4774 ### Fixed - Fixed issue with `Tabs` where disabled tabs could still be activated by clicking the underline https://github.com/Textualize/textual/issues/4701 - Fixed scroll_visible with margin https://github.com/Textualize/textual/pull/4719 - Fixed programmatically disabling button stuck in hover state https://github.com/Textualize/textual/pull/4724 - Fixed `DataTable` poor performance on startup and focus change when rows contain multi-line content https://github.com/Textualize/textual/pull/4748 - Fixed `Tree` and `DirectoryTree` horizontal scrolling off-by-2 https://github.com/Textualize/textual/pull/4744 - Fixed text-opacity in component styles https://github.com/Textualize/textual/pull/4747 - Ensure `Tree.select_node` sends `NodeSelected` message https://github.com/Textualize/textual/pull/4753 - Fixed message handlers not working when message types are assigned as the value of class vars https://github.com/Textualize/textual/pull/3940 - Fixed `CommandPalette` not focusing the input when opened when `App.AUTO_FOCUS` doesn't match the input https://github.com/Textualize/textual/pull/4763 - `SelectionList.SelectionToggled` will now be sent for each option when a bulk toggle is performed (e.g. `toggle_all`). Previously no messages were sent at all. https://github.com/Textualize/textual/pull/4759 - Fixed focus styles not being updated on blur https://github.com/Textualize/textual/pull/4771 ### Changed - "Discover" hits in the command palette are no longer sorted alphabetically https://github.com/Textualize/textual/pull/4720 - `TreeNodeSelected` messages are now posted before `TreeNodeExpanded` messages when an expandable node is selected https://github.com/Textualize/textual/pull/4753 - `Markdown.LinkClicked.href` is now automatically unquoted https://github.com/Textualize/textual/pull/4749 - The mouse cursor hover effect of `Tree` and `DirectoryTree` will no longer linger after the mouse leaves the widget https://github.com/Textualize/textual/pull/4766