Skip to content

Releases: Textualize/textual

The scarily good release

31 Oct 13:31
b3d6043
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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
Compare
Choose a tag to compare

[0.35.1]

Fixed

  • Fixed flash of 80x24 interface in textual-web

Textual web driver

26 Aug 16:21
2519063
Compare
Choose a tag to compare

A small release, feature wise. Mainly to add support for Textual web on Windows.

[0.35.0]

Added

  • Ability to enable/disable tabs via the reactive disabled in tab panes #3152
  • Textual-web driver support for Windows

Fixed

  • Could not hide/show/disable/enable tabs in nested TabbedContent #3150