Fix IndentGuides story (#32781)
This PR updates the `Model` to `Entity` also fixes the
`IndentGuidesStory`. In this
[commit](6fca1d2b0b
),
`Entity<T>` replaces `View<T>`/`Model<T>`.
Other than this, I noticed the storybook fails on my MacOS and Ubuntu,
see error below
```
thread 'main' panicked at crates/gpui/src/colors.rs:99:15:
called `Result::unwrap()` on an `Err` value: no state of type gpui::colors::GlobalColors exists
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```
This was resolved by explicitly specifying `GlobalColors` in Storybook.
Release Notes:
- N/A
This commit is contained in:
parent
351ba5023b
commit
31b7786be7
5 changed files with 22 additions and 18 deletions
|
@ -9,7 +9,9 @@ use std::sync::Arc;
|
|||
use clap::Parser;
|
||||
use dialoguer::FuzzySelect;
|
||||
use gpui::{
|
||||
AnyView, App, Bounds, Context, Render, Window, WindowBounds, WindowOptions, div, px, size,
|
||||
AnyView, App, Bounds, Context, Render, Window, WindowBounds, WindowOptions,
|
||||
colors::{Colors, GlobalColors},
|
||||
div, px, size,
|
||||
};
|
||||
use log::LevelFilter;
|
||||
use project::Project;
|
||||
|
@ -68,6 +70,8 @@ fn main() {
|
|||
gpui::Application::new().with_assets(Assets).run(move |cx| {
|
||||
load_embedded_fonts(cx).unwrap();
|
||||
|
||||
cx.set_global(GlobalColors(Arc::new(Colors::default())));
|
||||
|
||||
let http_client = ReqwestClient::user_agent("zed_storybook").unwrap();
|
||||
cx.set_http_client(Arc::new(http_client));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue