Skip to content

Rewrite bottom toolbar, but keep it compact#1629

Merged
rolandwalker merged 1 commit intomainfrom
RW/rewrite-bottom-toolbar
Feb 26, 2026
Merged

Rewrite bottom toolbar, but keep it compact#1629
rolandwalker merged 1 commit intomainfrom
RW/rewrite-bottom-toolbar

Conversation

@rolandwalker
Copy link
Contributor

@rolandwalker rolandwalker commented Feb 25, 2026

Description

  • Recast show_fish_help() as show_initial_toolbar_help() since it is be used more generally.
  • Recast show_suggestion_tip() as show_initial_toolbar_help() so that the caller matches the callee.
  • Make a toolbar section divider with a vertical bar.
  • Add Tab to permanent list of suggested keys.
  • Add F1 to permanent list of suggested keys (assumes Add help on F1 keystroke #1627).
  • Add F2 to permanent list of suggested keys and show smart-complete status.
  • Only highlight the "ON" part of multiline when on, and remove space. Constraining the total highlighted characters to a smaller number makes the line in general more readable, though the styling of the highlighted letters depends on the configuration..
  • Only highlight the vi modes when vi edit mode is on, and remove space.
  • Only show delimiter text if non-standard or initial, and make the text shorter.
  • Make right-arrow help text explain which suggestions are referred to, avoiding the confusing word "complete".
  • Make "refreshing" message shorter with a Unicode ellipsis.

A key feature of the reorganization is that transient text only can appear on the right, so the keystroke help stays more aligned.

Toolbar in "initial" mode with extra notes to the right (specific colors/styles depend on user settings):

toolbar_initial

Toolbar after "initial" mode:

toolbar

Checklist

  • I added this contribution to the changelog.md file.
  • I added my name to the AUTHORS file (or it's already there).
  • To lint and format the code, I ran
    uv run ruff check && uv run ruff format && uv run mypy --install-types .

@rolandwalker rolandwalker self-assigned this Feb 25, 2026
@github-actions
Copy link

No correctness or security issues found in the changes.

Missing tests / edge cases:

  1. Add unit coverage for toolbar token composition across key states: smart_completion on/off, multi_line on/off, editing_mode VI vs EMACS, custom delimiter vs default, and initial vs non-initial toolbar help. This guards against future regressions in token ordering and visibility logic. See mycli/clitoolbar.py for the new conditional branches. (mycli/clitoolbar.py)

If you want, I can draft a test matrix and point to a good existing test location.

@scottnemes
Copy link
Contributor

Not sure if expected, but it takes two enters to get from the initial toolbar to the final shorter one:


Iniitial:
image


First enter:
image


Second enter:
image


And if you manage to launch without the "refreshing completions" bit showing up, it still takes two enters to get from initial to the final shorter version.

Also F2 for smart completions doesn't update the toolbar, but does seem to update the variable as functionality does appear to change.

@rolandwalker rolandwalker force-pushed the RW/rewrite-bottom-toolbar branch 2 times, most recently from 499a73f to 21a2616 Compare February 26, 2026 20:04
@rolandwalker
Copy link
Contributor Author

@scottnemes the "two enters" thing has always been that way and was untouched here.

The smart-complete indicator is a great catch; fixed.

Copy link
Contributor

@scottnemes scottnemes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified smart completion updates in the toolbar now

 * recast show_fish_help() as show_initial_toolbar_help() since it is
   be used more generally
 * recast show_suggestion_tip() as show_initial_toolbar_help() so that
   the caller matches the callee
 * make a toolbar section divider with a vertical bar
 * add Tab to permanent list of suggested keys
 * add F1 to permanent list of suggested keys
 * add F2 to permanent list of suggested keys and show smart-complete
   status
 * only highlight the "ON" part of multiline when on, and remove space.
   Constraining the total highlighted characters to a smaller number
   makes the line in general more readable, though the styling of the
   highlighted letters depends on the configuration.
 * only highlight the Vi modes when vi edit mode is on, and remove
   space
 * only show delimiter text if non-standard or initial, and make the
   text shorter
 * make right-arrow help text explain _which_ suggestions are referred
   to, avoiding the confusing word "complete"
 * make "refreshing" message shorter with a Unicode ellipsis

A key feature of the reorganization is that transient text only can
appear on the right, so the keystroke help stays more aligned.
@rolandwalker rolandwalker force-pushed the RW/rewrite-bottom-toolbar branch from 21a2616 to 0aa6948 Compare February 26, 2026 22:00
@rolandwalker rolandwalker merged commit 1d1eb72 into main Feb 26, 2026
8 checks passed
@rolandwalker rolandwalker deleted the RW/rewrite-bottom-toolbar branch February 26, 2026 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants