T07a navigation tabs and paths: tabs, editor tabs, tab overflow menu, breadcrumb, pagination, steps and wizard; shared slide, list trigger and tab stop

This commit is contained in:
ZacharyZhang-NY committed 2026-09-25 11:37:38 -04:00
1 parent 05ff67ad9f
commit 0883a999f4
50 files changed
+2490 -330

No files matched your search

+2 -18
View File
@@ -4,29 +4,13 @@ use ely_gpui_component::{
},
primitives::IconName,
};
use gpui::{App, Entity, IntoElement, ParentElement, SharedString, Styled, Window, div, px};
use gpui::{App, IntoElement, ParentElement, SharedString, Styled, Window, div, px};
use crate::{
probe::probe,
ui::{code, section, specimen},
ui::{code, keep, section, set, specimen},
};
pub(super) fn keep<T: 'static>(
key: &'static str,
init: impl FnOnce() -> T,
window: &mut Window,
cx: &mut App,
) -> Entity<T> {
window.use_keyed_state(key, cx, move |_, _| init())
}
pub(super) fn set<T: 'static>(state: &Entity<T>, value: T, cx: &mut App) {
state.update(cx, |state, cx| {
*state = value;
cx.notify();
});
}
fn values(list: &[&'static str]) -> Vec<SharedString> {
list.iter()
.map(|value| SharedString::from(*value))
+1 -2
View File
@@ -4,10 +4,9 @@ use ely_gpui_component::{
};
use gpui::{App, Hsla, IntoElement, ParentElement, Styled, Window, div, px, rgb, rgba};
use super::choices::{keep, set};
use crate::{
probe::probe,
ui::{code, section, specimen, specimens},
ui::{code, keep, section, set, specimen, specimens},
};
fn hex(color: Hsla) -> String {
+2 -5
View File
@@ -8,13 +8,10 @@ use ely_gpui_component::forms::{
use gpui::{App, Div, IntoElement, ParentElement, SharedString, Styled, Window, div, px};
use jiff::civil::{Date, DateTime, Time, date, time};
use super::{
choices::{keep, set},
text::field,
};
use super::text::field;
use crate::{
probe::probe,
ui::{code, section, specimen, specimens},
ui::{code, keep, section, set, specimen, specimens},
};
/// Today, fixed so captures stay the same from day to day.
+1 -2
View File
@@ -3,10 +3,9 @@ use std::path::PathBuf;
use ely_gpui_component::forms::{DropZone, FileInput};
use gpui::{App, IntoElement, ParentElement, Styled, Window, div, px};
use super::choices::{keep, set};
use crate::{
probe::probe,
ui::{section, specimen, specimens},
ui::{keep, section, set, specimen, specimens},
};
fn names(paths: &[PathBuf]) -> String {
+2 -5
View File
@@ -8,13 +8,10 @@ use ely_gpui_component::{
};
use gpui::{App, IntoElement, ParentElement, SharedString, Styled, Window, div, px};
use super::{
choices::{keep, set},
text::field,
};
use super::text::field;
use crate::{
probe::probe,
ui::{section, specimen, specimens},
ui::{keep, section, set, specimen, specimens},
};
pub fn signature(window: &mut Window, cx: &mut App) -> impl IntoElement + use<> {
+2 -5
View File
@@ -4,13 +4,10 @@ use ely_gpui_component::{
};
use gpui::{App, IntoElement, ParentElement, SharedString, Styled, Window, div, px};
use super::{
choices::{keep, set},
text::field,
};
use super::text::field;
use crate::{
probe::probe,
ui::{blocked, section, specimen, specimens},
ui::{blocked, keep, section, set, specimen, specimens},
};
fn cities() -> Vec<Choice> {
+2 -5
View File
@@ -9,13 +9,10 @@ use gpui::{
App, AppContext, Entity, IntoElement, ParentElement, Styled, Window, div, prelude::*, px,
};
use super::{
choices::{keep, set},
text::field,
};
use super::text::field;
use crate::{
probe::probe,
ui::{section, specimen},
ui::{keep, section, set, specimen},
};
type Saved = (String, String, String, Vec<String>);
+1 -2
View File
@@ -1,10 +1,9 @@
use ely_gpui_component::forms::{Choice, ChoiceChips, Knob, RangeSlider, Rating, Slider, Stepper};
use gpui::{App, IntoElement, ParentElement, SharedString, Styled, Window, div, px};
use super::choices::{keep, set};
use crate::{
probe::probe,
ui::{section, specimen, specimens},
ui::{keep, section, set, specimen, specimens},
};
pub fn chips(window: &mut Window, cx: &mut App) -> impl IntoElement + use<> {