zed/crates
Marshall Bowers 66358f2900
Update storybook to support stories for individual components (#3010)
This PR updates the `storybook` with support for adding stories for
individual components.

### Motivation

Right now we just have one story in the storybook that renders an entire
`WorkspaceElement`.

While iterating on the various UI components, it will be helpful to be
able to create stories of those components just by themselves.

This is especially true for components that have a number of different
states, as we can render the components in all of the various states in
a single layout.

### Explanation

We achieve this by adding a simple CLI to the storybook.

The `storybook` binary now accepts an optional `[STORY]` parameter that
can be used to indicate which story should be loaded. If this parameter
is not provided, it will load the workspace story as it currently does.

Passing a story name will load the corresponding story, if it exists.

For example:

```
cargo run -- elements/avatar
```

<img width="723" alt="Screenshot 2023-09-21 at 10 29 52 PM"
src="https://github.com/zed-industries/zed/assets/1486634/5df489ed-8607-4024-9c19-c5f4541f97c9">

```
cargo run -- components/facepile
```

<img width="785" alt="Screenshot 2023-09-21 at 10 30 07 PM"
src="https://github.com/zed-industries/zed/assets/1486634/e04a4577-7403-405d-b23c-e765b7a06229">



Release Notes:

- N/A
2023-09-21 22:41:53 -04:00
..
activity_indicator Unify icons using multiple variants, remove all unused icons 2023-09-15 12:50:49 -04:00
ai Add assistant events (#2978) 2023-09-15 15:25:35 -04:00
audio chore: remove unused features from rodio crate. (#2869) 2023-08-21 11:07:31 +02:00
auto_update Unify icons using multiple variants, remove all unused icons 2023-09-15 12:50:49 -04:00
breadcrumbs Move breadcrumb style to toolbar 2023-08-29 16:37:48 -04:00
call Mute on join if ZED_IMPERSONATE is set 2023-09-08 16:24:37 -07:00
channel Fix bug in channel rendering 2023-09-20 16:40:29 -07:00
cli
client Add assistant events (#2978) 2023-09-15 15:25:35 -04:00
clock Remove local timestamps from CRDT operations 2023-08-31 16:23:06 -07:00
collab collab 0.22.1 2023-09-20 17:39:21 -07:00
collab_ui Fix bug in channel rendering 2023-09-20 16:40:29 -07:00
collections
command_palette Z 2620 - Sort command palette's entries by name and use count (#2954) 2023-09-11 17:50:09 +02:00
component_test Merge branch 'main' into disclosable-component 2023-08-23 16:30:27 -07:00
context_menu
copilot Show Copilot logs right after its LSP server start 2023-09-20 12:08:32 +03:00
copilot_button Unify icons using multiple variants, remove all unused icons 2023-09-15 12:50:49 -04:00
db
diagnostics Unify icons using multiple variants, remove all unused icons 2023-09-15 12:50:49 -04:00
drag_and_drop Fix bug in channel rendering 2023-09-20 16:40:29 -07:00
editor [WIP] Replace in project (#2984) 2023-09-21 16:27:58 +02:00
feature_flags Add feature flags handling to the client, rewrite staff mode to a trait extension style 2023-08-25 17:00:53 -07:00
feedback Unify icons using multiple variants, remove all unused icons 2023-09-15 12:50:49 -04:00
file_finder vim: Add ZZ and ZQ 2023-09-08 16:25:20 -06:00
fs move git2 to workspace dependency globally 2023-09-19 16:13:47 -04:00
fsevent
fuzzy
git move git2 to workspace dependency globally 2023-09-19 16:13:47 -04:00
go_to_line
gpui Switch drag end event to be fired after mouse up 2023-09-21 08:58:36 -07:00
gpui2 Add Element::when method 2023-09-18 20:25:12 -06:00
gpui2_macros Add negative style helpers 2023-09-18 20:47:40 -06:00
gpui_macros Eliminate PaintContext 2023-09-11 09:00:59 -06:00
install_cli Remove potential osascript hijacking 2023-08-18 17:40:08 -07:00
journal
language Add a specific server id to a Copilot LSP 2023-09-19 12:32:05 +03:00
language_selector Add tooltip to language selector 2023-09-08 12:41:32 -04:00
language_tools Make LSP panel scrollable 2023-09-21 10:59:19 +03:00
live_kit_client WIP: Add nushell support 2023-09-09 14:01:53 -07:00
live_kit_server
lsp Tailwind autocomplete (#2920) 2023-08-31 16:55:46 +03:00
media
menu
node_runtime Remove NodeRuntime static & add fake implementation for tests 2023-09-06 11:18:55 -04:00
outline
picker
plugin
plugin_macros
plugin_runtime
project [WIP] Replace in project (#2984) 2023-09-21 16:27:58 +02:00
project_panel Add UI/UX for moving channels (#2976) 2023-09-19 17:56:22 -07:00
project_symbols
quick_action_bar Unify icons using multiple variants, remove all unused icons 2023-09-15 12:50:49 -04:00
recent_projects
refineable Add basic inspector 2023-09-07 22:24:02 -06:00
rope Normalize indentation when refactoring 2023-08-24 12:45:21 +02:00
rpc WIP: Send the channel name and the channel edges seperately, so we're not repeating them constantly 2023-09-15 17:57:23 -07:00
search add semantic index status, for non authenticated users (#3005) 2023-09-21 14:18:58 -04:00
semantic_index add semantic index status, for non authenticated users (#3005) 2023-09-21 14:18:58 -04:00
settings Add feature flags handling to the client, rewrite staff mode to a trait extension style 2023-08-25 17:00:53 -07:00
snippet
sqlez
sqlez_macros
storybook Update storybook to support stories for individual components (#3010) 2023-09-21 22:41:53 -04:00
sum_tree Ensure collaborators cursor colors are the same in channel buffers as in projects 2023-08-24 11:31:41 -07:00
terminal Fix multi-key shortcuts with modifiers 2023-09-14 14:35:17 -06:00
terminal_view Added 'open in terminal' action to the project panel context menu 2023-09-15 21:33:22 -07:00
text Fix infinite loop in select all matches 2023-09-20 08:25:21 -07:00
theme Add assistant events (#2978) 2023-09-15 15:25:35 -04:00
theme_selector Add feature flags handling to the client, rewrite staff mode to a trait extension style 2023-08-25 17:00:53 -07:00
ui Fix fmt complaining about order 2023-09-21 20:25:25 -04:00
util move git2 to workspace dependency globally 2023-09-19 16:13:47 -04:00
vcs_menu Format let-else statements 2023-08-25 10:11:32 -07:00
vim Fix vim test recording 2023-09-20 12:01:04 -06:00
welcome
workspace Add UI/UX for moving channels (#2976) 2023-09-19 17:56:22 -07:00
xtask
zed v0.106.x dev 2023-09-20 13:02:13 -04:00
zed-actions