Skip to content

Releases: Textualize/textual

We're not superstitious!

02 Mar 14:53
Compare
Choose a tag to compare

The highlight of this release is the new checkboxes / radiobuttons.

Screenshot 2023-03-02 at 14 58 30

Screenshot 2023-03-02 at 14 58 17

Screenshot 2023-03-02 at 14 58 39

[0.13.0] - 2023-03-02

Added

Changed

  • Widget scrolling methods (such as Widget.scroll_home and Widget.scroll_end) now perform the scroll after the next refresh #1774
  • Buttons no longer accept arbitrary renderables #1870

Fixed

  • Scrolling with cursor keys now moves just one cell #1897
  • Fix exceptions in watch methods being hidden on startup #1886
  • Fixed scrollbar size miscalculation #1910
  • Fixed slow exit on some terminals #1920

Fix for batch updates

25 Feb 08:29
43849c3
Compare
Choose a tag to compare

Batch updates would occasionally leave a glitched screen until you moved the mouse.

[0.12.1] - 2023-02-25

Fixed

  • Fix for batch update glitch #1880

New disabled property and compose method

24 Feb 15:37
3c5ee42
Compare
Choose a tag to compare

Blog post: https://textual.textualize.io/blog/2023/02/24/textual-0120-adds-syntactical-sugar-and-batch-updates/

Some additions to the API. Now all widgets may be disabled. There is a new batch_update context manager on App, and a prevent context manager to temporarily prevent message types from being sent. Plus usual fixes. Details below.

[0.12.0] - 2023-02-24

Added

  • Added App.batch_update #1832
  • Added horizontal rule to Markdown #1832
  • Added Widget.disabled #1785
  • Added DOMNode.notify_style_update to replace messages.StylesUpdated message #1861
  • Added MessagePump.prevent context manager to temporarily suppress a given message type #1866

Changed

  • Scrolling by page now adds to current position.
  • Markdown lists have been polished: a selection of bullets, better alignment of numbers, style tweaks #1832
  • Added alternative method of composing Widgets #1847

Removed

  • Removed screen.visible_widgets and screen.widgets
  • Removed StylesUpdate message. #1861

Fixed

  • Numbers in a descendant-combined selector no longer cause an error #1836
  • Fixed superfluous scrolling when focusing a docked widget #1816
  • Fixes walk_children which was returning more than one screen #1846
  • Fixed issue with watchers fired for detached nodes #1846

Massive speed gains in the DataTable!

17 Feb 13:12
01d2fc7
Compare
Choose a tag to compare

A few DataTable fixes. No API changes.

[0.11.1] - 2023-02-17

Fixed

  • DataTable fix issue where offset cache was not being used #1810
  • DataTable scrollbars resize correctly when header is toggled #1803
  • DataTable location mapping cleared when clear called #1809

Getting down with Markdown

15 Feb 11:40
a2d48cf
Compare
Choose a tag to compare

This release adds an enhanced Markdown widget. See the blog post for details:

https://textual.textualize.io/blog/2023/02/15/textual-0110-adds-a-beautiful-markdown-widget/

[0.11.0] - 2023-02-15

