mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Merge branch 'main' into tree-lines-fix
This commit is contained in:
@@ -7,9 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fixed crash when creating a `DirectoryTree` starting anywhere other than `.`
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- The DataTable cursor is now scrolled into view when the cursor coordinate is changed programmatically https://github.com/Textualize/textual/issues/2459
|
- The DataTable cursor is now scrolled into view when the cursor coordinate is changed programmatically https://github.com/Textualize/textual/issues/2459
|
||||||
|
- run_worker exclusive parameter is now `False` by default https://github.com/Textualize/textual/pull/2470
|
||||||
- Added `always_update` as an optional argument for `reactive.var`
|
- Added `always_update` as an optional argument for `reactive.var`
|
||||||
|
|
||||||
## [0.23.0] - 2023-05-03
|
## [0.23.0] - 2023-05-03
|
||||||
|
|||||||
29
FAQ.md
29
FAQ.md
@@ -2,20 +2,22 @@
|
|||||||
<!-- Do not edit by hand! -->
|
<!-- Do not edit by hand! -->
|
||||||
|
|
||||||
# Frequently Asked Questions
|
# Frequently Asked Questions
|
||||||
- [Does Textual support images?](#does-textual-support-images)
|
- [Frequently Asked Questions](#frequently-asked-questions)
|
||||||
- [How can I fix ImportError cannot import name ComposeResult from textual.app ?](#how-can-i-fix-importerror-cannot-import-name-composeresult-from-textualapp-)
|
- [Does Textual support images?](#does-textual-support-images)
|
||||||
- [How can I select and copy text in a Textual app?](#how-can-i-select-and-copy-text-in-a-textual-app)
|
- [How can I fix ImportError cannot import name ComposeResult from textual.app ?](#how-can-i-fix-importerror-cannot-import-name-composeresult-from-textualapp-)
|
||||||
- [How can I set a translucent app background?](#how-can-i-set-a-translucent-app-background)
|
- [How can I select and copy text in a Textual app?](#how-can-i-select-and-copy-text-in-a-textual-app)
|
||||||
- [How do I center a widget in a screen?](#how-do-i-center-a-widget-in-a-screen)
|
- [How can I set a translucent app background?](#how-can-i-set-a-translucent-app-background)
|
||||||
- [How do I pass arguments to an app?](#how-do-i-pass-arguments-to-an-app)
|
- [How do I center a widget in a screen?](#how-do-i-center-a-widget-in-a-screen)
|
||||||
- [Why do some key combinations never make it to my app?](#why-do-some-key-combinations-never-make-it-to-my-app)
|
- [How do I pass arguments to an app?](#how-do-i-pass-arguments-to-an-app)
|
||||||
- [Why doesn't Textual look good on macOS?](#why-doesn't-textual-look-good-on-macos)
|
- [Why do some key combinations never make it to my app?](#why-do-some-key-combinations-never-make-it-to-my-app)
|
||||||
- [Why doesn't Textual support ANSI themes?](#why-doesn't-textual-support-ansi-themes)
|
- [Why doesn't Textual look good on macOS?](#why-doesnt-textual-look-good-on-macos)
|
||||||
|
- [Why doesn't Textual support ANSI themes?](#why-doesnt-textual-support-ansi-themes)
|
||||||
|
- [Why doesn't the `DataTable` scroll programmatically?](#why-doesnt-the-datatable-scroll-programmatically)
|
||||||
|
|
||||||
<a name="does-textual-support-images"></a>
|
<a name="does-textual-support-images"></a>
|
||||||
## Does Textual support images?
|
## Does Textual support images?
|
||||||
|
|
||||||
Textual doesn't have built in support for images yet, but it is on the [Roadmap](https://textual.textualize.io/roadmap/).
|
Textual doesn't have built-in support for images yet, but it is on the [Roadmap](https://textual.textualize.io/roadmap/).
|
||||||
|
|
||||||
See also the [rich-pixels](https://github.com/darrenburns/rich-pixels) project for a Rich renderable for images that works with Textual.
|
See also the [rich-pixels](https://github.com/darrenburns/rich-pixels) project for a Rich renderable for images that works with Textual.
|
||||||
|
|
||||||
@@ -231,6 +233,13 @@ Textual has a design system which guarantees apps will be readable on all platfo
|
|||||||
|
|
||||||
There is currently a light and dark version of the design system, but more are planned. It will also be possible for users to customize the source colors on a per-app or per-system basis. This means that in the future you will be able to modify the core colors to blend in with your chosen terminal theme.
|
There is currently a light and dark version of the design system, but more are planned. It will also be possible for users to customize the source colors on a per-app or per-system basis. This means that in the future you will be able to modify the core colors to blend in with your chosen terminal theme.
|
||||||
|
|
||||||
|
<a name="why-doesn't-the-`datatable`-scroll-programmatically"></a>
|
||||||
|
## Why doesn't the `DataTable` scroll programmatically?
|
||||||
|
|
||||||
|
If scrolling in your `DataTable` is _apparently_ broken, it may be because your `DataTable` is using the default value of `height: auto`.
|
||||||
|
This means that the table will be sized to fit its rows without scrolling, which may cause the *container* (typically the screen) to scroll.
|
||||||
|
If you would like the table itself to scroll, set the height to something other than `auto`, like `100%`.
|
||||||
|
|
||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
Generated by [FAQtory](https://github.com/willmcgugan/faqtory)
|
Generated by [FAQtory](https://github.com/willmcgugan/faqtory)
|
||||||
|
|||||||
@@ -5,13 +5,13 @@ Your questions should go in this directory.
|
|||||||
|
|
||||||
Question files should be named with the extension ".question.md".
|
Question files should be named with the extension ".question.md".
|
||||||
|
|
||||||
To build the faq, install [faqtory](https://github.com/willmcgugan/faqtory) if you haven't already:
|
To build the FAQ, install [faqtory](https://github.com/willmcgugan/faqtory) if you haven't already:
|
||||||
|
|
||||||
```
|
```
|
||||||
pip install faqtory
|
pip install faqtory
|
||||||
```
|
```
|
||||||
|
|
||||||
The run the following from the top of the repository:
|
Then run the following from the top of the repository:
|
||||||
|
|
||||||
```
|
```
|
||||||
faqtory build
|
faqtory build
|
||||||
|
|||||||
10
questions/datatable-doesnt-scroll.question.md
Normal file
10
questions/datatable-doesnt-scroll.question.md
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
title: "Why doesn't the `DataTable` scroll programmatically?"
|
||||||
|
alt_titles:
|
||||||
|
- "Scroll bindings from `DataTable` not working."
|
||||||
|
- "Datatable cursor goes off screen and doesn't scroll."
|
||||||
|
---
|
||||||
|
|
||||||
|
If scrolling in your `DataTable` is _apparently_ broken, it may be because your `DataTable` is using the default value of `height: auto`.
|
||||||
|
This means that the table will be sized to fit its rows without scrolling, which may cause the *container* (typically the screen) to scroll.
|
||||||
|
If you would like the table itself to scroll, set the height to something other than `auto`, like `100%`.
|
||||||
@@ -3,9 +3,8 @@ title: "Does Textual support images?"
|
|||||||
alt_titles:
|
alt_titles:
|
||||||
- "Can Textual display PNG / SVG files?"
|
- "Can Textual display PNG / SVG files?"
|
||||||
- "Render images"
|
- "Render images"
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
Textual doesn't have built in support for images yet, but it is on the [Roadmap](https://textual.textualize.io/roadmap/).
|
Textual doesn't have built-in support for images yet, but it is on the [Roadmap](https://textual.textualize.io/roadmap/).
|
||||||
|
|
||||||
See also the [rich-pixels](https://github.com/darrenburns/rich-pixels) project for a Rich renderable for images that works with Textual.
|
See also the [rich-pixels](https://github.com/darrenburns/rich-pixels) project for a Rich renderable for images that works with Textual.
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ class DOMNode(MessagePump):
|
|||||||
description: str = "",
|
description: str = "",
|
||||||
exit_on_error: bool = True,
|
exit_on_error: bool = True,
|
||||||
start: bool = True,
|
start: bool = True,
|
||||||
exclusive: bool = True,
|
exclusive: bool = False,
|
||||||
) -> Worker[ResultType]:
|
) -> Worker[ResultType]:
|
||||||
"""Run work in a worker.
|
"""Run work in a worker.
|
||||||
|
|
||||||
|
|||||||
@@ -103,7 +103,6 @@ class DirectoryTree(Tree[DirEntry]):
|
|||||||
classes: A space-separated list of classes, or None for no classes.
|
classes: A space-separated list of classes, or None for no classes.
|
||||||
disabled: Whether the directory tree is disabled or not.
|
disabled: Whether the directory tree is disabled or not.
|
||||||
"""
|
"""
|
||||||
self.path = path
|
|
||||||
super().__init__(
|
super().__init__(
|
||||||
str(path),
|
str(path),
|
||||||
data=DirEntry(Path(path)),
|
data=DirEntry(Path(path)),
|
||||||
@@ -112,6 +111,7 @@ class DirectoryTree(Tree[DirEntry]):
|
|||||||
classes=classes,
|
classes=classes,
|
||||||
disabled=disabled,
|
disabled=disabled,
|
||||||
)
|
)
|
||||||
|
self.path = path
|
||||||
|
|
||||||
def reload(self) -> None:
|
def reload(self) -> None:
|
||||||
"""Reload the `DirectoryTree` contents."""
|
"""Reload the `DirectoryTree` contents."""
|
||||||
|
|||||||
Reference in New Issue
Block a user