Skip to content

Latest commit

 

History

History
2194 lines (1545 loc) · 117 KB

CHANGELOG.md

File metadata and controls

2194 lines (1545 loc) · 117 KB

Change Log

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

0.65.1 - 2024-06-05

Fixed

  • Fixed hot reloading with hatch rule #4606
  • Fixed hatch style parsing #4606

0.65.0 - 2024-06-05

Added

  • Added Command Palette Opened, Closed, and OptionHighlighted events #4600
  • Added hatch style #4603

Fixed

  • Fixed DataTable cursor flicker on scroll #4598

Changes

  • TabbedContent will automatically make tabs active when a widget in a pane is focused #4593

0.64.0 - 2024-06-03

Fixed

  • Fix traceback on exit #4575
  • Fixed Markdown.goto_anchor no longer scrolling the heading into view #4583
  • Fixed Footer flicker on initial focus #4573

0.63.6 - 2024-05-29

Fixed

  • Fixed issue with bindings not refreshing #4571

0.63.5 - 2024-05-28

Fixed

  • Fixed data table disappearing from tabs #4567

Added

  • Added Styles.is_auto_width and Style.is_auto_height

0.63.4 - 2024-05-26

Added

  • Added immediate switch to Signal.publish

Fixed

  • Fixed freeze in recompose from bindings #4558

0.63.3 - 2024-05-24

Fixed

  • Fixed Footer grid size #4545
  • Fixed bindings not updated on auto focus #4551

Changed

  • Attempting to mount on a non-mounted widget now raises a MountError #4547

0.63.2 - 2024-05-23

Fixed

  • Fixed issue with namespaces in links #4546

0.63.1 - 2024-05-22

Fixed

  • Fixed display of multiple bindings #4543

0.63.0 - 2024-05-22

Fixed

  • Fixed actions in links #4540

Changed

  • Breaking change: New Footer (likely a drop in replacement, unless you have customized styles) #4537
  • Stylistic changes to Markdown (simpler headers, less margin, etc) #4541

0.62.0 - 2024-05-20

Added

  • Added start and end properties to Markdown Navigator
  • Added Widget.anchor, Widget.clear_anchor, and Widget.is_anchored #4530

0.61.1 - 2024-05-19

Fixed

  • Fixed auto grid columns ignoring gutter #4522

0.61.0 - 2024-05-18

Added

  • Added App.get_default_screen #4520
  • Added dynamic binding via DOMNode.check_action #4516
  • Added "focused" action namespace so you can bind a key to an action on the focused widget #4516
  • Added "focused" to allowed action namespaces #4516

Changed

  • Breaking change: Actions (as used in bindings) will no longer check the app if they are unhandled. This was undocumented anyway, and not that useful. #4516
  • Breaking change: Renamed App.namespace_bindings to active_bindings

0.60.1 - 2024-05-15

Fixed

  • Dependency issue

0.60.0 - 2024-05-14

Fixed

  • Fixed auto width not working for option lists #4507

Added

  • Added DOMNode.query_children #4508

0.59.0 - 2024-05-11

Fixed

  • Fixed SelectionList issues after removing an option #4464
  • Fixed ListView bugs with the initial index #4452
  • Fixed Select not closing #4499
  • Fixed setting loading=False removing all child loading indicators #4499

Changed

  • When displaying a message using App.exit(), the console no longer highlights things such as numbers.

Added

  • Added message_signal to MessagePump, to listen to events sent to another widget. #4487
  • Added Widget.suppress_click #4499

0.58.1 - 2024-05-01

Fixed

0.58.0 - 2024-04-25

Fixed

  • Fixed TextArea to end mouse selection only if currently selecting #4436
  • Fixed issue with scroll_to_widget #4446
  • Fixed issue with margins #4441

Changed

  • Added argument to signal callbacks #4438

0.57.1 - 2024-04-20

Fixed

  • Fixed an off-by-one error in the line number of the Document.end property #4426
  • Fixed setting scrollbar colors not updating the scrollbar #4433
  • Fixed flushing in inline mode #4435

Added

  • Added Offset.clamp and Size.clamp_offset #4435

0.57.0 - 2024-04-19

Fixed

  • Fixed Integer validator missing failure description when not a number #4413
  • Fixed a crash in DataTable if you clicked a link in the border #4410
  • Fixed issue with cursor position #4429

Added

  • Added App.copy_to_clipboard #4416

[0.56.4] - 2024-04-09

Fixed

  • Disabled terminal synchronization in inline mode as it breaks on some terminals

0.56.3 - 2024-04-08

Fixed

  • Fixed inline mode not updating #4403

0.56.2 - 2024-04-07

Fixed

  • Fixed inline mode not clearing with multiple screen

0.56.1 - 2024-04-07

Fixed

  • Fixed flicker when non-current screen updates #4401

Changed

  • Removed additional line at the end of an inline app #4401

0.56.0 - 2024-04-06

Added

  • Added Size.with_width and Size.with_height #4393

Fixed

  • Fixed issue with inline mode and multiple screens #4393
  • Fixed issue with priority bindings #4395

Changed

  • self.prevent can be used in a widget constructor to prevent messages on mount #4392

0.55.1 - 2024-04-2

Fixed

  • Fixed mouse escape sequences being generated with mouse=False

0.55.0 - 2024-04-1

Fixed

  • Fix priority bindings not appearing in footer when key clashes with focused widget #4342
  • Reverted auto-width change #4369

Changed

  • Exceptions inside Widget.compose or workers weren't bubbling up in tests #4282
  • Fixed DataTable scrolling issues by changing max-height back to 100% #4286
  • Fixed Button not rendering correctly with console markup #4328

Added

  • Added Document.start and end location properties for convenience #4267
  • Added support for JavaScript, Golang, Rust, Bash, Java and Kotlin to TextArea #4350
  • Added inline parameter to run and run_async to run app inline (under the prompt). #4343
  • Added mouse parameter to disable mouse support #4343

