
Similar to https://github.com/zed-industries/zed/pull/18690 & https://github.com/zed-industries/zed/pull/18695, this PR enables required docs for `ui` and does some cleanup. Changes: - Enables the `deny(missing_docs)` crate-wide. - Adds `allow(missing_docs)` on many modules until folks pick them up to document them - Documents some modules (all in `ui/src/styles`) - Crate root-level organization: Traits move to `traits`, other misc organization - Cleaned out a bunch of unused code. Note: I'd like to remove `utils/format_distance` but the assistant panel uses it. To move it over to use the `time_format` crate we may need to update it to use `time` instead of `chrono`. Needs more investigation. Release Notes: - N/A
24 lines
1 KiB
Rust
24 lines
1 KiB
Rust
//! The prelude of this crate. When building UI in Zed you almost always want to import this.
|
|
|
|
pub use gpui::prelude::*;
|
|
pub use gpui::{
|
|
div, px, relative, rems, AbsoluteLength, DefiniteLength, Div, Element, ElementId,
|
|
InteractiveElement, ParentElement, Pixels, Rems, RenderOnce, SharedString, Styled, ViewContext,
|
|
WindowContext,
|
|
};
|
|
|
|
pub use crate::styles::{rems_from_px, vh, vw, PlatformStyle, StyledTypography, TextSize};
|
|
pub use crate::traits::clickable::*;
|
|
pub use crate::traits::disableable::*;
|
|
pub use crate::traits::fixed::*;
|
|
pub use crate::traits::selectable::*;
|
|
pub use crate::traits::styled_ext::*;
|
|
pub use crate::traits::visible_on_hover::*;
|
|
pub use crate::Spacing;
|
|
pub use crate::{h_flex, v_flex};
|
|
pub use crate::{Button, ButtonSize, ButtonStyle, IconButton, SelectableButton};
|
|
pub use crate::{ButtonCommon, Color};
|
|
pub use crate::{Headline, HeadlineSize};
|
|
pub use crate::{Icon, IconName, IconPosition, IconSize};
|
|
pub use crate::{Label, LabelCommon, LabelSize, LineHeightStyle};
|
|
pub use theme::ActiveTheme;
|