diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bac453e87..6caa1e9249 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Fixed type hint aliasing for App under TYPE_CHECKING https://github.com/Textualize/textual/pull/6152 +### Changed + +- Simplified system commands (command palette) to a single word https://github.com/Textualize/textual/pull/6183 + ## [6.3.0] - 2025-10-11 ### Added diff --git a/src/textual/app.py b/src/textual/app.py index dd91424ffa..839d746e94 100644 --- a/src/textual/app.py +++ b/src/textual/app.py @@ -518,7 +518,7 @@ class MyApp(App[None]): "inline": lambda app: app.is_inline, "ansi": lambda app: app.ansi_color, "nocolor": lambda app: app.no_color, - } # type: ignore[assignment] + } title: Reactive[str] = Reactive("", compute=False) """The title of the app, displayed in the header.""" @@ -1256,25 +1256,25 @@ def get_system_commands(self, screen: Screen) -> Iterable[SystemCommand]: """ if not self.ansi_color: yield SystemCommand( - "Change theme", + "Theme", "Change the current theme", self.action_change_theme, ) yield SystemCommand( - "Quit the application", + "Quit", "Quit the application as soon as possible", self.action_quit, ) if screen.query("HelpPanel"): yield SystemCommand( - "Hide keys and help panel", + "Keys", "Hide the keys and widget help panel", self.action_hide_help_panel, ) else: yield SystemCommand( - "Show keys and help panel", + "Keys", "Show help for the focused widget and a summary of available keys", self.action_show_help_panel, ) @@ -1291,7 +1291,7 @@ def get_system_commands(self, screen: Screen) -> Iterable[SystemCommand]: ) yield SystemCommand( - "Save screenshot", + "Screenshot", "Save an SVG 'screenshot' of the current screen", lambda: self.set_timer(0.1, self.deliver_screenshot), ) diff --git a/src/textual/dom.py b/src/textual/dom.py index c0d80ee3b7..7618016ded 100644 --- a/src/textual/dom.py +++ b/src/textual/dom.py @@ -179,7 +179,7 @@ class DOMNode(MessagePump): # Names of potential computed reactives _computes: ClassVar[frozenset[str]] - _PSEUDO_CLASSES: ClassVar[dict[str, Callable[[object], bool]]] = {} + _PSEUDO_CLASSES: ClassVar[dict[str, Callable[[App[Any]], bool]]] = {} """Pseudo class checks.""" def __init__( diff --git a/tests/snapshot_tests/__snapshots__/test_snapshots/test_ansi_command_palette.svg b/tests/snapshot_tests/__snapshots__/test_snapshots/test_ansi_command_palette.svg index 3239f025e4..8023e54db4 100644 --- a/tests/snapshot_tests/__snapshots__/test_snapshots/test_ansi_command_palette.svg +++ b/tests/snapshot_tests/__snapshots__/test_snapshots/test_ansi_command_palette.svg @@ -131,7 +131,7 @@ - + RedMagentaRedMagentaRedMagentaRedMagentaRedMagentaRedMagentaRed MagentaRedMagentaRedMagentaRedMagentaRedMagentaRedMagentaRed @@ -141,12 +141,12 @@ πŸ”ŽSearch for commands… -Quit the application -Quit the application as soon as possible -Save screenshot -Save an SVG 'screenshot' of the current screen -Show keys and help panel -Show help for the focused widget and a summary of available keys +Keys +Show help for the focused widget and a summary of available keys +Quit +Quit the application as soon as possible +Screenshot +Save an SVG 'screenshot' of the current screen ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁ MagentaRedMagentaRedMagentaRedMagentaRedMagentaRedMagentaRed MagentaRedMagentaRedMagentaRedMagentaRedMagentaRedMagentaRed diff --git a/tests/snapshot_tests/__snapshots__/test_snapshots/test_system_commands.svg b/tests/snapshot_tests/__snapshots__/test_snapshots/test_system_commands.svg index 92cda48848..eaa6db537f 100644 --- a/tests/snapshot_tests/__snapshots__/test_snapshots/test_system_commands.svg +++ b/tests/snapshot_tests/__snapshots__/test_snapshots/test_system_commands.svg @@ -146,7 +146,7 @@ - + β–Šβ–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–”β–Ž β–Šβ–Ž @@ -156,16 +156,16 @@ πŸ”ŽSearch for commands… -Change theme -Change the current theme +Keys +Show help for the focused widget and a summary of available keys Maximize Maximize the focused widget -Quit the application +Quit Quit the application as soon as possible -Save screenshot +Screenshot Save an SVG 'screenshot' of the current screen -Show keys and help panel -Show help for the focused widget and a summary of available keys +Theme +Change the current theme ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