mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
See #1315 for the discussion that prompted this, #1316 for the issue where this particular aspect of it was isolated as something to address. I'm not 100% convinced that `Static` does the right thing here either, but I don't want to go changing too make things at once. However, I think a good argument can be made that `Label` should be `width: auto` by default, this seems to make perfect sense to me. I think everyone would expect, by default, that a label's width is the width of the content (plus any decoration, of course).
8.7 KiB
8.7 KiB
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.6.0] - Unreleased
Added
- Added "inherited bindings" -- BINDINGS classvar will be merged with base classes, unless inherit_bindings is set to False
- Added
Treewidget which replacesTreeControl.
Changed
- Rebuilt
DirectoryTreewith newTreecontrol. - The default
widthof aLabelis nowauto.
Fixed
- Type selectors can now contain numbers https://github.com/Textualize/textual/issues/1253
[0.5.0] - 2022-11-20
Added
- Add get_child_by_id and get_widget_by_id, remove get_child https://github.com/Textualize/textual/pull/1146
- Add easing parameter to Widget.scroll_* methods https://github.com/Textualize/textual/pull/1144
- Added Widget.call_later which invokes a callback on idle.
DOMNode.ancestorsno 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.walkmethods. - It is now possible to
awaitaWidget.remove. https://github.com/Textualize/textual/issues/1094 - It is now possible to
awaitaDOMQuery.remove. Note that this changes the return value ofDOMQuery.remove, which used to returnself. https://github.com/Textualize/textual/issues/1094 - Added Pilot.wait_for_animation
- Added
Widget.move_childhttps://github.com/Textualize/textual/issues/1121 - Added a
Labelwidget https://github.com/Textualize/textual/issues/1190 - Support lazy-instantiated Screens (callables in App.SCREENS) https://github.com/Textualize/textual/pull/1185
- Display of keys in footer has more sensible defaults https://github.com/Textualize/textual/pull/1213
- Add App.get_key_display, allowing custom key_display App-wide https://github.com/Textualize/textual/pull/1213
Changed
- Watchers are now called immediately when setting the attribute if they are synchronous. https://github.com/Textualize/textual/pull/1145
- Widget.call_later has been renamed to Widget.call_after_refresh.
- Button variant values are now checked at runtime. https://github.com/Textualize/textual/issues/1189
- Added caching of some properties in Styles object
Fixed
- Fixed DataTable row not updating after add https://github.com/Textualize/textual/issues/1026
- Fixed issues with animation. Now objects of different types may be animated.
- Fixed containers with transparent background not showing borders https://github.com/Textualize/textual/issues/1175
- Fixed auto-width in horizontal containers https://github.com/Textualize/textual/pull/1155
- Fixed Input cursor invisible when placeholder empty https://github.com/Textualize/textual/pull/1202
- Fixed deadlock when removing widgets from the App https://github.com/Textualize/textual/pull/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.mountandWidget.mount. Both methods now simply take one or more widgets as positional arguments. DOMNode.query_onenow raises aTooManyMatchesexception if there is more than one matching node. https://github.com/Textualize/textual/issues/1096App.mountandWidget.mounthave newbeforeandafterparameters https://github.com/Textualize/textual/issues/778
Added
- Added
initparam to reactive.watch CSS_PATHcan now be a list of CSS files https://github.com/Textualize/textual/pull/1079- Added
DOMQuery.only_onehttps://github.com/Textualize/textual/issues/1096 - Writes to stdout are now done in a thread, for smoother animation. https://github.com/Textualize/textual/pull/1104
0.3.0 - 2022-10-31
Fixed
- Fixed issue where scrollbars weren't being unmounted
- Fixed fr units for horizontal and vertical layouts https://github.com/Textualize/textual/pull/1067
- Fixed
textual runbreaking sys.argv https://github.com/Textualize/textual/issues/1064 - Fixed footer not updating styles when toggling dark mode
- Fixed how the app title in a
Headeris centred https://github.com/Textualize/textual/issues/1060 - Fixed the swapping of button variants https://github.com/Textualize/textual/issues/1048
- Fixed reserved characters in screenshots https://github.com/Textualize/textual/issues/993
- Fixed issue with TextLog max_lines https://github.com/Textualize/textual/issues/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 runso that it patchesargvin more situations - DOM classes and IDs are now always treated fully case-sensitive https://github.com/Textualize/textual/issues/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 https://github.com/Textualize/textual/pull/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 https://github.com/willmcgugan/textual/issues/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