Releases: Textualize/textual
Releases · Textualize/textual
The sparkly release
[0.27.0] - 2023-06-01
Fixed
- Fixed zero division error #2673
- Fix
scroll_to_centerwhen there were nested layers out of view (Compositor full_map not populated fully) #2684 - Fix crash when
Selectwidget value attribute was set incompose#2690 - Issue with computing progress in workers #2686
- Issues with
switch_screennot updating the results callback appropriately #2650 - Fixed incorrect mount order #2702
Added
workdecorator acceptsdescriptionparameter to add debug string #2597- Added
SelectionListwidget #2652 App.AUTO_FOCUSto set auto focus on all screens #2594- Option to
scroll_to_centerto ensure we don't scroll such that the top left corner of the widget is not visible #2682 - Added
Widget.tooltipproperty #2670 - Added
Region.inflect#2670 SuggesterAPI to compose with widgets for automatic suggestions #2330SuggestFromListclass to let widgets get completions from a fixed set of options #2604Inputhas a new component classinput--suggestion#2604- Added
Widget.remove_children#2657 - Added
Validatorframework and validation forInput#2600 - Added
message_hookto App.run_test #2702
Changed
Placeholdernow sets its color cycle per app #2590- Footer now clears key highlight regardless of whether it's in the active screen or not #2606
- The default Widget repr no longer displays classes and pseudo-classes (to reduce noise in logs). Add them to your
__rich_repr__method if needed. #2623 - Setting
Screen.AUTO_FOCUStoNonewill inheritAUTO_FOCUSfrom the app instead of disabling it #2594 - Setting
Screen.AUTO_FOCUSto""will disable it on the screen #2594 - Messages now have a
handler_nameclass var which contains the name of the default handler method. Message.controlis now a property instead of a class variable. #2528TreeandDirectoryTreeMessages no longer accept atreeparameter, usingself.node.treeinstead. #2529- Keybinding right in
Inputis also used to accept a suggestion if the cursor is at the end of the input #2604 Input.__init__now accepts asuggesterattribute for completion suggestions #2604- Using
switch_screento switch to the currently active screen is now a no-op #2692
Removed
Placeholder.reset_color_cycle- Removed
Widget.reset_focus(now calledWidget.blur) #2642
The Trogon release
New behaviour related to focus. If a newly focused widget is not in view, then it will scroll to center. This more closely matches how browsers behave.
[0.26.0] - 2023-05-20
Added
- Added Widget.can_view
Changed
- Textual will now scroll focused widgets to center if not in view
Focusing on fixes
[0.25.0] - 2023-05-17
Changed
- App
titleandsub_titleattributes can be set to any type #2521 DirectoryTreenow loads directory contents in a worker #2456- Only a single error will be written by default, unless in dev mode ("debug" in App.features) #2480
- Using
Widget.move_childwhere the target and the child being moved are the same is now a no-op #1743 - Calling
dismisson a screen that is not at the top of the stack now raises an exception #2575 MessagePump.call_after_refreshandMessagePump.call_laterwill now returnFalseif the callback could not be scheduled. #2584
Fixed
- Fixed
ZeroDivisionErrorinresolve_fraction_unit#2502 - Fixed
TreeNode.expandandTreeNode.expand_allnot posting aTree.NodeExpandedmessage #2535 - Fixed
TreeNode.collapseandTreeNode.collapse_allnot posting aTree.NodeCollapsedmessage #2535 - Fixed
TreeNode.toggleandTreeNode.toggle_allnot posting aTree.NodeExpandedorTree.NodeCollapsedmessage #2535 footer--descriptioncomponent class was being ignored #2544- Pasting empty selection in
Inputwould raise an exception #2563 Screen.AUTO_FOCUSnow focuses the first focusable widget that matches the selector #2578Screen.AUTO_FOCUSnow works on the default screen on startup #2581- Fix for setting dark in App
__init__#2583 - Fix issue with scrolling and docks #2525
- Fix not being able to use CSS classes with
Tab#2589
Added
- Class variable
AUTO_FOCUSto screens #2457 - Added
NULL_SPACINGandNULL_REGIONto geometry.py
Fixes an error in the code browser example
[0.24.1] - 2023-05-08
Fixed
- Fix TypeError in code browser
The King of releases
https://textual.textualize.io/blog/2023/05/08/textual-0240-adds-a-select-control/
[0.24.0] - 2023-05-08
Fixed
- Fixed crash when creating a
DirectoryTreestarting anywhere other than. - Fixed line drawing in
TreewhenTree.show_rootisTrue#2397 - Fixed line drawing in
Treenot marking branches as selected when first getting focus #2397
Changed
- The DataTable cursor is now scrolled into view when the cursor coordinate is changed programmatically #2459
- run_worker exclusive parameter is now
Falseby default #2470 - Added
always_updateas an optional argument forreactive.var - Made Binding description default to empty string, which is equivalent to show=False #2501
- Modified Message to allow it to be used as a dataclass #2501
- Decorator
@onaccepts arbitrary**kwargsto apply selectors to attributes of the message #2498
Added
- Property
controlas alias for attributetabsinTabsmessages #2483 - Experimental: Added "overlay" rule #2501
- Experimental: Added "constrain" rule #2501
- Added textual.widgets.Select #2501
- Added Region.translate_inside #2501
TabbedContentnow takes kwargsid,name,classes, anddisabled, upon initialization, like other widgets #2497- Method
DataTable.move_cursor#2472 - Added
OptionList.add_options#2508 - Added
TreeNode.is_root#2510 - Added
TreeNode.remove_children#2510 - Added
TreeNode.remove#2510 - Added classvar
Message.ALLOW_SELECTOR_MATCH#2498 - Added
ALLOW_SELECTOR_MATCHto all built-in messages associated with widgets #2498 - Markdown document sub-widgets now reference the container document
- Table of contents of a markdown document now references the document
- Added the
controlproperty to messagesDirectoryTree.FileSelectedListViewHighlightedSelected
MarkdownTableOfContentsUpdatedTableOfContentsSelectedLinkClicked
OptionListOptionHighlightedOptionSelected
RadioSet.ChangedTabContent.TabActivatedTreeNodeSelectedNodeHighlightedNodeExpandedNodeCollapsed
The On decorator
https://textual.textualize.io/blog/2023/05/03/textual-0230-improves-message-handling/
[0.23.0] - 2023-05-03
Fixed
- Fixed
outlinetop and bottom not handling alpha - #2371 - Fixed
!importantnot applying toalign#2420 - Fixed
!importantnot applying toborder#2420 - Fixed
!importantnot applying tocontent-align#2420 - Fixed
!importantnot applying tooutline#2420 - Fixed
!importantnot applying tooverflow#2420 - Fixed
!importantnot applying toscrollbar-size#2420 - Fixed
outline-rightnot being recognised #2446
Changed
- Setting attributes with a
compute_method will now raise anAttributeError#2383 - Unknown psuedo-selectors will now raise a tokenizer error (previously they were silently ignored) #2445
- Breaking change:
DirectoryTree.FileSelected.pathis now always aPath#2448 - Breaking change:
Directorytree.load_directoryrenamed toDirectorytree._load_directory#2448 - Unknown pseudo-selectors will now raise a tokenizer error (previously they were silently ignored) #2445
Added
Fix run on Windows
[0.22.3] - 2023-04-29
Fixed
- Fixed
textual runon Windows #2406 - Fixed top border of button hover state