Added

  • Added TreeNode.expand_all #1430
  • Added TreeNode.collapse_all #1430
  • Added TreeNode.toggle_all #1430
  • Added the coroutines Animator.wait_until_complete and pilot.wait_for_scheduled_animations that allow waiting for all current and scheduled animations #1658
  • Added the method Animator.is_being_animated that checks if an attribute of an object is being animated or is scheduled for animation
  • Added more keyboard actions and related bindings to Input #1676
  • Added App.scroll_sensitivity_x and App.scroll_sensitivity_y to adjust how many lines the scroll wheel moves the scroll position #928
  • Added Shift+scroll wheel and ctrl+scroll wheel to scroll horizontally
  • Added Tree.action_toggle_node to toggle a node without selecting, and bound it to Space #1433
  • Added Tree.reset to fully reset a Tree #1437
  • Added DataTable.sort to sort rows #1638
  • Added DataTable.get_cell to retrieve a cell by column/row keys #1638
  • Added DataTable.get_cell_at to retrieve a cell by coordinate #1638
  • Added DataTable.update_cell to update a cell by column/row keys #1638
  • Added DataTable.update_cell_at to update a cell at a coordinate #1638
  • Added DataTable.ordered_rows property to retrieve Rows as they're currently ordered #1638
  • Added DataTable.ordered_columns property to retrieve Columns as they're currently ordered #1638
  • Added DataTable.coordinate_to_cell_key to find the key for the cell at a coordinate #1638
  • Added DataTable.is_valid_coordinate #1638
  • Added DataTable.is_valid_row_index #1638
  • Added DataTable.is_valid_column_index #1638
  • Added attributes to events emitted from DataTable indicating row/column/cell keys #1638
  • Added DataTable.get_row to retrieve the values from a row by key #1786
  • Added DataTable.get_row_at to retrieve the values from a row by index #1786
  • Added DataTable.get_column to retrieve the values from a column by key #1786
  • Added DataTable.get_column_at to retrieve the values from a column by index #1786
  • Added DataTable.HeaderSelected which is posted when header label clicked #1788
  • Added DOMNode.watch and DOMNode.is_attached methods #1750
  • Added DOMNode.css_tree which is a renderable that shows the DOM and CSS #1778
  • Added DOMNode.children_view which is a view on to a nodes children list, use for querying #1778
  • Added Markdown and MarkdownViewer widgets.
  • Added --screenshot option to textual run

Changed

  • Breaking change: TreeNode can no longer be imported from textual.widgets; it is now available via from textual.widgets.tree import TreeNode. #1637
  • Tree now shows a (subdued) cursor for a highlighted node when focus has moved elsewhere #1471
  • DataTable.add_row now accepts key argument to uniquely identify the row #1638
  • DataTable.add_column now accepts key argument to uniquely identify the column #1638
  • DataTable.add_row and DataTable.add_column now return lists of keys identifying the added rows/columns #1638
  • Breaking change: DataTable.get_cell_value renamed to DataTable.get_value_at #1638
  • DataTable.row_count is now a property #1638
  • Breaking change: DataTable.cursor_cell renamed to DataTable.cursor_coordinate #1638
    • The method validate_cursor_cell was renamed to validate_cursor_coordinate.
    • The method watch_cursor_cell was renamed to watch_cursor_coordinate.
  • Breaking change: DataTable.hover_cell renamed to DataTable.hover_coordinate #1638
    • The method validate_hover_cell was renamed to validate_hover_coordinate.
  • Breaking change: DataTable.data structure changed, and will be made private in upcoming release #1638
  • Breaking change: DataTable.refresh_cell was renamed to DataTable.refresh_coordinate #1638
  • Breaking change: DataTable.get_row_height now takes a RowKey argument instead of a row index #1638
  • Breaking change: DataTable.data renamed to DataTable._data (it's now private) #1786
  • The _filter module was made public (now called filter) #1638
  • Breaking change: renamed Checkbox to Switch #1746
  • App.install_screen name is no longer optional #1778
  • App.query now only includes the current screen #1778
  • DOMNode.tree now displays simple DOM structure only #1778
  • App.install_screen now returns None rather than AwaitMount #1778
  • DOMNode.children is now a simple sequence, the NodesList is exposed as DOMNode._nodes #1778
  • DataTable cursor can now enter fixed columns #1799

Fixed `textual diagnose` on Python 3.7

20 Jan 09:09
0691462
Compare
Choose a tag to compare

A hotfix release for the textual diagnose command which didn't run on Python 3.7

[0.10.1] - 2023-01-20

Added

  • Added Strip.text property #1620

Fixed

  • Fixed textual diagnose crash on older supported Python versions. #1622

Changed

  • The default filename for screenshots uses a datetime format similar to ISO8601, but with reserved characters replaced by underscores #1518

Cursor-tastic release

19 Jan 14:43
1f71656
Compare
Choose a tag to compare

Version 0.10.0 sees new cursor types on the DataTable to select rows and column, and corresponding events.

datatable-cursors-16jan23.mov

There are also a number of fixes and optimizations. See below for details.

[0.10.0] - 2023-01-19

Added

  • Added TreeNode.parent -- a read-only property for accessing a node's parent #1397
  • Added public TreeNode label access via TreeNode.label #1396
  • Added read-only public access to the children of a TreeNode via TreeNode.children #1398
  • Added Tree.get_node_by_id to allow getting a node by its ID #1535
  • Added a Tree.NodeHighlighted message, giving a on_tree_node_highlighted event handler #1400
  • Added a inherit_component_classes subclassing parameter to control whether component classes are inherited from base classes #1399
  • Added diagnose as a textual command #1542
  • Added row and column cursors to DataTable #1547
  • Added an optional parameter selector to the methods Screen.focus_next and Screen.focus_previous that enable using a CSS selector to narrow down which widgets can get focus #1196

Changed

  • MouseScrollUp and MouseScrollDown now inherit from MouseEvent and have attached modifier keys. #1458
  • Fail-fast and print pretty tracebacks for Widget compose errors #1505
  • Added Widget._refresh_scroll to avoid expensive layout when scrolling #1524
  • events.Paste now bubbles #1434
  • Improved error message when style flag none is mixed with other flags (e.g., when setting text-style) #1420
  • Clock color in the Header widget now matches the header color #1459
  • Programmatic calls to scroll now optionally scroll even if overflow styling says otherwise (introduces a new force parameter to all the scroll_* methods) #1201
  • COMPONENT_CLASSES are now inherited from base classes #1399
  • Watch methods may now take no parameters
  • Added compute parameter to reactive
  • A TypeError raised during compose now carries the full traceback
  • Removed base class NodeMessage from which all node-related Tree events inherited

Fixed

  • The styles scrollbar-background-active and scrollbar-color-hover are no longer ignored #1480
  • The widget Placeholder can now have its width set to auto #1508
  • Behavior of widget Input when rendering after programmatic value change and related scenarios #1477 #1443
  • DataTable.show_cursor now correctly allows cursor toggling #1547
  • Fixed cursor not being visible on DataTable mount when fixed_columns were used #1547
  • Fixed DataTable cursors not resetting to origin on clear() #1601
  • Fixed TextLog wrapping issue #1554
  • Fixed issue with TextLog not writing anything before layout #1498
  • Fixed an exception when populating a child class of ListView purely from compose #1588
  • Fixed freeze in tests #1608

The last release of the year, for real this time

30 Dec 17:41
4cf3aef
Compare
Choose a tag to compare

Only Python 3.11 has a high resolution sleep by default. This adds a more accurate sleep for windows on Python < 3.11

[0.9.1] - 2022-12-30

Added

  • Added textual._win_sleep for Python on Windows < 3.11 #1457

The performance release

30 Dec 13:28
c261894
Compare
Choose a tag to compare

No new functionality so speak of, but performance has improved over the 0.8.x version. A change to how rendered content is stored has made updates faster.

There is also a fix for slow updates on Windows. See this blog post for details.

This is likely the last release of the year, so I would like to share this music video which seems strangely appropriate.

https://www.youtube.com/watch?v=kAFxLXqP8UM&ab_channel=Nightwish

[0.9.0] - 2022-12-30

Added

  • Added textual.strip.Strip primitive
  • Added textual._cache.FIFOCache
  • Added an option to clear columns in DataTable.clear() #1427

Changed

  • Widget.render_line now returns a Strip
  • Fix for slow updates on Windows
  • Bumped Rich dependency

Fix for TextLog.clear

28 Dec 10:57
e3201ca
Compare
Choose a tag to compare

[0.8.2] - 2022-12-28

Fixed

  • Fixed issue with TextLog.clear() #1447