0.54.0 - 2024-03-26

Fixed

  • Fixed a crash in TextArea when undoing an edit to a selection the selection was made backwards #4301
  • Fixed issue with flickering scrollbars #4315
  • Fixed issue where narrow TextArea would repeatedly wrap due to scrollbar appearing/disappearing #4334
  • Fix progress bar ETA not updating when setting total reactive #4316

Changed

  • ProgressBar won't show ETA until there is at least one second of samples #4316
  • Input waits until an edit has been made, after entry to the widget, before offering a suggestion #4335

0.53.1 - 2024-03-18

Fixed

  • Fixed issue with data binding #4308

0.53.0 - 2024-03-18

Added

  • Mapping of ANSI colors to hex codes configurable via App.ansi_theme_dark and App.ansi_theme_light #4192
  • Pilot.resize_terminal to resize the terminal in testing #4212
  • Added sort_children method #4244
  • Support for pseudo-classes in nested TCSS #4039

Fixed

  • Fixed TextArea.code_editor missing recently added attributes #4172
  • Fixed Sparkline not working with data in a deque #3899
  • Tooltips are now cleared when the related widget is no longer under them #3045
  • Simplified tree-sitter highlight queries for HTML, which also seems to fix segfault issue #4195
  • Fixed DirectoryTree.path no longer reacting to new values #4208
  • Fixed content size cache with Pretty widget #4211
  • Fixed grid-gutter interaction with Pretty widget #4219
  • Fixed TextArea styling issue on alternate screens #4220
  • Fixed writing to invisible RichLog #4223
  • Fixed RichLog.min_width not being used #4223
  • Rename CollapsibleTitle.action_toggle to action_toggle_collapsible to fix clash with DOMNode.action_toggle #4221
  • Markdown component classes weren't refreshed when watching for CSS #3464
  • Rename Switch.action_toggle to action_toggle_switch to fix clash with DOMNode.action_toggle #4262
  • Fixed OptionList.OptionHighlighted leaking out of Select #4224
  • Fixed Tab enable/disable messages leaking into TabbedContent #4233
  • Fixed a style leak from TabbedContent #4232
  • Fixed active hidden scrollbars not releasing the mouse #4274
  • Fixed the mouse not being released when hiding a TextArea while mouse selection is happening #4292
  • Fix mouse scrolling not working when mouse cursor is over a disabled child widget #4242

Changed

  • Clicking a non focusable widget focus ancestors #4236
  • BREAKING: widget class names must start with a capital letter or an underscore _ #4252
  • BREAKING: for many widgets, messages are now sent when programmatic changes that mirror user input are made #4256
    • Changed Collapsible
    • Changed Markdown
    • Changed Select
    • Changed SelectionList
    • Changed TabbedContent
    • Changed Tabs
    • Changed TextArea
    • Changed Tree
  • Improved ETA calculation for ProgressBar #4271
  • BREAKING: AppFocus and AppBlur are now posted when the terminal window gains or loses focus, if the terminal supports this #4265
    • When the terminal window loses focus, the currently-focused widget will also lose focus.
    • When the terminal window regains focus, the previously-focused widget will regain focus.
  • TextArea binding for ctrl+k will now delete the line if the line is empty #4277
  • The active tab (in Tabs) / tab pane (in TabbedContent) can now be unset #4241

0.52.1 - 2024-02-20

Fixed

  • Fixed the check for animation level in LoadingIndicator #4188

0.52.0 - 2024-02-19

Changed

  • Textual now writes to stderr rather than stdout #4177

Added

  • Added an asyncio lock attribute Widget.lock to be used to synchronize widget state #4134
  • Added support for environment variable TEXTUAL_ANIMATIONS to control what animations Textual displays #4062
  • Add attribute App.animation_level to control whether animations on that app run or not #4062
  • Added support for a TEXTUAL_SCREENSHOT_LOCATION environment variable to specify the location of an automated screenshot #4181
  • Added support for a TEXTUAL_SCREENSHOT_FILENAME environment variable to specify the filename of an automated screenshot #4181
  • Added an asyncio lock attribute Widget.lock to be used to synchronize widget state #4134
  • Widget.remove_children now accepts a CSS selector to specify which children to remove #4183
  • Widget.batch combines widget locking and app update batching #4183

0.51.0 - 2024-02-15

Added

  • TextArea now has read_only mode #4151
  • Add some syntax highlighting to TextArea default theme #4149
  • Add undo and redo to TextArea #4124
  • Added support for command palette command discoverability #4154

Fixed

  • Fixed out-of-view Tab not being scrolled into view when Tabs.active is assigned #4150
  • Fixed TabbedContent.TabActivate not being posted when TabbedContent.active is assigned #4150

Changed

  • Breaking change: Renamed TextArea.tab_behaviour to TextArea.tab_behavior #4124
  • TextArea.theme now defaults to "css" instead of None, and is no longer optional #4157

Fixed

  • Improve support for selector lists in nested TCSS #3969
  • Improve support for rule declarations after nested TCSS rule sets #3999

0.50.1 - 2024-02-09

Fixed

  • Fixed tint applied to ANSI colors #4142

0.50.0 - 2024-02-08

Fixed

  • Fixed issue with ANSI colors not being converted to truecolor #4138
  • Fixed duplicate watch methods being attached to DOM nodes #4030
  • Fixed using watch to create additional watchers would trigger other watch methods #3878

Added

  • Added support for configuring dark and light themes for code in Markdown #3997

0.49.0 - 2024-02-07

Fixed

  • Fixed scrolling in long OptionList by adding max height of 100% #4021
  • Fixed DirectoryTree.clear_node not clearing the node specified #4122

Changed

  • DirectoryTree.reload and DirectoryTree.reload_node now preserve state when reloading #4056
  • Fixed a crash in the TextArea when performing a backward replace #4126
  • Fixed selection not updating correctly when pasting while there's a non-zero selection #4126
  • Breaking change: TextArea will not use Escape to shift focus if the tab_behaviour is the default #4110
  • TextArea cursor will now be invisible before first focus #4128
  • Fix toggling TextArea.cursor_blink reactive when widget does not have focus #4128

Added

  • Added DOMQuery.set #4075
  • Added DOMNode.set_reactive #4075
  • Added DOMNode.data_bind #4075
  • Added DOMNode.action_toggle #4075
  • Added Worker.cancelled_event #4075
  • Tree (and DirectoryTree) grew an attribute lock that can be used for synchronization across coroutines #4056

0.48.2 - 2024-02-02

Fixed

  • Fixed a hang in the Linux driver when connected to a pipe #4104
  • Fixed broken OptionList Option.id mappings #4101

Changed

  • Breaking change: keyboard navigation in RadioSet, ListView, OptionList, and SelectionList, no longer allows highlighting disabled items #3881

0.48.1 - 2024-02-01

Fixed

  • TextArea uses CSS theme by default instead of monokai #4091

0.48.0 - 2024-02-01

Changed

  • Breaking change: Significant changes to TextArea.__init__ default values/behaviour #3933
    • soft_wrap=True - soft wrapping is now enabled by default.
    • show_line_numbers=False - line numbers are now disabled by default.
    • tab_behaviour="focus" - pressing the tab key now switches focus instead of indenting by default.
  • Breaking change: TextArea default theme changed to CSS, and default styling changed #4074
  • Breaking change: DOMNode.has_pseudo_class now accepts a single name only #3970
  • Made textual.cache (formerly textual._cache) public #3976
  • Tab.label can now be used to change the label of a tab #3979
  • Changed the default notification timeout from 3 to 5 seconds #4059
  • Prior scroll animations are now cancelled on new scrolls #4081

Added

  • Added DOMNode.has_pseudo_classes #3970
  • Added Widget.allow_focus and Widget.allow_focus_children #3989
  • Added TextArea.soft_wrap reactive attribute added #3933
  • Added TextArea.tab_behaviour reactive attribute added #3933
  • Added TextArea.code_editor classmethod/alternative constructor #3933
  • Added TextArea.wrapped_document attribute which can convert between wrapped visual coordinates and locations #3933
  • Added show_line_numbers to TextArea.__init__ #3933
  • Added component classes allowing TextArea to be styled using CSS #4074
  • Added Query.blur and Query.focus #4012
  • Added MessagePump.message_queue_size #4012
  • Added TabbedContent.active_pane #4012
  • Added App.suspend #4064
  • Added App.action_suspend_process #4064

Fixed

  • Parameter animate from DataTable.move_cursor was being ignored #3840
  • Fixed a crash if DirectoryTree.show_root was set before the DOM was fully available #2363
  • Live reloading of TCSS wouldn't apply CSS changes to screens under the top screen of the stack #3931
  • SelectionList option IDs are usable as soon as the widget is instantiated #3903
  • Fix issue with Strip.crop when crop window start aligned with strip end #3998
  • Fixed Strip.crop_extend #4011
  • Fix for percentage dimensions #4037
  • Fixed a crash if the TextArea language was set but tree-sitter language binaries were not installed #4045
  • Ensuring TextArea.SelectionChanged message only sends when the updated selection is different #3933
  • Fixed declaration after nested rule set causing a parse error #4012
  • ID and class validation was too lenient #3954
  • Fixed CSS watcher crash if file becomes unreadable (even temporarily) #4079
  • Fixed display of keys when used in conjunction with other keys #3050
  • Fixed double detection of Escape on Windows #4038

0.47.1 - 2024-01-05

Fixed

  • Fixed nested specificity #3963

0.47.0 - 2024-01-04

Fixed

  • Widget.move_child would break if before/after is set to the index of the widget in child #1743
  • Fixed auto width text not processing markup #3918
  • Fixed Tree.clear not retaining the root's expanded state #3557

Changed

  • Breaking change: Widget.move_child parameters before and after are now keyword-only #3896
  • Style tweak to toasts #3955

Added

  • Added textual.lazy #3936
  • Added App.push_screen_wait #3955
  • Added nesting of CSS #3946

0.46.0 - 2023-12-17

Fixed

  • Disabled radio buttons could be selected with the keyboard #3839
  • Fixed zero width scrollbars causing content to disappear #3886

Changed

  • The tabs within a TabbedContent now prefix their IDs to stop any clash with their associated TabPane #3815
  • Breaking change: tab is no longer a @on decorator selector for TabbedContent.TabActivated -- use pane instead #3815

Added

  • Added Collapsible.title reactive attribute #3830
  • Added a pane attribute to TabbedContent.TabActivated #3815
  • Added caching of rules attributes and cache parameter to Stylesheet.apply #3880

0.45.1 - 2023-12-12

Fixed

  • Fixed issues where styles wouldn't update if changed in mount. #3860

0.45.0 - 2023-12-12

Fixed

  • Fixed DataTable.update_cell not raising an error with an invalid column key #3335
  • Fixed Input showing suggestions when not focused #3808
  • Fixed loading indicator not covering scrollbars #3816

Removed

  • Removed renderables/align.py which was no longer used.

Changed

  • Dropped ALLOW_CHILDREN flag introduced in 0.43.0 #3814
  • Widgets with an auto height in an auto height container will now expand if they have no siblings #3814
  • Breaking change: Removed limit_rules from Stylesheet.apply #3844

Added

  • Added get_loading_widget to Widget and App customize the loading widget. #3816
  • Added messages Collapsible.Expanded and Collapsible.Collapsed that inherit from Collapsible.Toggled. #3824

0.44.1 - 2023-12-4

Fixed

  • Fixed slow scrolling when there are many widgets #3801

0.44.0 - 2023-12-1

Changed

  • Breaking change: Dropped 3.7 support #3766
  • Breaking changes #1530
  • link-hover-background renamed to link-background-hover
  • link-hover-color renamed to link-color-hover
  • link-hover-style renamed to link-style-hover
  • Tree now forces a scroll when scroll_to_node is called #3786
  • Brought rxvt's use of shift-numpad keys in line with most other terminals #3769

Added

  • Added support for Ctrl+Fn and Ctrl+Shift+Fn keys in urxvt #3737
  • Friendly error messages when trying to mount non-widgets #3780
  • Added Select.from_values class method that can be used to initialize a Select control with an iterator of values #3743

Fixed

  • Fixed NoWidget when mouse goes outside window #3790
  • Removed spurious print statements from press_keys #3785

0.43.2 - 2023-11-29

Fixed

  • Fixed NoWidget error #3779

0.43.1 - 2023-11-29

Fixed

  • Fixed clicking on scrollbar moves TextArea cursor #3763

0.43.0 - 2023-11-28

Fixed

  • Fixed mouse targeting issue in TextArea when tabs were not fully expanded #3725
  • Fixed Select not updating after changing the prompt reactive #2983
  • Fixed flicker when updating Markdown #3757

Added

  • Added experimental Canvas class #3669
  • Added keyline rule #3669
  • Widgets can now have an ALLOW_CHILDREN (bool) classvar to disallow adding children to a widget #3758
  • Added the ability to set the label property of a Checkbox #3765
  • Added the ability to set the label property of a RadioButton #3765
  • Added support for various modified edit and navigation keys in urxvt #3739
  • Added app focus/blur for textual-web #3767

Changed

  • Method MarkdownTableOfContents.set_table_of_contents renamed to MarkdownTableOfContents.rebuild_table_of_contents #3730
  • Exception Tree.UnknownNodeID moved out of Tree, import from textual.widgets.tree #3730
  • Exception TreeNode.RemoveRootError moved out of TreeNode, import from textual.widgets.tree #3730
  • Optimized startup time #3753
  • App.COMMANDS or Screen.COMMANDS can now accept a callable which returns a command palette provider #3756

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
  • Added TreeNode.refresh #3639

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: Tree.refresh_line has now become an internal #3639
  • 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

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

0.40.0 - 2023-10-11

Added

  • Added loading reactive property to widgets #3509

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
  • Timer callbacks are now typed more loosely #3434

0.38.1 - 2023-09-21

Fixed

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

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
  • Breaking change: Changed Markdown.goto_anchor to return a boolean (if the anchor was found) instead of None #3334

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.

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
  • ProgressBar explicitly supports being set back to its indeterminate state #3286

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
  • DataTable.add_row accepts height=None to automatically compute optimal height for a row #3213

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

Fixed

  • Fixed flash of 80x24 interface in textual-web

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

0.34.0 - 2023-08-22

Added

  • Methods TabbedContent.disable_tab and TabbedContent.enable_tab #3112
  • Methods Tabs.disable and Tabs.enable #3112
  • Messages Tab.Disabled, Tab.Enabled, Tabs.TabDisabled and Tabs.Enabled #3112
  • Methods TabbedContent.hide_tab and TabbedContent.show_tab #3112
  • Methods Tabs.hide and Tabs.show #3112
  • Messages Tabs.TabHidden and Tabs.TabShown #3112
  • Added ListView.extend method to append multiple items #3012

Changed

  • grid-columns and grid-rows now accept an auto token to detect the optimal size #3107
  • LoadingIndicator now has a minimum height of 1 line.

Fixed

  • Fixed auto height container with default grid-rows #1597
  • Fixed page_up and page_down bug in DataTable when show_header = False #3093
  • Fixed issue with visible children inside invisible container when moving focus #3053

0.33.0 - 2023-08-15

Fixed

  • Fixed unintuitive sizing behaviour of TabbedContent #2411
  • Fixed relative units not always expanding auto containers #3059
  • Fixed background refresh #3055
  • Fixed SelectionList.clear_options #3075
  • MouseMove events bubble up from widgets. App and Screen receive MouseMove events even if there's no Widget under the cursor. #2905
  • Fixed click on double-width char #2968

Changed

  • Breaking change: DOMNode.visible now takes into account full DOM to report whether a node is visible or not.

Removed

  • Property Widget.focusable_children #3070

Added

  • Added an interface for replacing prompt of an individual option in an OptionList #2603
  • Added DirectoryTree.reload_node method #2757
  • Added widgets.Digit #3073
  • Added BORDER_TITLE and BORDER_SUBTITLE classvars to Widget #3097

Changed

  • DescendantBlur and DescendantFocus can now be used with @on decorator

0.32.0 - 2023-08-03

Added

  • Added widgets.Log
  • Added Widget.is_vertical_scroll_end, Widget.is_horizontal_scroll_end, Widget.is_vertical_scrollbar_grabbed, Widget.is_horizontal_scrollbar_grabbed

Changed

  • Breaking change: Renamed TextLog to RichLog

0.31.0 - 2023-08-01

Added

  • Added App.begin_capture_print, App.end_capture_print, Widget.begin_capture_print, Widget.end_capture_print #2952
  • Added the ability to run async methods as thread workers #2938
  • Added App.stop_animation #2786
  • Added Widget.stop_animation #2786

Changed

  • Breaking change: Creating a thread worker now requires that a thread=True keyword argument is passed #2938
  • Breaking change: Markdown.load no longer captures all errors and returns a bool, errors now propagate #2956
  • Breaking change: the default style of a DataTable now has max-height: 100% #2959

Fixed

  • Fixed a crash when a SelectionList had a prompt wider than itself #2900
  • Fixed a bug where Click events were bubbling up from Switch widgets #2366
  • Fixed a crash when using empty CSS variables #1849
  • Fixed issue with tabs in TextLog #3007
  • Fixed a bug with DataTable hover highlighting #2909

0.30.0 - 2023-07-17

Added

  • Added DataTable.remove_column method #2899
  • Added notifications #2866
  • Added on_complete callback to scroll methods #2903

Fixed

  • Fixed CancelledError issue with timer #2854
  • Fixed Toggle Buttons issue with not being clickable/hoverable #2930

