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

Up and down keys don't appear in Footer #2219

Closed
darrenburns opened this issue Apr 5, 2023 · 4 comments
Closed

Up and down keys don't appear in Footer #2219

darrenburns opened this issue Apr 5, 2023 · 4 comments
Assignees
Labels
bug Something isn't working Task

Comments

@darrenburns
Copy link
Member

darrenburns commented Apr 5, 2023

If you have bindings which use the keys up or down, they don't appear in the footer.

Example:

from textual.app import App, ComposeResult
from textual.binding import Binding
from textual.widgets import Footer


class Example(App):
    BINDINGS = [
        Binding("up", description="Up", action="up"),
        Binding("down", description="Down", action="down", priority=True),
    ]

    def compose(self) -> ComposeResult:
        yield Footer()


app = Example()
if __name__ == '__main__':
    app.run()

When you run the app, the Footer widget contains no content.

Textual Diagnostics

Versions

Name Value
Textual 0.17.3
Rich 13.3.3

Python

Name Value
Version 3.10.8
Implementation CPython
Compiler Clang 14.0.0 (clang-1400.0.29.102)
Executable /Users/darrenburns/Library/Caches/pypoetry/virtualenvs/textual-questions-mTRhYy7u-py3.10/bin/python

Operating System

Name Value
System Darwin
Release 21.6.0
Version Darwin Kernel Version 21.6.0: Mon Dec 19 20:44:01 PST 2022; root:xnu-8020.240.18~2/RELEASE_X86_64

Terminal

Name Value
Terminal Application iTerm.app (3.4.16)
TERM xterm-256color
COLORTERM truecolor
FORCE_COLOR Not set
NO_COLOR Not set

Rich Console options

Name Value
size width=101, height=56
legacy_windows False
min_width 1
max_width 101
is_terminal True
encoding utf-8
max_height 56
justify None
overflow None
no_wrap False
highlight None
markup None
height None
@willmcgugan
Copy link
Collaborator

Suspect this is due to those keys being bound in Widget, with show=False.

What happens if you set priority=True on those bindings?

@rodrigogiraoserrao
Copy link
Contributor

Suspect this is due to those keys being bound in Widget, with show=False.

What happens if you set priority=True on those bindings?

Maybe not in this MRE, but the app where I and Darren saw this issue had priority=True.

@davep
Copy link
Contributor

davep commented Apr 19, 2023

Seems pretty clear that this is a dupe of #2100 so I'll close this and track it via that.

@davep davep closed this as completed Apr 19, 2023
@github-actions
Copy link

Don't forget to star the repository!

Follow @textualizeio for Textual updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Task
Projects
None yet
Development

No branches or pull requests

4 participants