v3.1.0
Textualize/textualv3.1.0Apr 12, 2025by willmcgugan
AI Summary
Fixed numerous issues regarding markup, sizing, and selection. Enhanced notifications to use content markup and converted dim attributes to RGB by default.
Key Highlights
- Notifications now use content markup
- Textual converts dim attributes to RGB by default
- Added TEXTUAL_DIM_FACTOR env var to set dim opacity
New Features
- Added TEXTUAL_DIM_FACTOR env var
- Added Screen.text_selection_started_signal
- Added App.clear_selection() helper method
Full Release Notes
Mostly fixes, some API enhancements. See below. ## [3.1.0] - 2025-04-12 ### Fixed - Fixed markup escaping edge cases https://github.com/Textualize/textual/pull/5697 - Fixed incorrect auto height in Collapsible https://github.com/Textualize/textual/pull/5703 - Fixed issue with keymaps and single-letter keys https://github.com/Textualize/textual/pull/5726 - Fixed `OptionList` size after removing or clearing options https://github.com/Textualize/textual/issues/5728 - Fixed footer / key panel not updating when keymaps are applied https://github.com/Textualize/textual/pull/5724 - Fixed alignment not being applied when there are min and max limits on dimensions https://github.com/Textualize/textual/pull/5732 - Fixed issues with OptionList scrollbar not updating https://github.com/Textualize/textual/pull/5736 - Fixed allow_focus method not overriding `can_focus()` https://github.com/Textualize/textual/pull/5737 - Fixed overlap of Input / TextArea selection with arbitrary text selection https://github.com/Textualize/textual/pull/5739 ### Changed - Collapsible title now accepts str, Text, or Content https://github.com/Textualize/textual/pull/5697 - Rich Text objects will be converted to Content in OptionList and other widgets https://github.com/Textualize/textual/pull/5712 - Textual will always convert dim attributes to RGB by default https://github.com/Textualize/textual/pull/5715 - Notifications will now use content markup (previously they used Console markup) https://github.com/Textualize/textual/pull/5719 ### Added - Added `TEXTUAL_DIM_FACTOR` env var to set the opacity of the 'dim' ANSI attribute https://github.com/Textualize/textual/pull/5715 - `notify()` now accepts a `markup` parameter to disable rendering the message as markup https://github.com/Textualize/textual/pull/5719 - Added `Screen.text_selection_started_signal` https://github.com/Textualize/textual/pull/5739 - Added `App.clear_selection()` helper method to clear arbitrary text selection of active screen https://github.com/Textualize/textual/pull/5739