The "As of some one gently wrapping, wrapping at my chamber door" release.
The highlight of this release is the addition of soft wrapping to the TextArea, which you can see below:
soft-wrapping-demo.mp4
This makes TextArea one of our most powerful widgets. Looking forward to seeing what you build with it!
Note there is a breaking change here. The TextArea now defaults to a multi-line soft-wrapped editor rather than a more code oriented editor. If you want the original behaviour, use the code_editor
classmethod. i.e. replace TextArea
with TextArea.code_editor
.
Also in this release is a new suspend
decorator which will temporarily suspend the currently running app and allow you to launch another terminal app (which doesn't even need to be a Textual app).
There are plenty of other fixes and enhancements. See below for the full details...
[0.48.0] - 2023-02-01
Changed
- Breaking change: Significant changes to
TextArea.__init__
default values/behaviour #3933soft_wrap=True
- soft wrapping is now enabled by default.show_line_numbers=False
- line numbers are now disabled by default.tab_behaviour="focus"
- pressing the tab key now switches focus instead of indenting by default.
- Breaking change:
TextArea
default theme changed to CSS, and default styling changed #4074 - Breaking change:
DOMNode.has_pseudo_class
now accepts a single name only #3970 - Made
textual.cache
(formerlytextual._cache
) public #3976 Tab.label
can now be used to change the label of a tab #3979- Changed the default notification timeout from 3 to 5 seconds #4059
- Prior scroll animations are now cancelled on new scrolls #4081
Added
- Added
DOMNode.has_pseudo_classes
#3970 - Added
Widget.allow_focus
andWidget.allow_focus_children
#3989 - Added
TextArea.soft_wrap
reactive attribute added #3933 - Added
TextArea.tab_behaviour
reactive attribute added #3933 - Added
TextArea.code_editor
classmethod/alternative constructor #3933 - Added
TextArea.wrapped_document
attribute which can convert between wrapped visual coordinates and locations #3933 - Added
show_line_numbers
toTextArea.__init__
#3933 - Added component classes allowing
TextArea
to be styled using CSS #4074 - Added
Query.blur
andQuery.focus
#4012 - Added
MessagePump.message_queue_size
#4012 - Added
TabbedContent.active_pane
#4012 - Added
App.suspend
#4064 - Added
App.action_suspend_process
#4064
Fixed
- Parameter
animate
fromDataTable.move_cursor
was being ignored #3840 - Fixed a crash if
DirectoryTree.show_root
was set before the DOM was fully available #2363 - Live reloading of TCSS wouldn't apply CSS changes to screens under the top screen of the stack #3931
SelectionList
option IDs are usable as soon as the widget is instantiated #3903- Fix issue with
Strip.crop
when crop window start aligned with strip end #3998 - Fixed Strip.crop_extend #4011
- Fix for percentage dimensions #4037
- Fixed a crash if the
TextArea
language was set but tree-sitter language binaries were not installed #4045 - Ensuring
TextArea.SelectionChanged
message only sends when the updated selection is different #3933 - Fixed declaration after nested rule set causing a parse error #4012
- ID and class validation was too lenient #3954
- Fixed CSS watcher crash if file becomes unreadable (even temporarily) #4079
- Fixed display of keys when used in conjunction with other keys #3050
- Fixed double detection of Escape on Windows #4038