A new chapter, src/project. PriorityIndicator shows how urgent a task is in three bars, urgent in red, its words in a tip or beside it. IssueIdBadge names an issue by its team's key and number, as ENG-123. StatusSelect picks a status from the workflow, each with its mark, and AssigneePicker picks a person or no one; DueDatePicker is the forms DatePicker. TaskItem is a task in a row: its box, priority and issue, its title, then its due day, red when past and still open, and who has it. TaskList puts them in a SelectableList: arrows move, Enter opens, and a box's press or keys stay at the box. SubtaskList is the documents Checklist, which gains a field that adds a step on Enter. Along the way: forms::Choice::avatar leads a person's row with their initials, in lists and in a Select's trigger; ListItem::struck strikes a closed task's title; typography::Ellipsis now shapes with the text style's run, so a strike or underline on its box shows; two Lucide icons, circle-dashed and circle-dot-dashed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
88 lines
1.5 KiB
Rust
88 lines
1.5 KiB
Rust
mod agent;
|
|
mod buttons;
|
|
mod calendar;
|
|
mod charts;
|
|
mod chat;
|
|
mod collab;
|
|
mod data;
|
|
mod debug;
|
|
mod documents;
|
|
mod editor;
|
|
mod feedback;
|
|
mod files;
|
|
mod finance;
|
|
mod forms;
|
|
mod generative;
|
|
mod git;
|
|
mod layout;
|
|
mod lists;
|
|
mod mail;
|
|
mod media;
|
|
mod menus;
|
|
mod messaging;
|
|
mod motion;
|
|
mod navigation;
|
|
mod overlays;
|
|
mod primitives;
|
|
mod project;
|
|
mod shell;
|
|
mod tables;
|
|
mod terminal;
|
|
mod theme;
|
|
mod typography;
|
|
|
|
use gpui::{AnyElement, App, Window};
|
|
|
|
use crate::script::Step;
|
|
|
|
pub struct Page {
|
|
pub number: u8,
|
|
pub slug: &'static str,
|
|
pub title: &'static str,
|
|
pub summary: &'static str,
|
|
pub render: fn(&mut Window, &mut App) -> AnyElement,
|
|
/// Interactions shot after the static pages.
|
|
pub script: &'static [Step],
|
|
}
|
|
|
|
pub const ALL: &[Page] = &[
|
|
primitives::PAGE,
|
|
typography::PAGE,
|
|
layout::PAGE,
|
|
shell::PAGE,
|
|
buttons::PAGE,
|
|
forms::PAGE,
|
|
navigation::PAGE,
|
|
menus::PAGE,
|
|
overlays::PAGE,
|
|
feedback::PAGE,
|
|
motion::PAGE,
|
|
data::PAGE,
|
|
lists::PAGE,
|
|
tables::PAGE,
|
|
charts::PAGE,
|
|
finance::PAGE,
|
|
editor::PAGE,
|
|
terminal::PAGE,
|
|
git::PAGE,
|
|
debug::PAGE,
|
|
documents::PAGE,
|
|
collab::PAGE,
|
|
chat::PAGE,
|
|
agent::PAGE,
|
|
generative::PAGE,
|
|
media::PAGE,
|
|
files::PAGE,
|
|
messaging::PAGE,
|
|
mail::PAGE,
|
|
calendar::PAGE,
|
|
project::PAGE,
|
|
theme::PAGE,
|
|
];
|
|
|
|
pub use shell::{open_about, open_managed};
|
|
|
|
pub fn find(slug: &str) -> Option<usize> {
|
|
ALL.iter().position(|page| page.slug == slug)
|
|
}
|