Skip to content

MISSING-FEATURE-CUSTOMIZE-TOOLBAR-INLINE-SHORTCUT-EDIT #14623

In review

Description

@davidmann4

TL;DR: In the Customize Toolbar dialog, double-clicking a tool's letter should let the user change it in place, with the same checks as the reference application.

What happens today (main 383d24f)

  • Since the move to the craft UI framework (PhotoCraft on the craft UI framework #15449) there is no Toolbar tab: edit.toolbar (crates/ui-egui/src/prefs/prefs_ui/dialogs.rs:59) opens the framework's Edit Toolbar drawer (open_drawer, crates/ui-egui/src/panels/toolbar.rs:69; ToolbarDrawer in storytold/craft-libs (next) crates/ui-panels/src/rails/drawer.rs). Each tool row there shows the chord of the tool's resolved command as a static trailing label (chord_of in ToolbarDrawer::show), which should be the key bound now rather than only the default; only running the app confirms that. There is no Customize Toolbar dialog yet (MISSING-FEATURE-CUSTOMIZE-TOOLBAR-DIALOG #14616).
  • A tool letter can only be changed in the Keyboard Shortcuts dialog (tool commands tools.select.<tool>, crates/ui-egui/src/input/tool_shortcuts.rs). There is no tooltip and no editor on the letter.

Reference application (measured)

  • Hovering a tool's letter shows the tooltip "Click to change the keyboard shortcut".
  • A double-click on the letter opens a one-character text field over it. It holds at most one character; a lowercase letter is shown in uppercase.
  • Enter or Tab commits the field:
    • A letter used by a command that is not a tool shows an alert titled "Customize Toolbar" with one OK button: The shortcut 'Q' is already in use by Toggle Standard/Quick Mask Modes. (also measured for X and N, with their own command names). The letter is not taken.
    • A character that is not a letter shows 5 is an invalid shortcut. You can only use A-Z for tool shortcuts. (two spaces after the full stop; 5 is the character typed). The old letter comes back.
    • A letter that other tools already use (for example B) is accepted without any message.
    • An empty field is accepted: the tool has no shortcut.
  • Esc ends the edit. A second Esc cancels the whole dialog.
  • After Done the new letter selects the tool and the old letter no longer does.

Not measured: which of several tools sharing a letter a plain key press picks (seen once to follow list order, not confirmed), Shift+letter typed into the field, and the macOS wording. These cases keep today's behaviour.

Done when

  • Hovering a tool's letter shows the tooltip "Click to change the keyboard shortcut".
  • A double-click opens an inline editor holding at most one character, shown in uppercase; Enter and Tab commit, Esc ends the edit without committing, a second Esc cancels the dialog.
  • A non-letter shows <char> is an invalid shortcut. You can only use A-Z for tool shortcuts. (two spaces) and the old letter is kept.
  • A letter of a non-tool command shows The shortcut '<X>' is already in use by <command name>. in an alert titled "Customize Toolbar" with OK, and the letter is not taken.
  • A letter other tools use is accepted silently; an empty field is accepted and removes the tool's shortcut.
  • The letter column shows the current assigned letter, not only the default.
  • Done stores the letters in the same tool-shortcut preference the Keyboard Shortcuts tab uses, so the new letter selects the tool and the old one no longer does; Cancel discards them.
  • Graceful failure: any typed input or stored value never panics.

Where

Updated 2026-11-19 for the move to the craft UI framework (#15449).

  • PhotoCraft's own code: the letter cell of the Customize Toolbar dialog from MISSING-FEATURE-CUSTOMIZE-TOOLBAR-DIALOG #14616 (crates/ui-egui/src/prefs/prefs_ui/customize_toolbar.rs). The old Toolbar tab in prefs/prefs_ui/dialogs.rs is gone; the drawer in craft-libs is not where this editor goes.
  • crates/ui-egui/src/input/tool_shortcuts.rs (reading and writing a tool's letter)
  • New test file: crates/ui-egui/src/customize_toolbar_inline_shortcut_tests.rs

Related

Rules for this item

  • Part of EPIC-TOOLBAR #11374 (EPIC-TOOLBAR). Comment here when you take it and open a draft PR early that says Fixes #<this issue>.
  • Put your tests in the new test file named above, and touch only the files under "Where".
  • Cases marked not measured keep today's behaviour. Ask here instead of guessing.
  • Don't edit docs/ui-parity.md or other parity docs. The epic updates them once for all items.

Metadata

Metadata

Assignees

No one assigned

    Labels

    missing featureparitypriority: lowui

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions