Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(header): show command palette tooltip only when enabled #5427

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 1 addition & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased - 2025

### Changed

- Footer can now be scrolled horizontally without holding `shift` https://github.com/Textualize/textual/pull/5404
- The content of an `Input` will now only be automatically selected when the widget is focused by the user, not when the app itself has regained focus (similar to web browsers). https://github.com/Textualize/textual/pull/5379
- `Pilot.mouse_down` and `Pilot.mouse_up` now issue a prior `MouseMove` event, to more closely reflect real mouse actions. https://github.com/Textualize/textual/pull/5409
- Snapshots tests now discard meta, which should reduce test breaking with no visual differences https://github.com/Textualize/textual/pull/5409

### Added

- Added `Select.type_to_search` which allows you to type to move the cursor to a matching option https://github.com/Textualize/textual/pull/5403
Expand Down Expand Up @@ -46,6 +39,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Fixed Log widget not refreshing on resize https://github.com/Textualize/textual/pull/5460
- Fixed special case with calculating the height of a container where all children have dynamic heights https://github.com/Textualize/textual/pull/5463
- Fixed scrollbars ignoring background opacity https://github.com/Textualize/textual/issues/5458
- Fixed `Header` icon showing command palette tooltip when disabled https://github.com/Textualize/textual/pull/5427


## [1.0.0] - 2024-12-12
Expand Down
5 changes: 4 additions & 1 deletion src/textual/widgets/_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ class HeaderIcon(Widget):
"""The character to use as the icon within the header."""

def on_mount(self) -> None:
self.tooltip = "Open the command palette"
if self.app.ENABLE_COMMAND_PALETTE:
self.tooltip = "Open the command palette"
else:
self.disabled = True

async def on_click(self, event: Click) -> None:
"""Launch the command palette when icon is clicked."""
Expand Down
Loading