ZIm/crates/storybook/src
Ben Kunkle deb2564b31
gpui: Add keybind metadata API (#33316)
Closes #ISSUE

Adds a very simple API to track metadata about keybindings in GPUI,
namely the source of the binding. The motivation for this is displaying
the source of keybindings in the [keymap
UI](https://github.com/zed-industries/zed/pull/32436).

The API is designed to be as simple and flexible as possible, storing
only a `Option<u32>` on the bindings themselves to keep the struct
small. It is intended to be used as an index or key into a table/map
created and managed by the consumer of the API to map from indices to
arbitrary meta-data. I.e. the consumer is responsible for both
generating these indices and giving them meaning.

The current usage in Zed is stateless, just a mapping between constants
and User, Default, Base, and Vim keymap sources, however, this can be
extended in the future to also track _which_ base keymap is being used.

Release Notes:

- N/A *or* Added/Fixed/Improved ...
2025-06-24 16:07:45 +00:00
..
stories editor: Improve code completion filtering to provide fewer and more accurate suggestions (#32928) 2025-06-18 16:01:28 +05:30
actions.rs Add an app_menu to Storybook which enables quitting with cmd-q (#8166) 2024-02-22 12:51:40 -05:00
app_menus.rs gpui: Update Menu name to use SharedString type to support more types (#14791) 2024-07-19 08:51:31 -04:00
assets.rs Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
stories.rs gpui: Add a standard text example (#30747) 2025-05-16 17:35:44 +02:00
story_selector.rs Use anyhow more idiomatically (#31052) 2025-05-20 23:06:07 +00:00
storybook.rs gpui: Add keybind metadata API (#33316) 2025-06-24 16:07:45 +00:00