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
This PR reorganizes the exports for the `ui` module in the `storybook`
crate.
### Motivation
Currently we expose each of the various elements/components/modules in
two places:
- Through the module itself (e.g., `ui::element::Avatar`)
- Through the `ui` module's re-exports (e.g., `ui::Avatar`)
This means it's possible to import any given item from two spots, which
can lead to inconsistencies in the consumers. Additionally, it also
means we're shipping the exact module structure underneath `ui` as part
of the public API.
### Explanation
To avoid this, we can avoid exposing each of the individual modules
underneath `ui::{element, component, module}` and instead export just
the module contents themselves.
This makes the `ui` module namespace flat.
Release Notes:
- N/A
Update project search semantic ui to accommodate for users who have not
set the OPENAI_API_KEY in their environment variables.
Release Notes:
- Expand Semantic Index status to include status for non authenticated
users
- Update Search UI to illustrate this status.
Fixes a design regression on Preview where the fold icon became small
due to the icon standardization PR.
Release Notes:
- [Preview] Fixed an issue with the size of the fold line icon.
Targeting Preview of 09.27.
This is still pending several touchups/clearups:
- We should watch multibuffer for changes and rescan the excerpts. This
should also update match count.
- Closing editor while multibuffer with 100's of changed files is open
leads to us prompting for save once per each file in the multibuffer.
One could in theory save in multibuffer before closing it (thus avoiding
unnecessary prompts), but it'd be cool to be able to "Save all"/"Discard
All".
Release Notes:
- Added "Replace in project" functionality
These methods were slightly different which caused (for example) there
to be no "Discard" option in the conflict case at the workspace level.
To make this work, a new SaveBehavior (::PromptForNewPath) was added to
support SaveAs.
This mostly adds the commonly requested set (:wq and friends) and
a few that I use frequently
:<line> to go to a line number
:vsp / :sp to create a split
:cn / :cp to go to diagnostics
Release Notes:
- Restore `cmd-shift-d` as 'editor::DuplicateLine' and move
`editor::SelectAllMatches` to `cmd-shift-L`, like in VS Code. The
previous action for `cmd-shift-l`, `editor::SplitSelectionIntoLines`,
has been moved to the sublime base keymap.
- Fixes a panic when using 'editor::SelectAllMatches' on an empty line.