0.29.0 - 2023-07-03

Changed

  • Factored dev tools (textual command) in to external lib (textual-dev).

Added

  • Updated DataTable.get_cell type hints to accept string keys #2586
  • Added DataTable.get_cell_coordinate method
  • Added DataTable.get_row_index method #2587
  • Added DataTable.get_column_index method
  • Added can-focus pseudo-class to target widgets that may receive focus
  • Make Markdown.update optionally awaitable #2838
  • Added default parameter to DataTable.add_column for populating existing rows #2836
  • Added can-focus pseudo-class to target widgets that may receive focus

Fixed

  • Fixed crash when columns were added to populated DataTable #2836
  • Fixed issues with opacity on Screens #2616
  • Fixed style problem with selected selections in a non-focused selection list #2768
  • Fixed sys.stdout and sys.stderr being None #2879

0.28.1 - 2023-06-20

Fixed

  • Fixed indented code blocks not showing up in Markdown #2781
  • Fixed inline code blocks in lists showing out of order in Markdown #2676
  • Fixed list items in a Markdown being added to the focus chain #2380
  • Fixed Tabs posting unnecessary messages when removing non-active tabs #2807
  • call_after_refresh will preserve the sender within the callback #2806

Added

  • Added a method of allowing third party code to handle unhandled tokens in Markdown #2803
  • Added MarkdownBlock as an exported symbol in textual.widgets.markdown #2803

Changed

  • Tooltips are now inherited, so will work with compound widgets

0.28.0 - 2023-06-19

Added

  • The devtools console now confirms when CSS files have been successfully loaded after a previous error #2716
  • Class variable CSS to screens #2137
  • Class variable CSS_PATH to screens #2137
  • Added cursor_foreground_priority and cursor_background_priority to DataTable #2736
  • Added Region.center
  • Added center parameter to Widget.scroll_to_region
  • Added origin_visible parameter to Widget.scroll_to_region
  • Added origin_visible parameter to Widget.scroll_to_center
  • Added TabbedContent.tab_count #2751
  • Added TabbedContent.add_pane #2751
  • Added TabbedContent.remove_pane #2751
  • Added TabbedContent.clear_panes #2751
  • Added TabbedContent.Cleared #2751

Fixed

  • Fixed setting TreeNode.label on an existing Tree node not immediately refreshing #2713
  • Correctly implement __eq__ protocol in DataTable #2705
  • Fixed exceptions in Pilot tests being silently ignored #2754
  • Fixed issue where internal data of OptionList could be invalid for short window after clear_options #2754
  • Fixed Tooltip causing a query_one on a lone Static to fail #2723
  • Nested widgets wouldn't lose focus when parent is disabled #2772
  • Fixed the Tabs Underline highlight getting "lost" in some extreme situations #2751

Changed

  • Breaking change: The @on decorator will now match a message class and any child classes #2746
  • Breaking change: Styles update to checkbox, radiobutton, OptionList, Select, SelectionList, Switch #2777
  • Tabs.add_tab is now optionally awaitable #2778
  • Tabs.add_tab now takes before and after arguments to position a new tab #2778
  • Tabs.remove_tab is now optionally awaitable #2778
  • Breaking change: Tabs.clear has been changed from returning self to being optionally awaitable #2778

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
  • Ability to have private and public validate methods #2708
  • Ability to have private compute methods #2708
  • Added message_hook to App.run_test #2702
  • Added Sparkline widget #2631

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
  • Breaking change: removed reactive.py::Reactive.var in favor of reactive.py::var #2709

Removed

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

0.26.0 - 2023-05-20

Added

  • Added Widget.can_view

Changed

  • Textual will now scroll focused widgets to center if not in view

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

0.24.1 - 2023-05-08

Fixed

  • Fix TypeError in code browser

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

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
  • Fixed OSError when a file system is not available #2468

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

0.22.3 - 2023-04-29

Fixed

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

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

0.22.1 - 2023-04-28

Fixed

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

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

0.21.0 - 2023-04-26

Changed

  • textual run execs apps in a new context.
  • Textual console no longer parses console markup.
  • Breaking change: Container no longer shows required scrollbars by default #2361
  • Breaking change: VerticalScroll no longer shows a required horizontal scrollbar by default
  • Breaking change: HorizontalScroll no longer shows a required vertical scrollbar by default
  • Breaking change: Renamed App.action_add_class_ to App.action_add_class
  • Breaking change: Renamed App.action_remove_class_ to App.action_remove_class
  • Breaking change: RadioSet is now a single focusable widget #2372
  • Breaking change: Removed containers.Content (use containers.VerticalScroll now)

Added

  • Added -c switch to textual run which runs commands in a Textual dev environment.
  • Breaking change: standard keyboard scrollable navigation bindings have been moved off Widget and onto a new base class for scrollable containers (see also below addition) #2332
  • ScrollView now inherits from ScrollableContainer rather than Widget #2332
  • Containers no longer inherit any bindings from Widget #2331
  • Added ScrollableContainer; a container class that binds the common navigation keys to scroll actions (see also above breaking change) #2332

Fixed

  • Fixed dark mode toggles in a "child" screen not updating a "parent" screen #1999
  • Fixed "panel" border not exposed via CSS
  • Fixed TabbedContent.active changes not changing the actual content #2352
  • Fixed broken color on macOS Terminal #2359

0.20.1 - 2023-04-18

Fix

  • New fix for stuck tabs underline #2229

0.20.0 - 2023-04-18

Changed

  • Changed signature of Driver. Technically a breaking change, but unlikely to affect anyone.
  • Breaking change: Timer.start is now private, and returns None. There was no reason to call this manually, so unlikely to affect anyone.
  • A clicked tab will now be scrolled to the center of its tab container #2276
  • Style updates are now done immediately rather than on_idle #2304
  • ButtonVariant is now exported from textual.widgets.button #2264
  • HorizontalScroll and VerticalScroll are now focusable by default #2317

