You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+47-2Lines changed: 47 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,10 +7,53 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
7
7
8
8
## Unreleased
9
9
10
+
10
11
### Changed
11
12
12
13
- Breaking change: `App.query` and friends will now always query the default (first) screen, not necessarily the active screen.
13
14
- Content now has a default argument of an empty string, so `Content()` is equivalent to `Content("")`
15
+
- Assigned names to Textual-specific threads: `textual-input`, `textual-output`. These should become visible in monitoring tools (ps, top, htop) as of Python 3.14. https://github.com/Textualize/textual/pull/5654
16
+
- Tabs now accept Content or content markup https://github.com/Textualize/textual/pull/5657
17
+
- Buttons will now use Textual markup rather than console markup
18
+
- tree-sitter languages are now loaded lazily, improving cold-start time https://github.com/Textualize/textual/pull/563
19
+
20
+
### Fixed
21
+
22
+
- Static and Label now accept Content objects, satisfying type checkers https://github.com/Textualize/textual/pull/5618
23
+
- Fixed click selection not being disabled when allow_select was set to false https://github.com/Textualize/textual/issues/5627
24
+
- Fixed crash on clicking line API border https://github.com/Textualize/textual/pull/5641
25
+
- Fixed additional spaces after text-wrapping https://github.com/Textualize/textual/pull/5657
26
+
- Added missing `scroll_end` parameter to the `Log.write_line` method https://github.com/Textualize/textual/pull/5672
27
+
- Restored support for blink https://github.com/Textualize/textual/pull/5675
28
+
29
+
### Added
30
+
31
+
- Added Widget.preflight_checks to perform some debug checks after a widget is instantiated, to catch common errors. https://github.com/Textualize/textual/pull/5588
- Fixed command palette fuzzy search bailing too early https://github.com/Textualize/textual/pull/5579
45
+
46
+
## [2.1.1] - 2025-02-22
47
+
48
+
### Fixed
49
+
50
+
- Fixed `Link` binding to open the link https://github.com/Textualize/textual/issues/5564
51
+
- Fixed IndexError in OptionList https://github.com/Textualize/textual/pull/5574
52
+
- Fixed issue with clear_panes breaking tabbed content https://github.com/Textualize/textual/pull/5573
53
+
54
+
## Changed
55
+
56
+
- The user can now interrupt a scroll to end by grabbing the scrollbar or scrolling in any other way. Press ++end++ or scroll to the end to restore default behavior. This is more intuitive that it may sound.
14
57
15
58
## [2.1.0] - 2025-02-19
16
59
@@ -97,11 +140,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
97
140
### Changed
98
141
99
142
- Breaking change: OptionList no longer supports `Separator`, a separator may be specified with `None`
100
-
- Implemented smooth (pixel perfect) scrolling on supported terminals. Set `TEXTUAL_SMOOTH_SCROLL=0` to disable.
143
+
- Implemented smooth (pixel perfect) scrolling on supported terminals. Set `TEXTUAL_SMOOTH_SCROLL=0` to disable.
Copy file name to clipboardExpand all lines: docs/getting_started.md
+10-2Lines changed: 10 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,25 @@
1
+
1
2
All you need to get started building Textual apps.
2
3
3
4
## Requirements
4
5
5
6
Textual requires Python 3.8 or later (if you have a choice, pick the most recent Python). Textual runs on Linux, macOS, Windows and probably any OS where Python also runs.
6
7
7
-
!!! info inline end "Your platform"
8
+
!!! info "Your platform"
8
9
9
10
### :fontawesome-brands-linux: Linux (all distros)
10
11
11
12
All Linux distros come with a terminal emulator that can run Textual apps.
12
13
13
14
### :material-apple: macOS
14
15
15
-
The default terminal app is limited to 256 colors. We recommend installing a newer terminal such as [iterm2](https://iterm2.com/), [Kitty](https://sw.kovidgoyal.net/kitty/), or [WezTerm](https://wezfurlong.org/wezterm/).
16
+
The default terminal app is limited to 256 colors. We recommend installing a newer terminal such as [iterm2](https://iterm2.com/), [Ghostty](https://ghostty.org/), [Kitty](https://sw.kovidgoyal.net/kitty/), or [WezTerm](https://wezfurlong.org/wezterm/).
16
17
17
18
### :material-microsoft-windows: Windows
18
19
19
20
The new [Windows Terminal](https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701?hl=en-gb&gl=GB) runs Textual apps beautifully.
20
21
22
+
21
23
## Installation
22
24
23
25
Here's how to install Textual.
@@ -36,6 +38,12 @@ If you plan on developing Textual apps, you should also install textual develope
36
38
pip install textual-dev
37
39
```
38
40
41
+
If you would like to enable syntax highlighting in the [TextArea](./widgets/text_area.md) widget, you should specify the "syntax" extras when you install Textual:
42
+
43
+
```
44
+
pip install "textual[syntax]"
45
+
```
46
+
39
47
### From conda-forge
40
48
41
49
Textual is also available on [conda-forge](https://conda-forge.org/). The preferred package manager for conda-forge is currently [micromamba](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html):
Copy file name to clipboardExpand all lines: docs/guide/input.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -185,6 +185,15 @@ You can create priority key bindings by setting `priority=True` on the Binding o
185
185
The [footer](../widgets/footer.md) widget can inspect bindings to display available keys. If you don't want a binding to display in the footer you can set `show=False`. The default bindings on App do this so that the standard ++ctrl+c++, ++tab++ and ++shift+tab++ bindings don't typically appear in the footer.
186
186
187
187
188
+
### Dynamic bindings?
189
+
190
+
You may find you have bindings which are not always applicable given the current state of your app.
191
+
For instance a "Save file" binding when there are no changes to save.
192
+
It wouldn't be a good user experience if the save key did nothing, or raised an error.
193
+
194
+
Textual doesn't support modifying the bindings at runtime, but you can accomplish this with [dynamic actions](./actions.md#dynamic-actions) which offers greater flexibility.
195
+
196
+
188
197
## Mouse Input
189
198
190
199
Textual will send events in response to mouse movement and mouse clicks. These events contain the coordinates of the mouse cursor relative to the terminal or widget.
Copy file name to clipboardExpand all lines: docs/widgets/button.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ This widget has no component classes.
51
51
52
52
## Additional Notes
53
53
54
-
- The spacing between the text and the edges of a button are _not_ due to padding. The default styling for a `Button`has the `height` set to 3 lines and a `min-width` of 16 columns. To create a button with zero visible padding, you will need to change these values and also remove the border with `border: none;`.
54
+
- The spacing between the text and the edges of a button are _not_ due to padding. The default styling for a `Button`includes borders and a `min-width` of 16 columns. To remove the spacing, set `border: none;` in your CSS and adjust the minimum width as needed.
0 commit comments