From ce0ff819f915531d16a319845fd5e01b54062087 Mon Sep 17 00:00:00 2001 From: Mikayla Date: Tue, 23 Jan 2024 21:47:44 -0800 Subject: [PATCH] Fix more tests --- crates/gpui/README.md | 3 +-- crates/gpui/src/gpui.rs | 5 +++-- crates/storybook/src/stories/z_index.rs | 18 +++++++++--------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/crates/gpui/README.md b/crates/gpui/README.md index 1ced6979863c2244e93cbde526dacc30dc563afe..9b087a9752a05586b97a67962b20e86c953672ec 100644 --- a/crates/gpui/README.md +++ b/crates/gpui/README.md @@ -37,5 +37,4 @@ In addition to the systems above, GPUI provides a range of smaller services that - The `[gpui::test]` macro provides a convenient way to write tests for your GPUI applications. Tests also have their own kind of context, a `TestAppContext` which provides ways of simulating common platform input. See `app::test_context` and `test` modules for more details. -Currently, the best way to learn about these APIs is to read the Zed source code or to ask us about it at a fireside hack or in the [Zed Discord](https://discord.gg/U4qhCEhMXP). We're working on improving the documentation, creating more examples, and will be publishing more guides to GPUI on our [blog](https://zed.dev/blog). - +Currently, the best way to learn about these APIs is to read the Zed source code, ask us about it at a fireside hack, or drop a question in the [Zed Discord](https://discord.gg/U4qhCEhMXP). We're working on improving the documentation, creating more examples, and will be publishing more guides to GPUI on our [blog](https://zed.dev/blog). diff --git a/crates/gpui/src/gpui.rs b/crates/gpui/src/gpui.rs index 4a1cf4119328c581b5263d3b05896a760cc07d61..638e94de3969360f94b5594f06e45710cace1495 100644 --- a/crates/gpui/src/gpui.rs +++ b/crates/gpui/src/gpui.rs @@ -56,8 +56,9 @@ //! own kind of context, a [`TestAppContext`] which provides ways of simulating common platform input. See [`app::test_context`] //! and [`test`] modules for more details. //! -//! Currently, the best way to learn about these APIs is to read the Zed source code or to ask us about it at a fireside hack or in the [Zed Discord](https://discord.gg/U4qhCEhMXP). -//! We're working on improving the documentation, creating more examples, and will be publishing more guides to GPUI on our [blog](https://zed.dev/blog). +//! Currently, the best way to learn about these APIs is to read the Zed source code, ask us about it at a fireside hack, or drop +//! a question in the [Zed Discord](https://discord.gg/U4qhCEhMXP). We're working on improving the documentation, creating more examples, +//! and will be publishing more guides to GPUI on our [blog](https://zed.dev/blog). #![deny(missing_docs)] #![allow(clippy::type_complexity)] diff --git a/crates/storybook/src/stories/z_index.rs b/crates/storybook/src/stories/z_index.rs index 63ee1af7591ee8a62f07f052b320db8a70077b9d..e32e39a2d1d96c078eeada0c4e1be616ae4408ac 100644 --- a/crates/storybook/src/stories/z_index.rs +++ b/crates/storybook/src/stories/z_index.rs @@ -1,4 +1,4 @@ -use gpui::{px, rgb, Div, Hsla, IntoElement, Render, RenderOnce}; +use gpui::{px, rgb, Div, IntoElement, Render, RenderOnce}; use story::Story; use ui::prelude::*; @@ -51,22 +51,22 @@ trait Styles: Styled + Sized { self.absolute() .w(px(150.)) .h(px(50.)) - .text_color(rgb::(0x000000)) + .text_color(rgb(0x000000)) } fn blue(self) -> Self { - self.bg(rgb::(0xe5e8fc)) + self.bg(rgb(0xe5e8fc)) .border_5() - .border_color(rgb::(0x112382)) + .border_color(rgb(0x112382)) .line_height(px(55.)) // HACK: Simulate `text-align: center`. .pl(px(24.)) } fn red(self) -> Self { - self.bg(rgb::(0xfce5e7)) + self.bg(rgb(0xfce5e7)) .border_5() - .border_color(rgb::(0xe3a1a7)) + .border_color(rgb(0xe3a1a7)) // HACK: Simulate `text-align: center`. .pl(px(8.)) } @@ -92,10 +92,10 @@ impl RenderOnce for ZIndexExample { .left(px(15.)) .w(px(180.)) .h(px(230.)) - .bg(rgb::(0xfcfbe5)) - .text_color(rgb::(0x000000)) + .bg(rgb(0xfcfbe5)) + .text_color(rgb(0x000000)) .border_5() - .border_color(rgb::(0xe3e0a1)) + .border_color(rgb(0xe3e0a1)) .line_height(px(215.)) // HACK: Simulate `text-align: center`. .pl(px(24.))