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

Redesign the TUI Footer #19

Merged
merged 14 commits into from
May 23, 2024
Merged

Redesign the TUI Footer #19

merged 14 commits into from
May 23, 2024

Conversation

AnonymouX47
Copy link
Owner

@AnonymouX47 AnonymouX47 commented May 16, 2024

  • Redesigns the TUI footer, action bar and actions.
  • Makes non-navigation actions clickable.
  • Adds show footer config option to control the TUI footer visibility.
  • Improves footer height adjustment.
  • Simplifies the composition of the footer widgets.
  • Updates footer-related terminology.

Resolves #17

- Change: Eliminate `original_widget` indirection for the `key_bar` and
  `expand` widgets.
- Change: Use `Text.pack()[0]` instead of `len(Text.text)`.
- Change: Use PACK sizing for `expand` within the footer (`bottom_bar`).
- Add: `key_bar_cols()`.
- Change: Simplify `adjust_bottom_bar()`.
- Change: Only update the height of the footer (`bottom_bar` widget)
  when the height changes.
- Add: "action" and "disabled action" TUI palette entries.
- Change: Simplify the design of the keys and action names.
- Change: Use plain/default colors, improving the contrast for disabled
  actions.
- Change: Update the "key" and "disabled key" TUI palette entries.
@AnonymouX47 AnonymouX47 added improvement Implementation of improvement to an existing feature tui Related to the TUI (and TUI mode) labels May 16, 2024
@AnonymouX47 AnonymouX47 added this to the 0.2.0 milestone May 16, 2024
- Change: Rename the footer widgets:

  - `key_bar` -> `action_bar`
  - `bottom_bar` -> `footer`

- Change: Rename `.tui.keys.adjust_bottom_bar()` -> `adjust_footer()`.
- Change: Rename the "global" context action "key Bar" ->
  "Expand/Collapse Footer" and update its description.
- Change: Update terminology "bottom bar", "action/key bar" -> "footer".
- Add: `.keys.update_expand_collapse_icon()`.
- Change: Display the expand key using the new style.
- Change: Simplify updating the footer expand/collapse icon.
- Change: Update comments.
- Change: Include *bold* setting in "key" display attribute.
- Change: Update the action bar only if the updated context is the
  current or global context.
- Change: Update the action bar only once when actions are hidden or
  shown.
- Add: `.widgets.ActionBar()`.

  - Replaces the `Text` widget used to display context actions in the
    footer.
  - Provides better wrapping of actions, particularly when an action's
    widget is less in width than the action bar.

- Change: Remove `.keys.display_context_keys()`.

  Replaced by `action_bar.update()`.
- Add: `Action`.

  - Replaces the `Text` widgets used to display actions in the action
    bar.
  - Triggers the action on left mouse button clicks, if enabled and
    bound to a function.

- Change: Do not use bare `Action` widgets within `ActionBar`; they must
  always be within a `Columns` widget to prevent accidentally triggering
  an action alone on a row when clicking off the action but on the row.
- Add: Implement the `show footer` config option.
- Change: The "global::Expand/Collapse Footer" action is now disabled
  when the footer is hidden.
- Change: Make footer and action bar operations no-op when the footer
  is hidden.
- Change: Update the positioning of the info bar to work properly when
  the footer is hidden.
@AnonymouX47 AnonymouX47 changed the title Redesign the Action/Key Bar Redesign the TUI Footer May 23, 2024
@AnonymouX47 AnonymouX47 merged commit be95837 into main May 23, 2024
16 checks passed
@AnonymouX47 AnonymouX47 deleted the key-bar branch May 23, 2024 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Implementation of improvement to an existing feature tui Related to the TUI (and TUI mode)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

better color contrast for disabled menu options
1 participant