Releases: Textualize/textual
The Life Universe and Everything release!
Some fixes, improvements, and updates to Pilot (used in testing).
Also some significant improvements in rendering speed.
A few minor breaking changes, see below for details...
[0.42.0] - 2023-11-22
Fixed
- Duplicate CSS errors when parsing CSS from a screen #3581
- Added missing
blurpseudo class #3439 - Fixed visual glitched characters on Windows due to Python limitation #2548
- Fixed
ScrollableContainerto receive focus #3632 - Fixed app-level queries causing a crash when the command palette is active #3633
- Fixed outline not rendering correctly in some scenarios (e.g. on Button widgets) #3628
- Fixed live-reloading of screen CSS #3454
Select.valuecould be in an invalid state #3612- Off-by-one in CSS error reporting #3625
- Loading indicators and app notifications overlapped in the wrong order #3677
- Widgets being loaded are disabled and have their scrolling explicitly disabled too #3677
- Method render on a widget could be called before mounting said widget #2914
Added
- Exceptions to
textual.widgets.select#3614InvalidSelectValueErrorfor when setting aSelectto an invalid valueEmptySelectErrorwhen creating/setting aSelectto have no options whenallow_blankisFalse
Selectmethods #3614clearis_blank
- Constant
Select.BLANKto flag an empty selection #3614 - Added
restrict,type,max_length, andvalid_emptyto Input #3657 - Added
Pilot.mouse_downto simulateMouseDownevents #3495 - Added
Pilot.mouse_upto simulateMouseUpevents #3495 - Added
Widget.is_mountedproperty #3709
Changed
- CSS error reporting will no longer provide links to the files in question #3582
- inline CSS error reporting will report widget/class variable where the CSS was read from #3582
- Breaking change: Setting
Select.valuetoNoneno longer clears the selection (SeeSelect.BLANKandSelect.clear) #3614 - Breaking change:
Buttonno longer inherits fromStatic, now it inherits directly fromWidget#3603 - Rich markup in markdown headings is now escaped when building the TOC #3689
- Mechanics behind mouse clicks. See this for more details. #3495
- Breaking change: max/min-width/height now includes padding and border. #3712
The scarily good release
Just in time for Halloween, we have a new release. There are a lot of fixes, and improvement to startup time. A few breaking changes that are unlikely to impact many people.
We also reached the scary milestone of 666 forks!
[0.41.0] - 2023-10-31
Fixed
- Fixed
Input.cursor_blinkreactive not changing blink state afterInputwas mounted #3498 - Fixed
Tabs.activeattribute value not being re-assigned after removing a tab or clearing #3498 - Fixed
DirectoryTreerace-condition crash when changing path #3498 - Fixed issue with
LRUCache.discard#3537 - Fixed
DataTablenot scrolling to rows that were just added #3552 - Fixed cache bug with
DataTable.update_cell#3551 - Fixed CSS errors being repeated #3566
- Fix issue with chunky highlights on buttons #3571
- Fixed
OptionListevent leakage fromCommandPalettetoApp. - Fixed crash in
LoadingIndicator#3498 - Fixed crash when
Tabsappeared as a descendant ofTabbedContentin the DOM #3602 - Fixed the command palette cancelling other workers #3615
Added
- Add Document
get_index_from_location/get_location_from_index#3410 - Add setter for
TextArea.text#3525 - Added
keyargument to theDataTable.sort()method, allowing the table to be sorted using a custom function (or other callable) #3090 - Added
initialto all css rules, which restores default (i.e. value from DEFAULT_CSS) #3566 - Added HorizontalPad to pad.py #3571
- Added
AwaitCompleteclass, to be used for optionally awaitable return values #3498
Changed
- Breaking change:
Button.ACTIVE_EFFECT_DURATIONclassvar converted toButton.active_effect_durationattribute #3498 - Breaking change:
Input.blink_timermade private (renamed toInput._blink_timer) #3498 - Breaking change:
Input.cursor_blinkreactive updated to not run on mount (nowinit=False) #3498 - Breaking change:
AwaitTabbedContentclass removed #3498 - Breaking change:
Tabs.remove_tabnow returns anAwaitCompleteinstead of anAwaitRemove#3498 - Breaking change:
Tabs.clearnow returns anAwaitCompleteinstead of anAwaitRemove#3498 TabbedContent.add_panenow returns anAwaitCompleteinstead of anAwaitTabbedContent#3498TabbedContent.remove_panenow returns anAwaitCompleteinstead of anAwaitTabbedContent#3498TabbedContent.clear_panenow returns anAwaitCompleteinstead of anAwaitTabbedContent#3498Tabs.add_tabnow returns anAwaitCompleteinstead of anAwaitMount#3498DirectoryTree.reloadnow returns anAwaitComplete, which may be awaited to ensure the node has finished being processed by the internal queue #3498Tabs.remove_tabnow returns anAwaitComplete, which may be awaited to ensure the tab is unmounted and internal state is updated #3498App.switch_modenow returns anAwaitMount, which may be awaited to ensure the screen is mounted #3498- Buttons will now display multiple lines, and have auto height #3539
- DataTable now has a max-height of 100vh rather than 100%, which doesn't work with auto
- Breaking change: empty rules now result in an error #3566
- Improved startup time by caching CSS parsing #3575
- Workers are now created/run in a thread-safe way #3586
The loading release
You can now set widget.loading=True to replace the widget with a loading indicator.
https://twitter.com/willmcgugan/status/1712104087213297791
[0.40.0] - 2023-10-11
- Added
loadingreactive property to widgets #3509
The invisible scrollbar release
A mixed bag of fixes and API improvements.
Notable breaking change is that the tree-sitter code has been split out. If you need syntax highlighting in the TextArea, you can install it with this:
pip install "textual[syntax]"
[0.39.0] - 2023-10-10
Fixed
Pilot.click/Pilot.hovercan't useScreenas a selector #3395- App exception when a
Treeis initialized/mounted withdisabled=True#3407 - Fixed
printlocations not being correctly reported intextual console#3237 - Fix location of IME and emoji popups #3408
- Fixed application freeze when pasting an emoji into an application on Windows #3178
- Fixed duplicate option ID handling in the
OptionList#3455 - Fix crash when removing and updating DataTable cell at same time #3487
- Fixed fractional styles to allow integer values #3414
- Stop eating stdout/stderr in headless mode - print works again in tests #3486
Added
OutOfBoundsexception to be raised byPilot#3360TextArea.cursor_screen_offsetproperty for getting the screen-relative position of the cursor #3408Input.cursor_screen_offsetproperty for getting the screen-relative position of the cursor #3408- Reactive
cell_padding(and respective parameter) to define horizontal cell padding in data table columns #3435 - Added
Input.clearmethod #3430 - Added
TextArea.SelectionChangedandTextArea.Changedmessages #3442 - Added
wait_for_dismissparameter toApp.push_screen#3477 - Allow scrollbar-size to be set to 0 to achieve scrollable containers with no visible scrollbars #3488
Changed
- Breaking change: tree-sitter and tree-sitter-languages dependencies moved to
syntaxextra #3398 Pilot.click/Pilot.hovernow raisesOutOfBoundswhen clicking outside visible screen #3360Pilot.click/Pilot.hovernow return a Boolean indicating whether the click/hover landed on the widget that matches the selector #3360- Added a delay to when the
No Matchesmessage appears in the command palette, thus removing a flicker #3399
The hotfixed Textarea release
The TextArea has landed release
https://textual.textualize.io/blog/2023/09/21/textual-0380-adds-a-syntax-aware-textarea/
[0.38.0] - 2023-09-21
Added
- Added a TextArea #2931
- Added :dark and :light pseudo classes
Fixed
- Fixed
DataTablenot updating component styles on hot-reloading #3312
Changed
- Breaking change: CSS in DEFAULT_CSS is now automatically scoped to the widget (set SCOPED_CSS=False) to disable
Whoah, time out!
Hotfix for a TimeoutError
[0.37.1] - 2023-09-16
Fixed
- Fixed the command palette crashing with a
TimeoutErrorin any Python before 3.11 #3320 - Fixed
Inputevent leakage fromCommandPalettetoApp.
The Commanding release
https://textual.textualize.io/blog/2023/09/15/textual-0370-adds-a-command-palette/
[0.37.0] - 2023-09-15
Added
- Added the command palette #3058
Inputis now validated when focus moves out of it #3193- Attribute
Input.validate_on(and__init__parameter of the same name) to customise when validation occurs #3193 - Screen-specific (sub-)title attributes #3199:
Screen.TITLEScreen.SUB_TITLEScreen.titleScreen.sub_title
- Properties
Header.screen_titleandHeader.screen_sub_title#3199 - Added
DirectoryTree.DirectorySelectedmessage #3200 - Added
widgets.Collapsiblecontributed by Sunyoung Yoo #2989
Fixed
- Fixed a crash when removing an option from an
OptionListwhile the mouse is hovering over the last option #3270 - Fixed a crash in
MarkdownViewerwhen clicking on a link that contains an anchor #3094 - Fixed wrong message pump in pop_screen #3315
Changed
The Rule release
[0.36.0] - 2023-09-05
Added
- TCSS styles
layerandlayerscan be strings #3169 App.return_codefor the app return code #3202- Added
animateswitch toTree.scroll_to_lineandTree.scroll_to_node#3210 - Added
Rulewidget #3209 - Added App.current_mode to get the current mode #3233
Changed
- Reactive callbacks are now scheduled on the message pump of the reactable that is watching instead of the owner of reactive attribute #3065
- Callbacks scheduled with
call_nextwill now have the same prevented messages as when the callback was scheduled #3065 - Added
cursor_typeto theDataTableconstructor. - Fixed
push_screennot updating Screen.CSS styles #3217
Fixed
v0.35.1: version bump (#3181)
[0.35.1]
Fixed
- Fixed flash of 80x24 interface in textual-web