Skip to content

Commit 4dc8358

Browse files
authored
new release (#3316)
1 parent ce32abd commit 4dc8358

File tree

3 files changed

+89
-3
lines changed

3 files changed

+89
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

8-
## Unreleased
8+
## [0.37.0] 2023-09-15
99

1010
### Added
1111

@@ -19,7 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1919
- `Screen.sub_title`
2020
- Properties `Header.screen_title` and `Header.screen_sub_title` https://github.com/Textualize/textual/pull/3199
2121
- Added `DirectoryTree.DirectorySelected` message https://github.com/Textualize/textual/issues/3200
22-
- Added `widgets.Collapsible` contributed buy Sunyoung Yoo https://github.com/Textualize/textual/pull/2989
22+
- Added `widgets.Collapsible` contributed by Sunyoung Yoo https://github.com/Textualize/textual/pull/2989
2323

2424
### Fixed
2525

@@ -1276,6 +1276,7 @@ https://textual.textualize.io/blog/2022/11/08/version-040/#version-040
12761276
- New handler system for messages that doesn't require inheritance
12771277
- Improved traceback handling
12781278

1279+
[0.37.0]: https://github.com/Textualize/textual/compare/v0.36.0...v0.37.0
12791280
[0.36.0]: https://github.com/Textualize/textual/compare/v0.35.1...v0.36.0
12801281
[0.35.1]: https://github.com/Textualize/textual/compare/v0.35.0...v0.35.1
12811282
[0.35.0]: https://github.com/Textualize/textual/compare/v0.34.0...v0.35.0

docs/blog/posts/release0.37.0.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
draft: false
3+
date: 2023-09-15
4+
categories:
5+
- Release
6+
title: "Textual 0.37.0 adds a command palette"
7+
authors:
8+
- willmcgugan
9+
---
10+
11+
12+
# Textual 0.37.0 adds a command palette
13+
14+
Textual version 0.37.0 has landed!
15+
The highlight of these release is the new command palette.
16+
17+
<!-- more -->
18+
19+
A command palette gives users quick access to features in your app.
20+
If you hit ctrl+backslash in a Textual app, it will bring up the command palette where you can start typing commands.
21+
The commands are matched with a *fuzzy* search, so you only need to type two or three characters to get to any command.
22+
23+
Here's a video of it in action:
24+
25+
<div class="video-wrapper">
26+
<iframe width="1280" height="auto" src="https://www.youtube.com/embed/sOMIkjmM4MY" title="" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>
27+
</div>
28+
29+
Adding your own commands to the command palette is a piece of cake.
30+
Here's the (command) Provider class used in the example above:
31+
32+
```python
33+
class ColorCommands(Provider):
34+
"""A command provider to select colors."""
35+
36+
async def search(self, query: str) -> Hits:
37+
"""Called for each key."""
38+
matcher = self.matcher(query)
39+
for color in COLOR_NAME_TO_RGB.keys():
40+
score = matcher.match(color)
41+
if score > 0:
42+
yield Hit(
43+
score,
44+
matcher.highlight(color),
45+
partial(self.app.post_message, SwitchColor(color)),
46+
)
47+
```
48+
49+
And here is how you add a provider to you app:
50+
51+
```python
52+
class ColorApp(App):
53+
"""Experiment with the command palette."""
54+
55+
COMMANDS = App.COMMANDS | {ColorCommands}
56+
```
57+
58+
We're excited about this feature because it is a step towards brining a common user interface to Textual apps.
59+
60+
!!! quote
61+
62+
It's a Textual app. I know this.
63+
64+
&mdash; You, maybe.
65+
66+
The goal is to be able to build apps that may look quite different, but take no time to learn, because once you learn how to use one Textual app, you can use them all.
67+
68+
See the Guide for details on how to work with the [command palette](../../guide/command_palette.md).
69+
70+
## What else?
71+
72+
Also in 0.37.0 we have a new [Collapsible](/widget_gallery/#collapsible) widget, which is a great way of adding content while avoiding a cluttered screen.
73+
74+
And of course, bug fixes and other updates. See the [release](https://github.com/Textualize/textual/releases/tag/v0.37.0) page for the full details.
75+
76+
## What's next?
77+
78+
Coming very soon, is a new TextEditor widget.
79+
This is a super powerful widget to enter arbitrary text, with beautiful syntax highlighting for a number of languages.
80+
We're expecting that to land next week.
81+
Watch this space, or join the [Discord server](https://discord.gg/Enf6Z3qhVr) if you want to be the first to try it out.
82+
83+
## Join us
84+
85+
Join our [Discord server](https://discord.gg/Enf6Z3qhVr) if you want to discuss Textual with the Textualize devs, or the community.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "textual"
3-
version = "0.36.0"
3+
version = "0.37.0"
44
homepage = "https://github.com/Textualize/textual"
55
repository = "https://github.com/Textualize/textual"
66
documentation = "https://textual.textualize.io/"

0 commit comments

Comments
 (0)