Skip to content

[Improvement] Add/expose API to update Footer's Bindings  #1057

@epi052

Description

@epi052

First off, thank you for textual, it's pretty darn great!

Second, this isn't a bug, nor is it a full feature.

It would be awesome if there were a way to easily update the footer's bindings, specifically their attributes like description/visibility. I was definitely surprised at the lack of control over this particular piece of textual.

I have some hacky workarounds that kind of work and kind of don't. I think asyncio/non-determinism is a part of it, but not all of my issue.

use cases:

  • for the 'toggle dark mode', we could show Dark mode when in light mode, and vice versa, tying the modificiation to the normal action/watch
  • consider when there is a child Input component to a Screen. The Screen has a set of bindings that make sense when the Input isn't focused (? for a help menu, for instance), and the Input has bindings that don't make sense when it's not focused (ESC to drop focus). In this instance, the trick of splitting Bindings across Screens doesn't help, as the Input still inherits those that are in the parent Screen.

Ideally, we could easily update the footer's visuals to have finer-grained control over the footer's visuals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions