Skip to content

New disabled property and compose method

Compare
Choose a tag to compare
@willmcgugan willmcgugan released this 24 Feb 15:37
· 3632 commits to main since this release
3c5ee42

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