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.
- Fixed a crash when a
SelectionList
had a prompt wider than itself Textualize#2900 - Fixed a bug where
Click
events were bubbling up fromSwitch
widgets Textualize#2366 - Fixed a crash when using empty CSS variables Textualize#1849
0.30.0 - 2023-07-17
- Added
DataTable.remove_column
method Textualize#2899 - Added notifications Textualize#2866
- Added
on_complete
callback to scroll methods Textualize#2903
- Fixed CancelledError issue with timer Textualize#2854
- Fixed Toggle Buttons issue with not being clickable/hoverable Textualize#2930
0.29.0 - 2023-07-03
- Factored dev tools (
textual
command) in to external lib (textual-dev
).
- Updated
DataTable.get_cell
type hints to accept string keys Textualize#2586 - Added
DataTable.get_cell_coordinate
method - Added
DataTable.get_row_index
method Textualize#2587 - Added
DataTable.get_column_index
method - Added can-focus pseudo-class to target widgets that may receive focus
- Make
Markdown.update
optionally awaitable Textualize#2838 - Added
default
parameter toDataTable.add_column
for populating existing rows Textualize#2836 - Added can-focus pseudo-class to target widgets that may receive focus
- Fixed crash when columns were added to populated
DataTable
Textualize#2836 - Fixed issues with opacity on Screens Textualize#2616
- Fixed style problem with selected selections in a non-focused selection list Textualize#2768
- Fixed sys.stdout and sys.stderr being None Textualize#2879
0.28.1 - 2023-06-20
- Fixed indented code blocks not showing up in
Markdown
Textualize#2781 - Fixed inline code blocks in lists showing out of order in
Markdown
Textualize#2676 - Fixed list items in a
Markdown
being added to the focus chain Textualize#2380 - Fixed
Tabs
posting unnecessary messages when removing non-active tabs Textualize#2807 - call_after_refresh will preserve the sender within the callback Textualize#2806
- Added a method of allowing third party code to handle unhandled tokens in
Markdown
Textualize#2803 - Added
MarkdownBlock
as an exported symbol intextual.widgets.markdown
Textualize#2803
- Tooltips are now inherited, so will work with compound widgets
0.28.0 - 2023-06-19
- The devtools console now confirms when CSS files have been successfully loaded after a previous error Textualize#2716
- Class variable
CSS
to screens Textualize#2137 - Class variable
CSS_PATH
to screens Textualize#2137 - Added
cursor_foreground_priority
andcursor_background_priority
toDataTable
Textualize#2736 - Added Region.center
- Added
center
parameter toWidget.scroll_to_region
- Added
origin_visible
parameter toWidget.scroll_to_region
- Added
origin_visible
parameter toWidget.scroll_to_center
- Added
TabbedContent.tab_count
Textualize#2751 - Added
TabbedContent.add_pane
Textualize#2751 - Added
TabbedContent.remove_pane
Textualize#2751 - Added
TabbedContent.clear_panes
Textualize#2751 - Added
TabbedContent.Cleared
Textualize#2751
- Fixed setting
TreeNode.label
on an existingTree
node not immediately refreshing Textualize#2713 - Correctly implement
__eq__
protocol in DataTable Textualize#2705 - Fixed exceptions in Pilot tests being silently ignored Textualize#2754
- Fixed issue where internal data of
OptionList
could be invalid for short window afterclear_options
Textualize#2754 - Fixed
Tooltip
causing aquery_one
on a loneStatic
to fail Textualize#2723 - Nested widgets wouldn't lose focus when parent is disabled Textualize#2772
- Fixed the
Tabs
Underline
highlight getting "lost" in some extreme situations Textualize#2751
- Breaking change: The
@on
decorator will now match a message class and any child classes Textualize#2746 - Breaking change: Styles update to checkbox, radiobutton, OptionList, Select, SelectionList, Switch Textualize#2777
Tabs.add_tab
is now optionally awaitable Textualize#2778Tabs.add_tab
now takesbefore
andafter
arguments to position a new tab Textualize#2778Tabs.remove_tab
is now optionally awaitable Textualize#2778- Breaking change:
Tabs.clear
has been changed from returningself
to being optionally awaitable Textualize#2778
0.27.0 - 2023-06-01
- Fixed zero division error Textualize#2673
- Fix
scroll_to_center
when there were nested layers out of view (Compositor full_map not populated fully) Textualize#2684 - Fix crash when
Select
widget value attribute was set incompose
Textualize#2690 - Issue with computing progress in workers Textualize#2686
- Issues with
switch_screen
not updating the results callback appropriately Textualize#2650 - Fixed incorrect mount order Textualize#2702
work
decorator acceptsdescription
parameter to add debug string Textualize#2597- Added
SelectionList
widget Textualize#2652 App.AUTO_FOCUS
to set auto focus on all screens Textualize#2594- Option to
scroll_to_center
to ensure we don't scroll such that the top left corner of the widget is not visible Textualize#2682 - Added
Widget.tooltip
property Textualize#2670 - Added
Region.inflect
Textualize#2670 Suggester
API to compose with widgets for automatic suggestions Textualize#2330SuggestFromList
class to let widgets get completions from a fixed set of options Textualize#2604Input
has a new component classinput--suggestion
Textualize#2604- Added
Widget.remove_children
Textualize#2657 - Added
Validator
framework and validation forInput
Textualize#2600 - Ability to have private and public validate methods Textualize#2708
- Ability to have private compute methods Textualize#2708
- Added
message_hook
to App.run_test Textualize#2702 - Added
Sparkline
widget Textualize#2631
Placeholder
now sets its color cycle per app Textualize#2590- Footer now clears key highlight regardless of whether it's in the active screen or not Textualize#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. Textualize#2623 - Setting
Screen.AUTO_FOCUS
toNone
will inheritAUTO_FOCUS
from the app instead of disabling it Textualize#2594 - Setting
Screen.AUTO_FOCUS
to""
will disable it on the screen Textualize#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. Textualize#2528Tree
andDirectoryTree
Messages no longer accept atree
parameter, usingself.node.tree
instead. Textualize#2529- Keybinding right in
Input
is also used to accept a suggestion if the cursor is at the end of the input Textualize#2604 Input.__init__
now accepts asuggester
attribute for completion suggestions Textualize#2604- Using
switch_screen
to switch to the currently active screen is now a no-op Textualize#2692 - Breaking change: removed
reactive.py::Reactive.var
in favor ofreactive.py::var
Textualize#2709
Placeholder.reset_color_cycle
- Removed
Widget.reset_focus
(now calledWidget.blur
) Textualize#2642
0.26.0 - 2023-05-20
- Added
Widget.can_view
- Textual will now scroll focused widgets to center if not in view
0.25.0 - 2023-05-17
- App
title
andsub_title
attributes can be set to any type Textualize#2521 DirectoryTree
now loads directory contents in a worker Textualize#2456- Only a single error will be written by default, unless in dev mode ("debug" in App.features) Textualize#2480
- Using
Widget.move_child
where the target and the child being moved are the same is now a no-op Textualize#1743 - Calling
dismiss
on a screen that is not at the top of the stack now raises an exception Textualize#2575 MessagePump.call_after_refresh
andMessagePump.call_later
will now returnFalse
if the callback could not be scheduled. Textualize#2584
- Fixed
ZeroDivisionError
inresolve_fraction_unit
Textualize#2502 - Fixed
TreeNode.expand
andTreeNode.expand_all
not posting aTree.NodeExpanded
message Textualize#2535 - Fixed
TreeNode.collapse
andTreeNode.collapse_all
not posting aTree.NodeCollapsed
message Textualize#2535 - Fixed
TreeNode.toggle
andTreeNode.toggle_all
not posting aTree.NodeExpanded
orTree.NodeCollapsed
message Textualize#2535 footer--description
component class was being ignored Textualize#2544- Pasting empty selection in
Input
would raise an exception Textualize#2563 Screen.AUTO_FOCUS
now focuses the first focusable widget that matches the selector Textualize#2578Screen.AUTO_FOCUS
now works on the default screen on startup Textualize#2581- Fix for setting dark in App
__init__
Textualize#2583 - Fix issue with scrolling and docks Textualize#2525
- Fix not being able to use CSS classes with
Tab
Textualize#2589
- Class variable
AUTO_FOCUS
to screens Textualize#2457 - Added
NULL_SPACING
andNULL_REGION
to geometry.py
0.24.1 - 2023-05-08
- Fix TypeError in code browser
0.24.0 - 2023-05-08
- Fixed crash when creating a
DirectoryTree
starting anywhere other than.
- Fixed line drawing in
Tree
whenTree.show_root
isTrue
Textualize#2397 - Fixed line drawing in
Tree
not marking branches as selected when first getting focus Textualize#2397
- The DataTable cursor is now scrolled into view when the cursor coordinate is changed programmatically Textualize#2459
- run_worker exclusive parameter is now
False
by default Textualize#2470 - Added
always_update
as an optional argument forreactive.var
- Made Binding description default to empty string, which is equivalent to show=False Textualize#2501
- Modified Message to allow it to be used as a dataclass Textualize#2501
- Decorator
@on
accepts arbitrary**kwargs
to apply selectors to attributes of the message Textualize#2498
- Property
control
as alias for attributetabs
inTabs
messages Textualize#2483 - Experimental: Added "overlay" rule Textualize#2501
- Experimental: Added "constrain" rule Textualize#2501
- Added textual.widgets.Select Textualize#2501
- Added Region.translate_inside Textualize#2501
TabbedContent
now takes kwargsid
,name
,classes
, anddisabled
, upon initialization, like other widgets Textualize#2497- Method
DataTable.move_cursor
Textualize#2472 - Added
OptionList.add_options
Textualize#2508 - Added
TreeNode.is_root
Textualize#2510 - Added
TreeNode.remove_children
Textualize#2510 - Added
TreeNode.remove
Textualize#2510 - Added classvar
Message.ALLOW_SELECTOR_MATCH
Textualize#2498 - Added
ALLOW_SELECTOR_MATCH
to all built-in messages associated with widgets Textualize#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 messagesDirectoryTree.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
outline
top and bottom not handling alpha - Textualize#2371 - Fixed
!important
not applying toalign
Textualize#2420 - Fixed
!important
not applying toborder
Textualize#2420 - Fixed
!important
not applying tocontent-align
Textualize#2420 - Fixed
!important
not applying tooutline
Textualize#2420 - Fixed
!important
not applying tooverflow
Textualize#2420 - Fixed
!important
not applying toscrollbar-size
Textualize#2420 - Fixed
outline-right
not being recognised Textualize#2446 - Fixed OSError when a file system is not available Textualize#2468
- Setting attributes with a
compute_
method will now raise anAttributeError
Textualize#2383 - Unknown psuedo-selectors will now raise a tokenizer error (previously they were silently ignored) Textualize#2445
- Breaking change:
DirectoryTree.FileSelected.path
is now always aPath
Textualize#2448 - Breaking change:
Directorytree.load_directory
renamed toDirectorytree._load_directory
Textualize#2448 - Unknown pseudo-selectors will now raise a tokenizer error (previously they were silently ignored) Textualize#2445
- Watch methods can now optionally be private Textualize#2382
- Added
DirectoryTree.path
reactive attribute Textualize#2448 - Added
DirectoryTree.FileSelected.node
Textualize#2463 - Added
DirectoryTree.reload
Textualize#2448 - Added textual.on decorator Textualize#2398
0.22.3 - 2023-04-29
- Fixed
textual run
on Windows Textualize#2406 - Fixed top border of button hover state
0.22.2 - 2023-04-29
- Added
TreeNode.tree
as a read-only public attribute Textualize#2413
- Fixed superfluous style updates for focus-within pseudo-selector
0.22.1 - 2023-04-28
- Fixed timer issue Textualize#2416
- Fixed
textual run
issue Textualize#2391
0.22.0 - 2023-04-27
- Fixed broken fr units when there is a min or max dimension Textualize#2378
- Fixed plain text in Markdown code blocks with no syntax being difficult to read Textualize#2400
- Added
ProgressBar
widget Textualize#2333
- All
textual.containers
are now1fr
in relevant dimensions by default Textualize#2386
0.21.0 - 2023-04-26
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 Textualize#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_
toApp.action_add_class
- Breaking change: Renamed
App.action_remove_class_
toApp.action_remove_class
- Breaking change:
RadioSet
is now a single focusable widget Textualize#2372 - Breaking change: Removed
containers.Content
(usecontainers.VerticalScroll
now)
- Added
-c
switch totextual 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) Textualize#2332 ScrollView
now inherits fromScrollableContainer
rather thanWidget
Textualize#2332- Containers no longer inherit any bindings from
Widget
Textualize#2331 - Added
ScrollableContainer
; a container class that binds the common navigation keys to scroll actions (see also above breaking change) Textualize#2332
- Fixed dark mode toggles in a "child" screen not updating a "parent" screen Textualize#1999
- Fixed "panel" border not exposed via CSS
- Fixed
TabbedContent.active
changes not changing the actual content Textualize#2352 - Fixed broken color on macOS Terminal Textualize#2359
0.20.1 - 2023-04-18
- New fix for stuck tabs underline Textualize#2229
0.20.0 - 2023-04-18
- 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 Textualize#2276
- Style updates are now done immediately rather than on_idle Textualize#2304
ButtonVariant
is now exported fromtextual.widgets.button
Textualize#2264HorizontalScroll
andVerticalScroll
are now focusable by default Textualize#2317
- Added
DataTable.remove_row
method Textualize#2253 - option
--port
to the commandtextual console
to specify which port the console should connect to Textualize#2258 Widget.scroll_to_center
method to scroll children to the center of container widget Textualize#2255 and Textualize#2276- Added
TabActivated
message toTabbedContent
Textualize#2260 - Added "panel" border style Textualize#2292
- Added
border-title-color
,border-title-background
,border-title-style
rules Textualize#2289 - Added
border-subtitle-color
,border-subtitle-background
,border-subtitle-style
rules Textualize#2289
- Fixed order styles are applied in DataTable - allows combining of renderable styles and component classes Textualize#2272
- Fixed key combos with up/down keys in some terminals Textualize#2280
- Fix empty ListView preventing bindings from firing Textualize#2281
- Fix
get_component_styles
returning incorrect values on first call when combined with pseudoclasses Textualize#2304 - Fixed
active_message_pump.get
sometimes resulting in aLookupError
Textualize#2301
0.19.1 - 2023-04-10
- Fix viewport units using wrong viewport size Textualize#2247
- Fixed layout not clearing arrangement cache Textualize#2249
0.19.0 - 2023-04-07
- Added support for filtering a
DirectoryTree
Textualize#2215
- 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. Textualize#2221
- DataTable page up / down now move cursor
- Fixed margin not being respected when width or height is "auto" Textualize#2220
- Fixed issue which prevent scroll_visible from working Textualize#2181
- Fixed missing tracebacks on Windows Textualize#2027
0.18.0 - 2023-04-04
- Added Worker API Textualize#2182
- Breaking change: Markdown.update is no longer a coroutine Textualize#2182
RadioSet
is now far less likely to reportpressed_button
asNone
Textualize#2203
0.17.3 - 2023-04-02
- Fixed scrollable area not taking in to account dock Textualize#2188
0.17.2 - 2023-04-02
- Fixed bindings persistance Textualize#1613
- The
Markdown
widget now auto-increments ordered lists Textualize#2002 - Fixed modal bindings Textualize#2194
- Fix binding enter to active button Textualize#2194
- tab and shift+tab are now defined on Screen.
0.17.1 - 2023-03-30
- Fix cursor not hiding on Windows Textualize#2170
- Fixed freeze when ctrl-clicking links Textualize#2167 Textualize#2073
0.17.0 - 2023-03-29
- Issue with parsing action strings whose arguments contained quoted closing parenthesis Textualize#2112
- Issues with parsing action strings with tuple arguments Textualize#2112
- Issue with watching for CSS file changes Textualize#2128
- Fix for tabs not invalidating Textualize#2125
- Fixed scrollbar layers issue Textualize#1358
- Fix for interaction between pseudo-classes and widget-level render caches Textualize#2155
- DataTable now has height: auto by default. Textualize#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. Textualize#2120
- Some widget methods now return
self
instead ofNone
Textualize#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. Textualize#2139
- Added "thick" border style. Textualize#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 auto_scroll attribute to TextLog Textualize#2127
- Added scroll_end switch to TextLog.write Textualize#2127
- Added
Widget.get_pseudo_class_state
Textualize#2155 - Added Screen.ModalScreen which prevents App from handling bindings. Textualize#2139
- Added TEXTUAL_LOG env var which should be a path that Textual will write verbose logs to (textual devtools is generally preferred) Textualize#2148
- Added textual.logging.TextualHandler logging handler
- Added Query.set_classes, DOMNode.set_classes, and
classes
setter for Widget Textualize#1081 - Added
OptionList
Textualize#2154
0.16.0 - 2023-03-22
- Added
parser_factory
argument toMarkdown
andMarkdownViewer
constructors Textualize#2075 - Added
HorizontalScroll
Textualize#1957 - Added
Center
Textualize#1957 - Added
Middle
Textualize#1957 - Added
VerticalScroll
(mimicking the old behaviour ofVertical
) Textualize#1957 - Added
Widget.border_title
andWidget.border_subtitle
to set border (sub)title for a widget Textualize#1864 - Added CSS styles
border_title_align
andborder_subtitle_align
. - Added
TabbedContent
widget Textualize#2059 - Added
get_child_by_type
method to widgets / app Textualize#2059 - Added
Widget.render_str
method Textualize#2059 - Added TEXTUAL_DRIVER environment variable
- Dropped "loading-indicator--dot" component style from LoadingIndicator Textualize#2050
- Tabs widget now sends Tabs.Cleared when there is no active tab.
- Breaking change: changed default behaviour of
Vertical
(seeVerticalScroll
) Textualize#1957 - The default
overflow
style forHorizontal
was changed tohidden hidden
Textualize#1957 DirectoryTree
also acceptspathlib.Path
objects as the path to list Textualize#1438
- Removed
sender
attribute from messages. It's now just private (_sender
). Textualize#2071
- Fixed borders not rendering correctly. Textualize#2074
- Fix for error when removing nodes. Textualize#2079
0.15.1 - 2023-03-14
- Fixed how the namespace for messages is calculated to facilitate inheriting messages Textualize#1814
Tab
is now correctly made available fromtextual.widgets
. Textualize#2044
0.15.0 - 2023-03-13
- Fixed container not resizing when a widget is removed Textualize#2007
- Fixes issue where the horizontal scrollbar would be incorrectly enabled Textualize#2024
0.15.0 - 2023-03-13
- Fixed container not resizing when a widget is removed Textualize#2007
- Fixed issue where the horizontal scrollbar would be incorrectly enabled Textualize#2024
- Fixed
Pilot.click
not correctly creating the mouse events Textualize#2022 - Fixes issue where the horizontal scrollbar would be incorrectly enabled Textualize#2024
- Fixes for tracebacks not appearing on exit Textualize#2027
- Added a LoadingIndicator widget Textualize#2018
- Added Tabs Widget Textualize#2020
- Breaking change: Renamed Widget.action and App.action to Widget.run_action and App.run_action
- Added
shift
,meta
andcontrol
arguments toPilot.click
.
0.14.0 - 2023-03-09
- Breaking change: There is now only
post_message
to post events, which is non-async,post_message_no_wait
was dropped. Textualize#1940 - Breaking change: The Timer class now has just one method to stop it,
Timer.stop
which is non sync Textualize#1940 - Breaking change: Messages don't require a
sender
in their constructor Textualize#1940 - Many messages have grown a
control
property which returns the control they relate to. Textualize#1940 - Updated styling to make it clear DataTable grows horizontally Textualize#1946
- Changed the
Checkbox
character due to issues with Windows Terminal and Windows 10 Textualize#1934 - Changed the
RadioButton
character due to issues with Windows Terminal and Windows 10 and 11 Textualize#1934 - Changed the
Markdown
initial bullet character due to issues with Windows Terminal and Windows 10 and 11 Textualize#1982 - The underscore
_
is no longer a special alias for the methodpilot.press
- Added
data_table
attribute to DataTable events Textualize#1940 - Added
list_view
attribute toListView
events Textualize#1940 - Added
radio_set
attribute toRadioSet
events Textualize#1940 - Added
switch
attribute toSwitch
events Textualize#1940 - Added
hover
andclick
methods toPilot
Textualize#1966 - Breaking change: Added
toggle_button
attribute to RadioButton and Checkbox events, replacesinput
Textualize#1940 - A percentage alpha can now be applied to a border Textualize#1863
- Added
Color.multiply_alpha
. - Added
ContentSwitcher
Textualize#1945
- Fixed bug that prevented pilot from pressing some keys Textualize#1815
- DataTable race condition that caused crash Textualize#1962
- Fixed scrollbar getting "stuck" to cursor when cursor leaves window during drag Textualize#1968 Textualize#2003
- DataTable crash when enter pressed when table is empty Textualize#1973
0.13.0 - 2023-03-02
- Added
Checkbox
Textualize#1872 - Added
RadioButton
Textualize#1872 - Added
RadioSet
Textualize#1872
- Widget scrolling methods (such as
Widget.scroll_home
andWidget.scroll_end
) now perform the scroll after the next refresh Textualize#1774 - Buttons no longer accept arbitrary renderables Textualize#1870
- Scrolling with cursor keys now moves just one cell Textualize#1897
- Fix exceptions in watch methods being hidden on startup Textualize#1886
- Fixed scrollbar size miscalculation Textualize#1910
- Fixed slow exit on some terminals Textualize#1920
0.12.1 - 2023-02-25
- Fix for batch update glitch Textualize#1880
0.12.0 - 2023-02-24
- Added
App.batch_update
Textualize#1832 - Added horizontal rule to Markdown Textualize#1832
- Added
Widget.disabled
Textualize#1785 - Added
DOMNode.notify_style_update
to replacemessages.StylesUpdated
message Textualize#1861 - Added
DataTable.show_row_labels
reactive to show and hide row labels Textualize#1868 - Added
DataTable.RowLabelSelected
event, which is emitted when a row label is clicked Textualize#1868 - Added
MessagePump.prevent
context manager to temporarily suppress a given message type Textualize#1866
- Scrolling by page now adds to current position.
- Markdown lists have been polished: a selection of bullets, better alignment of numbers, style tweaks Textualize#1832
- Added alternative method of composing Widgets Textualize#1847
- Added
label
parameter toDataTable.add_row
Textualize#1868 - Breaking change: Some
DataTable
component classes were renamed - see PR for details Textualize#1868
- Removed
screen.visible_widgets
andscreen.widgets
- Removed
StylesUpdate
message. Textualize#1861
- Numbers in a descendant-combined selector no longer cause an error Textualize#1836
- Fixed superfluous scrolling when focusing a docked widget Textualize#1816
- Fixes walk_children which was returning more than one screen Textualize#1846
- Fixed issue with watchers fired for detached nodes Textualize#1846
0.11.1 - 2023-02-17
- DataTable fix issue where offset cache was not being used Textualize#1810
- DataTable scrollbars resize correctly when header is toggled Textualize#1803
- DataTable location mapping cleared when clear called Textualize#1809
0.11.0 - 2023-02-15
- Added
TreeNode.expand_all
Textualize#1430 - Added
TreeNode.collapse_all
Textualize#1430 - Added
TreeNode.toggle_all
Textualize#1430 - Added the coroutines
Animator.wait_until_complete
andpilot.wait_for_scheduled_animations
that allow waiting for all current and scheduled animations Textualize#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
Textualize#1676 - Added App.scroll_sensitivity_x and App.scroll_sensitivity_y to adjust how many lines the scroll wheel moves the scroll position Textualize#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 Textualize#1433 - Added
Tree.reset
to fully reset aTree
Textualize#1437 - Added
DataTable.sort
to sort rows Textualize#1638 - Added
DataTable.get_cell
to retrieve a cell by column/row keys Textualize#1638 - Added
DataTable.get_cell_at
to retrieve a cell by coordinate Textualize#1638 - Added
DataTable.update_cell
to update a cell by column/row keys Textualize#1638 - Added
DataTable.update_cell_at
to update a cell at a coordinate Textualize#1638 - Added
DataTable.ordered_rows
property to retrieveRow
s as they're currently ordered Textualize#1638 - Added
DataTable.ordered_columns
property to retrieveColumn
s as they're currently ordered Textualize#1638 - Added
DataTable.coordinate_to_cell_key
to find the key for the cell at a coordinate Textualize#1638 - Added
DataTable.is_valid_coordinate
Textualize#1638 - Added
DataTable.is_valid_row_index
Textualize#1638 - Added
DataTable.is_valid_column_index
Textualize#1638 - Added attributes to events emitted from
DataTable
indicating row/column/cell keys Textualize#1638 - Added
DataTable.get_row
to retrieve the values from a row by key Textualize#1786 - Added
DataTable.get_row_at
to retrieve the values from a row by index Textualize#1786 - Added
DataTable.get_column
to retrieve the values from a column by key Textualize#1786 - Added
DataTable.get_column_at
to retrieve the values from a column by index Textualize#1786 - Added
DataTable.HeaderSelected
which is posted when header label clicked Textualize#1788 - Added
DOMNode.watch
andDOMNode.is_attached
methods Textualize#1750 - Added
DOMNode.css_tree
which is a renderable that shows the DOM and CSS Textualize#1778 - Added
DOMNode.children_view
which is a view on to a nodes children list, use for querying Textualize#1778 - Added
Markdown
andMarkdownViewer
widgets. - Added
--screenshot
option totextual run
- Breaking change:
TreeNode
can no longer be imported fromtextual.widgets
; it is now available viafrom textual.widgets.tree import TreeNode
. Textualize#1637 Tree
now shows a (subdued) cursor for a highlighted node when focus has moved elsewhere Textualize#1471DataTable.add_row
now acceptskey
argument to uniquely identify the row Textualize#1638DataTable.add_column
now acceptskey
argument to uniquely identify the column Textualize#1638DataTable.add_row
andDataTable.add_column
now return lists of keys identifying the added rows/columns Textualize#1638- Breaking change:
DataTable.get_cell_value
renamed toDataTable.get_value_at
Textualize#1638 DataTable.row_count
is now a property Textualize#1638- Breaking change:
DataTable.cursor_cell
renamed toDataTable.cursor_coordinate
Textualize#1638- The method
validate_cursor_cell
was renamed tovalidate_cursor_coordinate
. - The method
watch_cursor_cell
was renamed towatch_cursor_coordinate
.
- The method
- Breaking change:
DataTable.hover_cell
renamed toDataTable.hover_coordinate
Textualize#1638- The method
validate_hover_cell
was renamed tovalidate_hover_coordinate
.
- The method
- Breaking change:
DataTable.data
structure changed, and will be made private in upcoming release Textualize#1638 - Breaking change:
DataTable.refresh_cell
was renamed toDataTable.refresh_coordinate
Textualize#1638 - Breaking change:
DataTable.get_row_height
now takes aRowKey
argument instead of a row index Textualize#1638 - Breaking change:
DataTable.data
renamed toDataTable._data
(it's now private) Textualize#1786 - The
_filter
module was made public (now calledfilter
) Textualize#1638 - Breaking change: renamed
Checkbox
toSwitch
Textualize#1746 App.install_screen
name is no longer optional Textualize#1778App.query
now only includes the current screen Textualize#1778DOMNode.tree
now displays simple DOM structure only Textualize#1778App.install_screen
now returns None rather than AwaitMount Textualize#1778DOMNode.children
is now a simple sequence, the NodesList is exposed asDOMNode._nodes
Textualize#1778DataTable
cursor can now enter fixed columns Textualize#1799
- Fixed stuck screen Textualize#1632
- Fixed programmatic style changes not refreshing children layouts when parent widget did not change size Textualize#1607
- Fixed relative units in
grid-rows
andgrid-columns
being computed with respect to the wrong dimension Textualize#1406 - Fixed bug with animations that were triggered back to back, where the second one wouldn't start Textualize#1372
- Fixed bug with animations that were scheduled where all but the first would be skipped Textualize#1372
- Programmatically setting
overflow_x
/overflow_y
refreshes the layout correctly Textualize#1616 - Fixed double-paste into
Input
Textualize#1657 - Added a workaround for an apparent Windows Terminal paste issue Textualize#1661
- Fixed issue with renderable width calculation Textualize#1685
- Fixed issue with app not processing Paste event Textualize#1666
- Fixed glitch with view position with auto width inputs Textualize#1693
- Fixed
DataTable
"selected" events containing wrong coordinates when mouse was used Textualize#1723
- Methods
MessagePump.emit
andMessagePump.emit_no_wait
Textualize#1738 - Removed
reactive.watch
in favor of DOMNode.watch.
0.10.1 - 2023-01-20
- Added Strip.text property Textualize#1620
- Fixed
textual diagnose
crash on older supported Python versions. Textualize#1622
- The default filename for screenshots uses a datetime format similar to ISO8601, but with reserved characters replaced by underscores Textualize#1518
0.10.0 - 2023-01-19
- Added
TreeNode.parent
-- a read-only property for accessing a node's parent Textualize#1397 - Added public
TreeNode
label access viaTreeNode.label
Textualize#1396 - Added read-only public access to the children of a
TreeNode
viaTreeNode.children
Textualize#1398 - Added
Tree.get_node_by_id
to allow getting a node by its ID Textualize#1535 - Added a
Tree.NodeHighlighted
message, giving aon_tree_node_highlighted
event handler Textualize#1400 - Added a
inherit_component_classes
subclassing parameter to control whether component classes are inherited from base classes Textualize#1399 - Added
diagnose
as atextual
command Textualize#1542 - Added
row
andcolumn
cursors toDataTable
Textualize#1547 - Added an optional parameter
selector
to the methodsScreen.focus_next
andScreen.focus_previous
that enable using a CSS selector to narrow down which widgets can get focus Textualize#1196
MouseScrollUp
andMouseScrollDown
now inherit fromMouseEvent
and have attached modifier keys. Textualize#1458- Fail-fast and print pretty tracebacks for Widget compose errors Textualize#1505
- Added Widget._refresh_scroll to avoid expensive layout when scrolling Textualize#1524
events.Paste
now bubbles Textualize#1434- Improved error message when style flag
none
is mixed with other flags (e.g., when settingtext-style
) Textualize#1420 - Clock color in the
Header
widget now matches the header color Textualize#1459 - Programmatic calls to scroll now optionally scroll even if overflow styling says otherwise (introduces a new
force
parameter to all thescroll_*
methods) Textualize#1201 COMPONENT_CLASSES
are now inherited from base classes Textualize#1399- Watch methods may now take no parameters
- Added
compute
parameter to reactive - A
TypeError
raised duringcompose
now carries the full traceback - Removed base class
NodeMessage
from which all node-relatedTree
events inherited
- The styles
scrollbar-background-active
andscrollbar-color-hover
are no longer ignored Textualize#1480 - The widget
Placeholder
can now have its width set toauto
Textualize#1508 - Behavior of widget
Input
when rendering after programmatic value change and related scenarios Textualize#1477 Textualize#1443 DataTable.show_cursor
now correctly allows cursor toggling Textualize#1547- Fixed cursor not being visible on
DataTable
mount whenfixed_columns
were used Textualize#1547 - Fixed
DataTable
cursors not resetting to origin onclear()
Textualize#1601 - Fixed TextLog wrapping issue Textualize#1554
- Fixed issue with TextLog not writing anything before layout Textualize#1498
- Fixed an exception when populating a child class of
ListView
purely fromcompose
Textualize#1588 - Fixed freeze in tests Textualize#1608
- Fixed minus not displaying as symbol Textualize#1482
0.9.1 - 2022-12-30
- Added textual._win_sleep for Python on Windows < 3.11 Textualize#1457
0.9.0 - 2022-12-30
- Added textual.strip.Strip primitive
- Added textual._cache.FIFOCache
- Added an option to clear columns in DataTable.clear() Textualize#1427
- Widget.render_line now returns a Strip
- Fix for slow updates on Windows
- Bumped Rich dependency
0.8.2 - 2022-12-28
- Fixed issue with TextLog.clear() Textualize#1447
0.8.1 - 2022-12-25
- Fix for overflowing tree issue Textualize#1425
0.8.0 - 2022-12-22
- Fixed issues with nested auto dimensions Textualize#1402
- Fixed watch method incorrectly running on first set when value hasn't changed and init=False Textualize#1367
App.dark
can now be set fromApp.on_load
without an error being raised Textualize#1369- Fixed setting
visibility
changes needing arefresh
Textualize#1355
- 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.
- Deprecated
PRIORITY_BINDINGS
class variable. - Renamed
char
tocharacter
on Key event. - Renamed
key_name
toname
on Key event. - Queries/
walk_children
no longer includes self in results by default Textualize#1416
0.7.0 - 2022-12-17
- Added
PRIORITY_BINDINGS
class variable, which can be used to control if a widget's bindings have priority by default. Textualize#1343
- Renamed the
Binding
argumentuniversal
topriority
. Textualize#1343 - When looking for bindings that have priority, they are now looked from
App
downwards. Textualize#1343 BINDINGS
on anApp
-derived class have priority by default. Textualize#1343BINDINGS
on aScreen
-derived class have priority by default. Textualize#1343- Added a message parameter to Widget.exit
- Fixed validator not running on first reactive set Textualize#1359
- Ensure only printable characters are used as key_display Textualize#1361
0.6.0 - 2022-12-11
https://textual.textualize.io/blog/2022/12/11/version-060
- Added "inherited bindings" -- BINDINGS classvar will be merged with base classes, unless inherit_bindings is set to False
- Added
Tree
widget which replacesTreeControl
. - Added widget
Placeholder
Textualize#1200. - Added
ListView
andListItem
widgets Textualize#1143
- Rebuilt
DirectoryTree
with newTree
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 aLabel
is nowauto
.
- Type selectors can now contain numbers Textualize#1253
- Fixed visibility not affecting children Textualize#1313
- Fixed issue with auto width/height and relative children Textualize#1319
- Fixed issue with offset applied to containers Textualize#1256
- Fixed default CSS retrieval for widgets with no
DEFAULT_CSS
that inherited from widgets withDEFAULT_CSS
Textualize#1335 - Fixed merging of
BINDINGS
when binding inheritance is set toNone
Textualize#1351
0.5.0 - 2022-11-20
- Add get_child_by_id and get_widget_by_id, remove get_child Textualize#1146
- Add easing parameter to Widget.scroll_* methods Textualize#1144
- Added Widget.call_later which invokes a callback on idle.
DOMNode.ancestors
no longer includesself
.- Added
DOMNode.ancestors_with_self
, which retains the old behaviour ofDOMNode.ancestors
. - Improved the speed of
DOMQuery.remove
. - Added DataTable.clear
- Added low-level
textual.walk
methods. - It is now possible to
await
aWidget.remove
. Textualize#1094 - It is now possible to
await
aDOMQuery.remove
. Note that this changes the return value ofDOMQuery.remove
, which used to returnself
. Textualize#1094 - Added Pilot.wait_for_animation
- Added
Widget.move_child
Textualize#1121 - Added a
Label
widget Textualize#1190 - Support lazy-instantiated Screens (callables in App.SCREENS) Textualize#1185
- Display of keys in footer has more sensible defaults Textualize#1213
- Add App.get_key_display, allowing custom key_display App-wide Textualize#1213
- Watchers are now called immediately when setting the attribute if they are synchronous. Textualize#1145
- Widget.call_later has been renamed to Widget.call_after_refresh.
- Button variant values are now checked at runtime. Textualize#1189
- Added caching of some properties in Styles object
- Fixed DataTable row not updating after add Textualize#1026
- Fixed issues with animation. Now objects of different types may be animated.
- Fixed containers with transparent background not showing borders Textualize#1175
- Fixed auto-width in horizontal containers Textualize#1155
- Fixed Input cursor invisible when placeholder empty Textualize#1202
- Fixed deadlock when removing widgets from the App Textualize#1219
0.4.0 - 2022-11-08
https://textual.textualize.io/blog/2022/11/08/version-040/#version-040
- Dropped support for mounting "named" and "anonymous" widgets via
App.mount
andWidget.mount
. Both methods now simply take one or more widgets as positional arguments. DOMNode.query_one
now raises aTooManyMatches
exception if there is more than one matching node. Textualize#1096App.mount
andWidget.mount
have newbefore
andafter
parameters Textualize#778
- Added
init
param to reactive.watch CSS_PATH
can now be a list of CSS files Textualize#1079- Added
DOMQuery.only_one
Textualize#1096 - Writes to stdout are now done in a thread, for smoother animation. Textualize#1104
0.3.0 - 2022-10-31
- Fixed issue where scrollbars weren't being unmounted
- Fixed fr units for horizontal and vertical layouts Textualize#1067
- Fixed
textual run
breaking sys.argv Textualize#1064 - Fixed footer not updating styles when toggling dark mode
- Fixed how the app title in a
Header
is centred Textualize#1060 - Fixed the swapping of button variants Textualize#1048
- Fixed reserved characters in screenshots Textualize#993
- Fixed issue with TextLog max_lines Textualize#1058
- 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 patchesargv
in more situations - DOM classes and IDs are now always treated fully case-sensitive Textualize#1047
- 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 Textualize#1061
0.2.1 - 2022-10-23
- Updated meta data for PyPI
0.2.0 - 2022-10-23
- CSS support
- Too numerous to mention
0.1.18 - 2022-04-30
- Bump typing extensions
0.1.17 - 2022-03-10
- Bumped Rich dependency
0.1.16 - 2022-03-10
- Fixed escape key hanging on Windows
0.1.15 - 2022-01-31
- Added Windows Driver
0.1.14 - 2022-01-09
- Updated Rich dependency to 11.X
0.1.13 - 2022-01-01
- Fixed spurious characters when exiting app
- Fixed increasing delay when exiting
0.1.12 - 2021-09-20
- Added geometry.Spacing
- Fixed calculation of virtual size in scroll views
0.1.11 - 2021-09-12
- Changed message handlers to use prefix handle_
- Renamed messages to drop the Message suffix
- Events now bubble by default
- Refactor of layout
- 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 keyboard control of tree control
- Added Widget.gutter to calculate space between renderable and outside edge
- Added margin, padding, and border attributes to Widget
- Callbacks may be async or non-async.
- Event handler event argument is optional.
- Fixed exception in clock example Textualize#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 hover over and mouse click to activate keys in footer
- Added verbosity argument to Widget.log
- 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 exiting mouse mode
- Fixed slow animation
- New log system
0.1.7 - 2021-07-14
- Added functionality to calculator example.
- Scrollview now shows scrollbars automatically
- New handler system for messages that doesn't require inheritance
- Improved traceback handling