Skip to content

Commit 0b2b47d

Browse files
authored
Merge pull request #6183 from Textualize/simple-commands
Simple commands
2 parents 86ffb00 + 3be2d54 commit 0b2b47d

File tree

5 files changed

+25
-21
lines changed

5 files changed

+25
-21
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1111

1212
- Fixed type hint aliasing for App under TYPE_CHECKING https://github.com/Textualize/textual/pull/6152
1313

14+
### Changed
15+
16+
- Simplified system commands (command palette) to a single word https://github.com/Textualize/textual/pull/6183
17+
1418
## [6.3.0] - 2025-10-11
1519

1620
### Added

src/textual/app.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ class MyApp(App[None]):
518518
"inline": lambda app: app.is_inline,
519519
"ansi": lambda app: app.ansi_color,
520520
"nocolor": lambda app: app.no_color,
521-
} # type: ignore[assignment]
521+
}
522522

523523
title: Reactive[str] = Reactive("", compute=False)
524524
"""The title of the app, displayed in the header."""
@@ -1256,25 +1256,25 @@ def get_system_commands(self, screen: Screen) -> Iterable[SystemCommand]:
12561256
"""
12571257
if not self.ansi_color:
12581258
yield SystemCommand(
1259-
"Change theme",
1259+
"Theme",
12601260
"Change the current theme",
12611261
self.action_change_theme,
12621262
)
12631263
yield SystemCommand(
1264-
"Quit the application",
1264+
"Quit",
12651265
"Quit the application as soon as possible",
12661266
self.action_quit,
12671267
)
12681268

12691269
if screen.query("HelpPanel"):
12701270
yield SystemCommand(
1271-
"Hide keys and help panel",
1271+
"Keys",
12721272
"Hide the keys and widget help panel",
12731273
self.action_hide_help_panel,
12741274
)
12751275
else:
12761276
yield SystemCommand(
1277-
"Show keys and help panel",
1277+
"Keys",
12781278
"Show help for the focused widget and a summary of available keys",
12791279
self.action_show_help_panel,
12801280
)
@@ -1291,7 +1291,7 @@ def get_system_commands(self, screen: Screen) -> Iterable[SystemCommand]:
12911291
)
12921292

12931293
yield SystemCommand(
1294-
"Save screenshot",
1294+
"Screenshot",
12951295
"Save an SVG 'screenshot' of the current screen",
12961296
lambda: self.set_timer(0.1, self.deliver_screenshot),
12971297
)

src/textual/dom.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class DOMNode(MessagePump):
179179
# Names of potential computed reactives
180180
_computes: ClassVar[frozenset[str]]
181181

182-
_PSEUDO_CLASSES: ClassVar[dict[str, Callable[[object], bool]]] = {}
182+
_PSEUDO_CLASSES: ClassVar[dict[str, Callable[[App[Any]], bool]]] = {}
183183
"""Pseudo class checks."""
184184

185185
def __init__(

0 commit comments

Comments
 (0)