v0.80.0

Textualize/textualv0.80.0Sep 23, 2024by willmcgugan

AI Summary

Large release featuring the new MaskedInput widget, ANSI color support, and various styling improvements.

Key Highlights

  • New MaskedInput widget
  • Input validation improvements (underscores)
  • ANSI color switch and pseudo-class support

Breaking Changes

  • Changed how scrollbars are rendered (visual but breaks snapshots)
  • Input validation for integers no longer accepts scientific notation

New Features

  • MaskedInput widget
  • Input validation for floats and integers accepts embedded underscores
  • Support for 'none' value in dock, hatch, split, box, and border styles
  • ansi_color switch and :ansi pseudo class
  • TreeNode.siblings and Tree center_scroll and unselect
  • TreeNode helper methods

Full Release Notes

This is a large release!

The feature I am most excited about is the new [MaskedInput](https://textual.textualize.io/widget_gallery/#maskedinput) widget, a contribution by [Angelo Mottola](https://github.com/amottola). Here's a quick preview:


https://github.com/user-attachments/assets/c5256c50-f673-4f91-947d-7803e5c8d263

Here's the full release notes...


## [0.80.0] - 2024-09-23

### Added

- Added `MaskedInput` widget https://github.com/Textualize/textual/pull/4783
- Input validation for floats and integers accept embedded underscores, e.g., "1_234_567" is valid. https://github.com/Textualize/textual/pull/4784
- Support for `"none"` value added to `dock`, `hatch` and `split` styles https://github.com/Textualize/textual/pull/4982
- Support for `"none"` added to box and border style properties (e.g `widget.style.border = "none"`) https://github.com/Textualize/textual/pull/4982
- Docstrings added to most style properties https://github.com/Textualize/textual/pull/4982
- Added `ansi_color` switch to App to permit ANSI (themed) colors https://github.com/Textualize/textual/pull/5000
- Added `:ansi` pseudo class https://github.com/Textualize/textual/pull/5000
- Added `-ansi-scrollbar` style to widgets https://github.com/Textualize/textual/pull/5000
- Added `App.INLINE_PADDING` to define the number of spaces above inline apps https://github.com/Textualize/textual/pull/5000
- Added `nocolor` psuedoclass when NO_COLOR env var is set
- `BINDING_GROUP_TITLE` now defaults to `None` https://github.com/Textualize/textual/pull/5023
- Added `TreeNode.siblings`, `TreeNode.next_sibling`, `TreeNode.previous_sibling`, `TreeNode.is_collapsed` https://github.com/Textualize/textual/pull/5023
- Added additional bindings to Tree widget https://github.com/Textualize/textual/pull/5023
- Added `Tree.center_scroll` https://github.com/Textualize/textual/pull/5023
- Added `Tree.unselect` https://github.com/Textualize/textual/pull/5023


### Changed

- Input validation for integers no longer accepts scientific notation like '1.5e2'; must be castable to int. https://github.com/Textualize/textual/pull/4784
- Default `scrollbar-size-vertical` changed to `2` in inline styles to match Widget default CSS (unlikely to affect users) https://github.com/Textualize/textual/pull/4982
- Removed border-right from `Toast` https://github.com/Textualize/textual/pull/4984
- Some fixes in `RichLog` result in slightly different semantics, see docstrings for details https://github.com/Textualize/textual/pull/4978
- Changed how scrollbars are rendered (will have no visual effect, but will break snapshot tests) https://github.com/Textualize/textual/pull/5000
- Added `enabled` switch to filters (mostly used internally) https://github.com/Textualize/textual/pull/5000
- `BINDING_GROUP_TITLE` now defaults to `None` https://github.com/Textualize/textual/pull/5023
- Breaking change: Changed how scrollbars are rendered so they work in ansi mode (will break snapshots) https://github.com/Textualize/textual/pull/5023

### Fixed

- Input validation of floats no longer accepts NaN (not a number). https://github.com/Textualize/textual/pull/4784
- Fixed issues with screenshots by simplifying segments only for snapshot tests https://github.com/Textualize/textual/issues/4929
- Fixed `RichLog.write` not respecting `width` parameter https://github.com/Textualize/textual/pull/4978
- Fixed `RichLog` writing at wrong width when `write` occurs before width is known (e.g. in `compose` or `on_mount`) https://github.com/Textualize/textual/pull/4978
- Fixed `RichLog.write` incorrectly shrinking width to `RichLog.min_width` when `shrink=True` (now shrinks to fit content area instead) https://github.com/Textualize/textual/pull/4978
- Fixed flicker when setting `dark` reactive on startup https://github.com/Textualize/textual/pull/4989
- Fixed command palette not sorting search results by their match score https://github.com/Textualize/textual/pull/4994
- Fixed `DataTable` cached height issue on re-populating the table when using auto-height rows https://github.com/Textualize/textual/pull/4992
- Fixed inline app output being cleared when `inline_no_clear=True` https://github.com/Textualize/textual/issues/5019