Added

  • Added DataTable.remove_row method #2253
  • option --port to the command textual console to specify which port the console should connect to #2258
  • Widget.scroll_to_center method to scroll children to the center of container widget #2255 and #2276
  • Added TabActivated message to TabbedContent #2260
  • Added "panel" border style #2292
  • Added border-title-color, border-title-background, border-title-style rules #2289
  • Added border-subtitle-color, border-subtitle-background, border-subtitle-style rules #2289

Fixed

  • Fixed order styles are applied in DataTable - allows combining of renderable styles and component classes #2272
  • Fixed key combos with up/down keys in some terminals #2280
  • Fix empty ListView preventing bindings from firing #2281
  • Fix get_component_styles returning incorrect values on first call when combined with pseudoclasses #2304
  • Fixed active_message_pump.get sometimes resulting in a LookupError #2301

0.19.1 - 2023-04-10

Fixed

  • Fix viewport units using wrong viewport size #2247
  • Fixed layout not clearing arrangement cache #2249

0.19.0 - 2023-04-07

Added

  • Added support for filtering a DirectoryTree #2215

Changed

  • Allowed border_title and border_subtitle to accept Text objects
  • Added additional line around titles
  • When a container is auto, relative dimensions in children stretch the container. #2221
  • DataTable page up / down now move cursor

Fixed

  • Fixed margin not being respected when width or height is "auto" #2220
  • Fixed issue which prevent scroll_visible from working #2181
  • Fixed missing tracebacks on Windows #2027

0.18.0 - 2023-04-04

Added

Changed

  • Breaking change: Markdown.update is no longer a coroutine #2182

Fixed

  • RadioSet is now far less likely to report pressed_button as None #2203

0.17.3 - 2023-04-02

[Fixed]

  • Fixed scrollable area not taking in to account dock #2188

0.17.2 - 2023-04-02

[Fixed]

  • Fixed bindings persistance #1613
  • The Markdown widget now auto-increments ordered lists #2002
  • Fixed modal bindings #2194
  • Fix binding enter to active button #2194

[Changed]

  • tab and shift+tab are now defined on Screen.

0.17.1 - 2023-03-30

Fixed

  • Fix cursor not hiding on Windows #2170
  • Fixed freeze when ctrl-clicking links #2167 #2073

0.17.0 - 2023-03-29

Fixed

  • Issue with parsing action strings whose arguments contained quoted closing parenthesis #2112
  • Issues with parsing action strings with tuple arguments #2112
  • Issue with watching for CSS file changes #2128
  • Fix for tabs not invalidating #2125
  • Fixed scrollbar layers issue #1358
  • Fix for interaction between pseudo-classes and widget-level render caches #2155

Changed

  • DataTable now has height: auto by default. #2117
  • Textual will now render strings within renderables (such as tables) as Console Markup by default. You can wrap your text with rich.Text() if you want the original behavior. #2120
  • Some widget methods now return self instead of None #2102:
    • Widget: refresh, focus, reset_focus
    • Button.press
    • DataTable: clear, refresh_coordinate, refresh_row, refresh_column, sort
    • Placehoder.cycle_variant
    • Switch.toggle
    • Tabs.clear
    • TextLog: write, clear
    • TreeNode: expand, expand_all, collapse, collapse_all, toggle, toggle_all
    • Tree: clear, reset
  • Screens with alpha in their background color will now blend with the background. #2139
  • Added "thick" border style. #2139
  • message_pump.app will now set the active app if it is not already set.
  • DataTable now has max height set to 100vh

Added

  • Added auto_scroll attribute to TextLog #2127
  • Added scroll_end switch to TextLog.write #2127
  • Added Widget.get_pseudo_class_state #2155
  • Added Screen.ModalScreen which prevents App from handling bindings. #2139
  • Added TEXTUAL_LOG env var which should be a path that Textual will write verbose logs to (textual devtools is generally preferred) #2148
  • Added textual.logging.TextualHandler logging handler
  • Added Query.set_classes, DOMNode.set_classes, and classes setter for Widget #1081
  • Added OptionList #2154

0.16.0 - 2023-03-22

Added

  • Added parser_factory argument to Markdown and MarkdownViewer constructors #2075
  • Added HorizontalScroll #1957
  • Added Center #1957
  • Added Middle #1957
  • Added VerticalScroll (mimicking the old behaviour of Vertical) #1957
  • Added Widget.border_title and Widget.border_subtitle to set border (sub)title for a widget #1864
  • Added CSS styles border_title_align and border_subtitle_align.
  • Added TabbedContent widget #2059
  • Added get_child_by_type method to widgets / app #2059
  • Added Widget.render_str method #2059
  • Added TEXTUAL_DRIVER environment variable

Changed

  • Dropped "loading-indicator--dot" component style from LoadingIndicator #2050
  • Tabs widget now sends Tabs.Cleared when there is no active tab.
  • Breaking change: changed default behaviour of Vertical (see VerticalScroll) #1957
  • The default overflow style for Horizontal was changed to hidden hidden #1957
  • DirectoryTree also accepts pathlib.Path objects as the path to list #1438

Removed

  • Removed sender attribute from messages. It's now just private (_sender). #2071

Fixed

  • Fixed borders not rendering correctly. #2074
  • Fix for error when removing nodes. #2079

0.15.1 - 2023-03-14

Fixed

  • Fixed how the namespace for messages is calculated to facilitate inheriting messages #1814
  • Tab is now correctly made available from textual.widgets. #2044

0.15.0 - 2023-03-13

Fixed

  • Fixed container not resizing when a widget is removed #2007
  • Fixes issue where the horizontal scrollbar would be incorrectly enabled #2024

0.15.0 - 2023-03-13

Changed

  • Fixed container not resizing when a widget is removed #2007
  • Fixed issue where the horizontal scrollbar would be incorrectly enabled #2024
  • Fixed Pilot.click not correctly creating the mouse events #2022
  • Fixes issue where the horizontal scrollbar would be incorrectly enabled #2024
  • Fixes for tracebacks not appearing on exit #2027

Added

  • Added a LoadingIndicator widget #2018
  • Added Tabs Widget #2020

Changed

  • Breaking change: Renamed Widget.action and App.action to Widget.run_action and App.run_action
  • Added shift, meta and control arguments to Pilot.click.

0.14.0 - 2023-03-09

Changed

  • Breaking change: There is now only post_message to post events, which is non-async, post_message_no_wait was dropped. #1940
  • Breaking change: The Timer class now has just one method to stop it, Timer.stop which is non sync #1940
  • Breaking change: Messages don't require a sender in their constructor #1940
  • Many messages have grown a control property which returns the control they relate to. #1940
  • Updated styling to make it clear DataTable grows horizontally #1946
  • Changed the Checkbox character due to issues with Windows Terminal and Windows 10 #1934
  • Changed the RadioButton character due to issues with Windows Terminal and Windows 10 and 11 #1934
  • Changed the Markdown initial bullet character due to issues with Windows Terminal and Windows 10 and 11 #1982
  • The underscore _ is no longer a special alias for the method pilot.press

Added

  • Added data_table attribute to DataTable events #1940
  • Added list_view attribute to ListView events #1940
  • Added radio_set attribute to RadioSet events #1940
  • Added switch attribute to Switch events #1940
  • Added hover and click methods to Pilot #1966
  • Breaking change: Added toggle_button attribute to RadioButton and Checkbox events, replaces input #1940
  • A percentage alpha can now be applied to a border #1863
  • Added Color.multiply_alpha.
  • Added ContentSwitcher #1945

Fixed

  • Fixed bug that prevented pilot from pressing some keys #1815
  • DataTable race condition that caused crash #1962
  • Fixed scrollbar getting "stuck" to cursor when cursor leaves window during drag #1968 #2003
  • DataTable crash when enter pressed when table is empty #1973

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

0.12.1 - 2023-02-25

Fixed

  • Fix for batch update glitch #1880

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 DataTable.show_row_labels reactive to show and hide row labels #1868
  • Added DataTable.RowLabelSelected event, which is emitted when a row label is clicked #1868
  • 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
  • Added label parameter to DataTable.add_row #1868
  • Breaking change: Some DataTable component classes were renamed - see PR for details #1868

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

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

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

  • Fixed stuck screen #1632
  • Fixed programmatic style changes not refreshing children layouts when parent widget did not change size #1607
  • Fixed relative units in grid-rows and grid-columns being computed with respect to the wrong dimension #1406
  • Fixed bug with animations that were triggered back to back, where the second one wouldn't start #1372
  • Fixed bug with animations that were scheduled where all but the first would be skipped #1372
  • Programmatically setting overflow_x/overflow_y refreshes the layout correctly #1616
  • Fixed double-paste into Input #1657
  • Added a workaround for an apparent Windows Terminal paste issue #1661
  • Fixed issue with renderable width calculation #1685
  • Fixed issue with app not processing Paste event #1666
  • Fixed glitch with view position with auto width inputs #1693
  • Fixed DataTable "selected" events containing wrong coordinates when mouse was used #1723

Removed

  • Methods MessagePump.emit and MessagePump.emit_no_wait #1738
  • Removed reactive.watch in favor of DOMNode.watch.

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

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
  • Fixed minus not displaying as symbol #1482

0.9.1 - 2022-12-30

Added

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

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

0.8.2 - 2022-12-28

Fixed

  • Fixed issue with TextLog.clear() #1447

0.8.1 - 2022-12-25

Fixed

  • Fix for overflowing tree issue #1425

0.8.0 - 2022-12-22

Fixed

  • Fixed issues with nested auto dimensions #1402
  • Fixed watch method incorrectly running on first set when value hasn't changed and init=False #1367
  • App.dark can now be set from App.on_load without an error being raised #1369
  • Fixed setting visibility changes needing a refresh #1355

Added

  • Added textual.actions.SkipAction exception which can be raised from an action to allow parents to process bindings.
  • Added textual keys preview.
  • Added ability to bind to a character in addition to key name. i.e. you can bind to "." or "full_stop".
  • Added TextLog.shrink attribute to allow renderable to reduce in size to fit width.

Changed

  • Deprecated PRIORITY_BINDINGS class variable.
  • Renamed char to character on Key event.
  • Renamed key_name to name on Key event.
  • Queries/walk_children no longer includes self in results by default #1416

0.7.0 - 2022-12-17

Added

  • Added PRIORITY_BINDINGS class variable, which can be used to control if a widget's bindings have priority by default. #1343

Changed

  • Renamed the Binding argument universal to priority. #1343
  • When looking for bindings that have priority, they are now looked from App downwards. #1343
  • BINDINGS on an App-derived class have priority by default. #1343
  • BINDINGS on a Screen-derived class have priority by default. #1343
  • Added a message parameter to Widget.exit

Fixed

  • Fixed validator not running on first reactive set #1359
  • Ensure only printable characters are used as key_display #1361

0.6.0 - 2022-12-11

https://textual.textualize.io/blog/2022/12/11/version-060

Added

  • Added "inherited bindings" -- BINDINGS classvar will be merged with base classes, unless inherit_bindings is set to False
  • Added Tree widget which replaces TreeControl.
  • Added widget Placeholder #1200.
  • Added ListView and ListItem widgets #1143

Changed

  • Rebuilt DirectoryTree with new Tree control.
  • Empty containers with a dimension set to "auto" will now collapse instead of filling up the available space.
  • Container widgets now have default height of 1fr.
  • The default width of a Label is now auto.

Fixed

  • Type selectors can now contain numbers #1253
  • Fixed visibility not affecting children #1313
  • Fixed issue with auto width/height and relative children #1319
  • Fixed issue with offset applied to containers #1256
  • Fixed default CSS retrieval for widgets with no DEFAULT_CSS that inherited from widgets with DEFAULT_CSS #1335
  • Fixed merging of BINDINGS when binding inheritance is set to None #1351

