Skip to content

Releases: Textualize/textual

The sparkly release

01 Jun 10:37
58a9cb1

Choose a tag to compare

https://textual.textualize.io/blog/2023/06/01/textual-adds-sparklines-selection-list-input-validation-and-tool-tips/

[0.27.0] - 2023-06-01

Fixed

  • Fixed zero division error #2673
  • Fix scroll_to_center when there were nested layers out of view (Compositor full_map not populated fully) #2684
  • Fix crash when Select widget value attribute was set in compose #2690
  • Issue with computing progress in workers #2686
  • Issues with switch_screen not updating the results callback appropriately #2650
  • Fixed incorrect mount order #2702

Added

  • work decorator accepts description parameter to add debug string #2597
  • Added SelectionList widget #2652
  • App.AUTO_FOCUS to set auto focus on all screens #2594
  • Option to scroll_to_center to ensure we don't scroll such that the top left corner of the widget is not visible #2682
  • Added Widget.tooltip property #2670
  • Added Region.inflect #2670
  • Suggester API to compose with widgets for automatic suggestions #2330
  • SuggestFromList class to let widgets get completions from a fixed set of options #2604
  • Input has a new component class input--suggestion #2604
  • Added Widget.remove_children #2657
  • Added Validator framework and validation for Input #2600
  • Added message_hook to App.run_test #2702

Changed

  • Placeholder now 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_FOCUS to None will inherit AUTO_FOCUS from the app instead of disabling it #2594
  • Setting Screen.AUTO_FOCUS to "" will disable it on the screen #2594
  • Messages now have a handler_name class var which contains the name of the default handler method.
  • Message.control is now a property instead of a class variable. #2528
  • Tree and DirectoryTree Messages no longer accept a tree parameter, using self.node.tree instead. #2529
  • Keybinding right in Input is also used to accept a suggestion if the cursor is at the end of the input #2604
  • Input.__init__ now accepts a suggester attribute for completion suggestions #2604
  • Using switch_screen to switch to the currently active screen is now a no-op #2692

Removed

  • Placeholder.reset_color_cycle
  • Removed Widget.reset_focus (now called Widget.blur) #2642

The Trogon release

20 May 10:33
7d0d1ac

Choose a tag to compare

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

17 May 15:32
ff56650

Choose a tag to compare

[0.25.0] - 2023-05-17

Changed

  • App title and sub_title attributes can be set to any type #2521
  • DirectoryTree now 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_child where the target and the child being moved are the same is now a no-op #1743
  • Calling dismiss on a screen that is not at the top of the stack now raises an exception #2575
  • MessagePump.call_after_refresh and MessagePump.call_later will now return False if the callback could not be scheduled. #2584

Fixed

  • Fixed ZeroDivisionError in resolve_fraction_unit #2502
  • Fixed TreeNode.expand and TreeNode.expand_all not posting a Tree.NodeExpanded message #2535
  • Fixed TreeNode.collapse and TreeNode.collapse_all not posting a Tree.NodeCollapsed message #2535
  • Fixed TreeNode.toggle and TreeNode.toggle_all not posting a Tree.NodeExpanded or Tree.NodeCollapsed message #2535
  • footer--description component class was being ignored #2544
  • Pasting empty selection in Input would raise an exception #2563
  • Screen.AUTO_FOCUS now focuses the first focusable widget that matches the selector #2578
  • Screen.AUTO_FOCUS now 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_FOCUS to screens #2457
  • Added NULL_SPACING and NULL_REGION to geometry.py

Fixes an error in the code browser example

08 May 17:44
e3115c5

Choose a tag to compare

[0.24.1] - 2023-05-08

Fixed

  • Fix TypeError in code browser

The King of releases

08 May 16:48
dc10256

Choose a tag to compare

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 DirectoryTree starting anywhere other than .
  • Fixed line drawing in Tree when Tree.show_root is True #2397
  • Fixed line drawing in Tree not 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 False by default #2470
  • Added always_update as an optional argument for reactive.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 @on accepts arbitrary **kwargs to apply selectors to attributes of the message #2498

Added

  • Property control as alias for attribute tabs in Tabs messages #2483
  • Experimental: Added "overlay" rule #2501
  • Experimental: Added "constrain" rule #2501
  • Added textual.widgets.Select #2501
  • Added Region.translate_inside #2501
  • TabbedContent now takes kwargs id, name, classes, and disabled, 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_MATCH to 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 control property to messages
    • DirectoryTree.FileSelected
    • ListView
      • Highlighted
      • Selected
    • Markdown
      • TableOfContentsUpdated
      • TableOfContentsSelected
      • LinkClicked
    • OptionList
      • OptionHighlighted
      • OptionSelected
    • RadioSet.Changed
    • TabContent.TabActivated
    • Tree
      • NodeSelected
      • NodeHighlighted
      • NodeExpanded
      • NodeCollapsed

The On decorator

03 May 12:27
e5c54a3

Choose a tag to compare

https://textual.textualize.io/blog/2023/05/03/textual-0230-improves-message-handling/

[0.23.0] - 2023-05-03

Fixed

  • Fixed outline top and bottom not handling alpha - #2371
  • Fixed !important not applying to align #2420
  • Fixed !important not applying to border #2420
  • Fixed !important not applying to content-align #2420
  • Fixed !important not applying to outline #2420
  • Fixed !important not applying to overflow #2420
  • Fixed !important not applying to scrollbar-size #2420
  • Fixed outline-right not being recognised #2446

Changed

  • Setting attributes with a compute_ method will now raise an AttributeError #2383
  • Unknown psuedo-selectors will now raise a tokenizer error (previously they were silently ignored) #2445
  • Breaking change: DirectoryTree.FileSelected.path is now always a Path #2448
  • Breaking change: Directorytree.load_directory renamed to Directorytree._load_directory #2448
  • Unknown pseudo-selectors will now raise a tokenizer error (previously they were silently ignored) #2445

Added

  • Watch methods can now optionally be private #2382
  • Added DirectoryTree.path reactive attribute #2448
  • Added DirectoryTree.FileSelected.node #2463
  • Added DirectoryTree.reload #2448
  • Added textual.on decorator #2398

Fix run on Windows

28 Apr 19:58
8fac2c7

Choose a tag to compare

[0.22.3] - 2023-04-29

Fixed

  • Fixed textual run on Windows #2406
  • Fixed top border of button hover state

v0.22.2

28 Apr 17:11
c5053ec

Choose a tag to compare

[0.22.2] - 2023-04-29

Added

  • Added TreeNode.tree as a read-only public attribute #2413

Fixed

  • Fixed superfluous style updates for focus-within pseudo-selector

v0.22.1

28 Apr 11:39
e15df80

Choose a tag to compare

[0.22.1] - 2023-04-28

Fixed

  • Fixed timer issue #2416
  • Fixed textual run issue #2391

Making good Progress!

27 Apr 14:08
124c45e

Choose a tag to compare

[0.22.0] - 2023-04-27

Fixed

  • Fixed broken fr units when there is a min or max dimension #2378
  • Fixed plain text in Markdown code blocks with no syntax being difficult to read #2400

Added

  • Added ProgressBar widget #2333

Changed

  • All textual.containers are now 1fr in relevant dimensions by default #2386