Tooling · Catalogs: token viewer, contrast audit; fg_subtle meets AA
DesignTokenViewer shows every token of the theme in the mode shown, named as code reads it: colors with their hex, syntax, chart and terminal colors, the type scale, radii, control and icon sizes, elevations and spacing. A11yChecker audits each text color over the surfaces it sits on at 4.5:1 and the focus ring and chart hues at 3:1, failures first. The audit found fg_subtle under 4.5:1 on hover and overlay; it is #6f6d6a light and #8c8a87 dark now, and a test holds all four Ely palettes to the audit. IconBrowser points to forms::IconPicker and the ScreenshotTest Harness to the gallery's capture, each with a section on the tooling page.
This commit is contained in:
1 parent
bfd1285064
commit
d5271d03ea
11 files changed
+757
-8
No files matched your search
@@ -6,6 +6,7 @@ use ely_gpui_component::{
|
||||
};
|
||||
use gpui::{AnyElement, App, IntoElement, ParentElement, Styled, Window, div, px};
|
||||
|
||||
mod catalogs;
|
||||
mod inspection;
|
||||
|
||||
use super::Page;
|
||||
@@ -17,7 +18,7 @@ pub const PAGE: Page = Page {
|
||||
number: 43,
|
||||
slug: "tooling",
|
||||
title: "Library Tooling",
|
||||
summary: "Tools for building with the library: this gallery, a playground that edits a component live, and tools that inspect a running window: its boxes, frames, renders and input.",
|
||||
summary: "Tools for building with the library: this gallery, a playground that edits a component live, tools that inspect a running window, its boxes, frames, renders and input, and catalogs of its tokens, icons and contrast.",
|
||||
render,
|
||||
script: &[
|
||||
Step::DownAt("button-playground", 472.0, 207.0),
|
||||
@@ -53,11 +54,18 @@ pub const PAGE: Page = Page {
|
||||
Step::Type("Hi"),
|
||||
Step::Key("backspace"),
|
||||
Step::Shot("events"),
|
||||
Step::DownAt("icon-browser", 100.0, 14.0),
|
||||
Step::UpAt("icon-browser", 100.0, 14.0),
|
||||
Step::Type("sun"),
|
||||
Step::DownAt("icon-browser", 16.0, 52.0),
|
||||
Step::UpAt("icon-browser", 16.0, 52.0),
|
||||
Step::Shot("icon-browser"),
|
||||
],
|
||||
};
|
||||
|
||||
fn render(window: &mut Window, cx: &mut App) -> AnyElement {
|
||||
let inspection = inspection::sections(window, cx);
|
||||
let catalogs = catalogs::sections(window, cx);
|
||||
div()
|
||||
.child(section(
|
||||
"ComponentGallery / Storybook",
|
||||
@@ -132,5 +140,6 @@ fn render(window: &mut Window, cx: &mut App) -> AnyElement {
|
||||
),
|
||||
)
|
||||
.children(inspection)
|
||||
.children(catalogs)
|
||||
.into_any_element()
|
||||
}
|
||||
Reference in new issue
Block a user