0.5.0 - 2022-11-20

Added

  • Add get_child_by_id and get_widget_by_id, remove get_child #1146
  • Add easing parameter to Widget.scroll_* methods #1144
  • Added Widget.call_later which invokes a callback on idle.
  • DOMNode.ancestors no longer includes self.
  • Added DOMNode.ancestors_with_self, which retains the old behaviour of DOMNode.ancestors.
  • Improved the speed of DOMQuery.remove.
  • Added DataTable.clear
  • Added low-level textual.walk methods.
  • It is now possible to await a Widget.remove. #1094
  • It is now possible to await a DOMQuery.remove. Note that this changes the return value of DOMQuery.remove, which used to return self. #1094
  • Added Pilot.wait_for_animation
  • Added Widget.move_child #1121
  • Added a Label widget #1190
  • Support lazy-instantiated Screens (callables in App.SCREENS) #1185
  • Display of keys in footer has more sensible defaults #1213
  • Add App.get_key_display, allowing custom key_display App-wide #1213

Changed

  • Watchers are now called immediately when setting the attribute if they are synchronous. #1145
  • Widget.call_later has been renamed to Widget.call_after_refresh.
  • Button variant values are now checked at runtime. #1189
  • Added caching of some properties in Styles object

Fixed

  • Fixed DataTable row not updating after add #1026
  • Fixed issues with animation. Now objects of different types may be animated.
  • Fixed containers with transparent background not showing borders #1175
  • Fixed auto-width in horizontal containers #1155
  • Fixed Input cursor invisible when placeholder empty #1202
  • Fixed deadlock when removing widgets from the App #1219

0.4.0 - 2022-11-08

https://textual.textualize.io/blog/2022/11/08/version-040/#version-040

Changed

  • Dropped support for mounting "named" and "anonymous" widgets via App.mount and Widget.mount. Both methods now simply take one or more widgets as positional arguments.
  • DOMNode.query_one now raises a TooManyMatches exception if there is more than one matching node. #1096
  • App.mount and Widget.mount have new before and after parameters #778

Added

  • Added init param to reactive.watch
  • CSS_PATH can now be a list of CSS files #1079
  • Added DOMQuery.only_one #1096
  • Writes to stdout are now done in a thread, for smoother animation. #1104

0.3.0 - 2022-10-31

Fixed

  • Fixed issue where scrollbars weren't being unmounted
  • Fixed fr units for horizontal and vertical layouts #1067
  • Fixed textual run breaking sys.argv #1064
  • Fixed footer not updating styles when toggling dark mode
  • Fixed how the app title in a Header is centred #1060
  • Fixed the swapping of button variants #1048
  • Fixed reserved characters in screenshots #993
  • Fixed issue with TextLog max_lines #1058

Changed

  • DOMQuery now raises InvalidQueryFormat in response to invalid query strings, rather than cryptic CSS error
  • Dropped quit_after, screenshot, and screenshot_title from App.run, which can all be done via auto_pilot
  • Widgets are now closed in reversed DOM order
  • Input widget justify hardcoded to left to prevent text-align interference
  • Changed textual run so that it patches argv in more situations
  • DOM classes and IDs are now always treated fully case-sensitive #1047

Added

  • Added Unmount event
  • Added App.run_async method
  • Added App.run_test context manager
  • Added auto_pilot to App.run and App.run_async
  • Added Widget._get_virtual_dom to get scrollbars
  • Added size parameter to run and run_async
  • Added always_update to reactive
  • Returned an awaitable from push_screen, switch_screen, and install_screen #1061

0.2.1 - 2022-10-23

Changed

  • Updated meta data for PyPI

0.2.0 - 2022-10-23

Added

  • CSS support
  • Too numerous to mention

0.1.18 - 2022-04-30

Changed

  • Bump typing extensions

0.1.17 - 2022-03-10

Changed

  • Bumped Rich dependency

0.1.16 - 2022-03-10

Fixed

  • Fixed escape key hanging on Windows

0.1.15 - 2022-01-31

Added

  • Added Windows Driver

0.1.14 - 2022-01-09

Changed

  • Updated Rich dependency to 11.X

0.1.13 - 2022-01-01

Fixed

  • Fixed spurious characters when exiting app
  • Fixed increasing delay when exiting

0.1.12 - 2021-09-20

Added

  • Added geometry.Spacing

Fixed

  • Fixed calculation of virtual size in scroll views

0.1.11 - 2021-09-12

Changed

  • Changed message handlers to use prefix handle_
  • Renamed messages to drop the Message suffix
  • Events now bubble by default
  • Refactor of layout

Added

  • Added App.measure
  • Added auto_width to Vertical Layout, WindowView, an ScrollView
  • Added big_table.py example
  • Added easing.py example

0.1.10 - 2021-08-25

Added

  • Added keyboard control of tree control
  • Added Widget.gutter to calculate space between renderable and outside edge
  • Added margin, padding, and border attributes to Widget

Changed

  • Callbacks may be async or non-async.
  • Event handler event argument is optional.
  • Fixed exception in clock example #52
  • Added Message.wait() which waits for a message to be processed
  • Key events are now sent to widgets first, before processing bindings

0.1.9 - 2021-08-06

Added

  • Added hover over and mouse click to activate keys in footer
  • Added verbosity argument to Widget.log

Changed

  • Simplified events. Remove Startup event (use Mount)
  • Changed geometry.Point to geometry.Offset and geometry.Dimensions to geometry.Size

0.1.8 - 2021-07-17

Fixed

  • Fixed exiting mouse mode
  • Fixed slow animation

Added

  • New log system

0.1.7 - 2021-07-14

Changed

  • Added functionality to calculator example.
  • Scrollview now shows scrollbars automatically
  • New handler system for messages that doesn't require inheritance
  • Improved traceback handling