Skip to content

Releases: Textualize/textual

The Life Universe and Everything release!

22 Nov 16:21
a64a0d2

Choose a tag to compare

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 blur pseudo class #3439
  • Fixed visual glitched characters on Windows due to Python limitation #2548
  • Fixed ScrollableContainer to 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.value could 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 #3614
    • InvalidSelectValueError for when setting a Select to an invalid value
    • EmptySelectError when creating/setting a Select to have no options when allow_blank is False
  • Select methods #3614
    • clear
    • is_blank
  • Constant Select.BLANK to flag an empty selection #3614
  • Added restrict, type, max_length, and valid_empty to Input #3657
  • Added Pilot.mouse_down to simulate MouseDown events #3495
  • Added Pilot.mouse_up to simulate MouseUp events #3495
  • Added Widget.is_mounted property #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.value to None no longer clears the selection (See Select.BLANK and Select.clear) #3614
  • Breaking change: Button no longer inherits from Static, now it inherits directly from Widget #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

31 Oct 13:31
b3d6043

Choose a tag to compare

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!

Screenshot 2023-10-31 at 13 14 29

[0.41.0] - 2023-10-31

Fixed

  • Fixed Input.cursor_blink reactive not changing blink state after Input was mounted #3498
  • Fixed Tabs.active attribute value not being re-assigned after removing a tab or clearing #3498
  • Fixed DirectoryTree race-condition crash when changing path #3498
  • Fixed issue with LRUCache.discard #3537
  • Fixed DataTable not 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 OptionList event leakage from CommandPalette to App.
  • Fixed crash in LoadingIndicator #3498
  • Fixed crash when Tabs appeared as a descendant of TabbedContent in 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 key argument to the DataTable.sort() method, allowing the table to be sorted using a custom function (or other callable) #3090
  • Added initial to all css rules, which restores default (i.e. value from DEFAULT_CSS) #3566
  • Added HorizontalPad to pad.py #3571
  • Added AwaitComplete class, to be used for optionally awaitable return values #3498

Changed

  • Breaking change: Button.ACTIVE_EFFECT_DURATION classvar converted to Button.active_effect_duration attribute #3498
  • Breaking change: Input.blink_timer made private (renamed to Input._blink_timer) #3498
  • Breaking change: Input.cursor_blink reactive updated to not run on mount (now init=False) #3498
  • Breaking change: AwaitTabbedContent class removed #3498
  • Breaking change: Tabs.remove_tab now returns an AwaitComplete instead of an AwaitRemove #3498
  • Breaking change: Tabs.clear now returns an AwaitComplete instead of an AwaitRemove #3498
  • TabbedContent.add_pane now returns an AwaitComplete instead of an AwaitTabbedContent #3498
  • TabbedContent.remove_pane now returns an AwaitComplete instead of an AwaitTabbedContent #3498
  • TabbedContent.clear_pane now returns an AwaitComplete instead of an AwaitTabbedContent #3498
  • Tabs.add_tab now returns an AwaitComplete instead of an AwaitMount #3498
  • DirectoryTree.reload now returns an AwaitComplete, which may be awaited to ensure the node has finished being processed by the internal queue #3498
  • Tabs.remove_tab now returns an AwaitComplete, which may be awaited to ensure the tab is unmounted and internal state is updated #3498
  • App.switch_mode now returns an AwaitMount, 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

11 Oct 15:57

Choose a tag to compare

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 loading reactive property to widgets #3509

The invisible scrollbar release

10 Oct 14:51
927e59b

Choose a tag to compare

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.hover can't use Screen as a selector #3395
  • App exception when a Tree is initialized/mounted with disabled=True #3407
  • Fixed print locations not being correctly reported in textual 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

  • OutOfBounds exception to be raised by Pilot #3360
  • TextArea.cursor_screen_offset property for getting the screen-relative position of the cursor #3408
  • Input.cursor_screen_offset property 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.clear method #3430
  • Added TextArea.SelectionChanged and TextArea.Changed messages #3442
  • Added wait_for_dismiss parameter to App.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 syntax extra #3398
  • Pilot.click/Pilot.hover now raises OutOfBounds when clicking outside visible screen #3360
  • Pilot.click/Pilot.hover now return a Boolean indicating whether the click/hover landed on the widget that matches the selector #3360
  • Added a delay to when the No Matches message appears in the command palette, thus removing a flicker #3399

The hotfixed Textarea release

21 Sep 16:18

Choose a tag to compare

[0.38.1] - 2023-09-21

Fixed

  • Hotfix - added missing highlight files in build distribution #3370

The TextArea has landed release

21 Sep 12:00
701cd25

Choose a tag to compare

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 DataTable not 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!

16 Sep 09:57

Choose a tag to compare

Hotfix for a TimeoutError

[0.37.1] - 2023-09-16

Fixed

  • Fixed the command palette crashing with a TimeoutError in any Python before 3.11 #3320
  • Fixed Input event leakage from CommandPalette to App.

The Commanding release

15 Sep 15:43
4dc8358

Choose a tag to compare

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
  • Input is 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.TITLE
    • Screen.SUB_TITLE
    • Screen.title
    • Screen.sub_title
  • Properties Header.screen_title and Header.screen_sub_title #3199
  • Added DirectoryTree.DirectorySelected message #3200
  • Added widgets.Collapsible contributed by Sunyoung Yoo #2989

Fixed

  • Fixed a crash when removing an option from an OptionList while the mouse is hovering over the last option #3270
  • Fixed a crash in MarkdownViewer when clicking on a link that contains an anchor #3094
  • Fixed wrong message pump in pop_screen #3315

Changed

  • Widget.notify and App.notify are now thread-safe #3275
  • Breaking change: Widget.notify and App.notify now return None #3275
  • App.unnotify is now private (renamed to App._unnotify) #3275
  • Markdown.load will now attempt to scroll to a related heading if an anchor is provided #3244

The Rule release

05 Sep 12:57
11ba91a

Choose a tag to compare

[0.36.0] - 2023-09-05

Added

  • TCSS styles layer and layers can be strings #3169
  • App.return_code for the app return code #3202
  • Added animate switch to Tree.scroll_to_line and Tree.scroll_to_node #3210
  • Added Rule widget #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_next will now have the same prevented messages as when the callback was scheduled #3065
  • Added cursor_type to the DataTable constructor.
  • Fixed push_screen not updating Screen.CSS styles #3217

Fixed

  • Fixed flicker when calling pop_screen multiple times #3126
  • Fixed setting styles.layout not updating #3047
  • Fixed flicker when scrolling tree up or down a line #3206

v0.35.1: version bump (#3181)

27 Aug 07:22
2519063

Choose a tag to compare

[0.35.1]

Fixed

  • Fixed flash of 80x24 interface in textual-web