mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
merged changelog
This commit is contained in:
@@ -1,13 +1,12 @@
|
|||||||
# Change Log
|
# Change Log
|
||||||
|
|
||||||
|
|
||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
||||||
and this project adheres to [Semantic Versioning](http://semver.org/).
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
|
|
||||||
## [0.6.0]
|
## [0.6.0] - Unreleased
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
@@ -18,7 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
- Rebuilt `DirectoryTree` with new `Tree` control.
|
- Rebuilt `DirectoryTree` with new `Tree` control.
|
||||||
|
|
||||||
## [0.5.0] - Unreleased
|
## [0.5.0] - 2022-11-20
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ Here's a quick example of its use. It works like a dictionary until you reach a
|
|||||||
{'bar': 2, 'baz': 3, 'egg': 4}
|
{'bar': 2, 'baz': 3, 'egg': 4}
|
||||||
```
|
```
|
||||||
|
|
||||||
In Textual, we use a [LRUCache](https://github.com/Textualize/textual/search?q=LRUCache) to store the results of rendering content to the terminal. For example, in a [datatable](https://twitter.com/search?q=%23textualdatatable) it is too costly to render everything up front. So Textual renders only the lines that are currently visible on the "screen". The cache ensures that scrolling only needs to render the newly exposed lines, and lines that haven't been displayed in a while are discarded to save memory.
|
In Textual, we use a [LRUCache](https://github.com/Textualize/textual/search?q=LRUCache) to store the results of rendering content to the terminal. For example, in a [datatable](https://twitter.com/search?q=%23textualdatatable&src=typed_query&f=live) it is too costly to render everything up front. So Textual renders only the lines that are currently visible on the "screen". The cache ensures that scrolling only needs to render the newly exposed lines, and lines that haven't been displayed in a while are discarded to save memory.
|
||||||
|
|
||||||
|
|
||||||
## Color
|
## Color
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "textual"
|
name = "textual"
|
||||||
version = "0.4.0"
|
version = "0.5.0"
|
||||||
homepage = "https://github.com/Textualize/textual"
|
homepage = "https://github.com/Textualize/textual"
|
||||||
description = "Modern Text User Interface framework"
|
description = "Modern Text User Interface framework"
|
||||||
authors = ["Will McGugan <will@textualize.io>"]
|
authors = ["Will McGugan <will@textualize.io>"]
|
||||||
|
|||||||
@@ -2011,7 +2011,7 @@ class App(Generic[ReturnType], DOMNode):
|
|||||||
for children in reversed(node_children):
|
for children in reversed(node_children):
|
||||||
# Closing children can be done asynchronously.
|
# Closing children can be done asynchronously.
|
||||||
close_messages = [
|
close_messages = [
|
||||||
child._close_messages() for child in children if child._running
|
child._close_messages(wait=True) for child in children if child._running
|
||||||
]
|
]
|
||||||
# TODO: What if a message pump refuses to exit?
|
# TODO: What if a message pump refuses to exit?
|
||||||
if close_messages:
|
if close_messages:
|
||||||
@@ -2019,7 +2019,7 @@ class App(Generic[ReturnType], DOMNode):
|
|||||||
for child in children:
|
for child in children:
|
||||||
self._unregister(child)
|
self._unregister(child)
|
||||||
|
|
||||||
await root._close_messages()
|
await root._close_messages(wait=False)
|
||||||
self._unregister(root)
|
self._unregister(root)
|
||||||
|
|
||||||
async def action_check_bindings(self, key: str) -> None:
|
async def action_check_bindings(self, key: str) -> None:
|
||||||
|
|||||||
@@ -284,7 +284,7 @@ class MessagePump(metaclass=MessagePumpMeta):
|
|||||||
async def _on_close_messages(self, message: messages.CloseMessages) -> None:
|
async def _on_close_messages(self, message: messages.CloseMessages) -> None:
|
||||||
await self._close_messages()
|
await self._close_messages()
|
||||||
|
|
||||||
async def _close_messages(self) -> None:
|
async def _close_messages(self, wait: bool = True) -> None:
|
||||||
"""Close message queue, and optionally wait for queue to finish processing."""
|
"""Close message queue, and optionally wait for queue to finish processing."""
|
||||||
if self._closed or self._closing:
|
if self._closed or self._closing:
|
||||||
return
|
return
|
||||||
@@ -296,7 +296,7 @@ class MessagePump(metaclass=MessagePumpMeta):
|
|||||||
await self._message_queue.put(events.Unmount(sender=self))
|
await self._message_queue.put(events.Unmount(sender=self))
|
||||||
Reactive._reset_object(self)
|
Reactive._reset_object(self)
|
||||||
await self._message_queue.put(None)
|
await self._message_queue.put(None)
|
||||||
if self._task is not None and asyncio.current_task() != self._task:
|
if wait and self._task is not None and asyncio.current_task() != self._task:
|
||||||
# Ensure everything is closed before returning
|
# Ensure everything is closed before returning
|
||||||
await self._task
|
await self._task
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user