Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
0ee0f74
Extras: the dialog surface, footer, sheet and popover (#21, #372)
samitbasu Nov 19, 2026
b5283a7
Button generated from shadcn's source, on the Sheet (#433)
samitbasu Nov 21, 2026
e9b26f8
shadcn variant docs: link PRIMARY and SECONDARY by path
samitbasu Nov 21, 2026
35430c4
Select builds from the sheet, with today's values
samitbasu Nov 21, 2026
a5ee5c8
Merge remote-tracking branch 'origin/main' into button-sheet-433
samitbasu Nov 21, 2026
b367bdb
shadcn import: tabs, with the states eggshell's widget settles
samitbasu Nov 21, 2026
2f6eee0
Merge remote-tracking branch 'origin/main' into button-sheet-433
samitbasu Nov 21, 2026
4aa7677
Focus and disabled are tokens the rules read as they resolve (#446)
samitbasu Nov 21, 2026
899e547
Merge remote-tracking branch 'origin/main' into focus-tokens
samitbasu Nov 21, 2026
da20648
A paint's focus doc links the token, not the removed Style::focus
samitbasu Nov 21, 2026
7afa09a
Merge focus-tokens: Focus and Disabled as tokens (#478)
samitbasu Nov 21, 2026
511785b
Menus draw from the sheet, with today's values (#446)
samitbasu Nov 21, 2026
c35da97
Choices on the sheet: checkbox, radio group, switch and their field (…
samitbasu Nov 21, 2026
b751411
Merge choices-446: choice controls on the sheet (#446 step 3, mechanism)
samitbasu Nov 21, 2026
61e2c98
Merge branch 'phase2-sheet' into menus-446
samitbasu Nov 21, 2026
0c3074c
Merge phase2-sheet (with #478) into button-sheet-433
samitbasu Nov 21, 2026
9674aa9
A rule on a menu part restyles the items built from it (#446)
samitbasu Nov 21, 2026
1d2f694
Merge branch 'phase2-sheet' into menus-446
samitbasu Nov 21, 2026
5c2cc1f
The sheet-drawn sections are private, so a direct edit cannot miss th…
samitbasu Nov 21, 2026
cae023b
Merge branch 'phase2-sheet' into choices-446
samitbasu Nov 21, 2026
77d3a94
Merge choices-446: sheet-drawn sections are private
samitbasu Nov 21, 2026
5b229a5
Merge branch 'phase2-sheet' into menus-446
samitbasu Nov 21, 2026
3f72066
Merge menus-446: menus on the sheet (#446 step 5, mechanism)
samitbasu Nov 21, 2026
78157c4
Merge branch 'phase2-sheet' into button-sheet-433
samitbasu Nov 21, 2026
182dbdc
`has` matches a node at any depth, and `has_child` a child (#446)
samitbasu Nov 21, 2026
8510f5f
Merge branch 'phase2-sheet' into button-sheet-433
samitbasu Nov 21, 2026
e253c5b
Merge branch 'button-sheet-433' into phase2-sheet
samitbasu Nov 21, 2026
cd24685
Tooltips draw from the sheet, with today's values (#446)
samitbasu Nov 21, 2026
03ebfc8
wip: choice cards (#446 step 3, PR B), handed over unfinished
samitbasu Nov 21, 2026
1492092
Tables draw from the sheet, with today's values (#446)
samitbasu Nov 21, 2026
088b4f9
Style::rewrite_rules: every family's rules written from one list
samitbasu Nov 21, 2026
3761c89
Merge rewrite-rules: Style::rewrite_rules, the families' rules from o…
samitbasu Nov 21, 2026
20514d1
Merge phase2-sheet into menus-446: tooltip and table in rewrite_rules
samitbasu Nov 21, 2026
ad794dc
Merge menus-446: tooltips and tables on the sheet (#446 step 5, mecha…
samitbasu Nov 21, 2026
a638e44
Merge branch 'phase2-sheet' into choices-446
samitbasu Nov 21, 2026
fa203f4
Choice cards ring the card, not the control: an empty ring draws nothing
samitbasu Nov 21, 2026
42c66ab
Merge choices-446: has at any depth, has_child, and choice cards (#44…
samitbasu Nov 21, 2026
ab5a2e1
Merge phase2-sheet into select-sheet-443: Select in rewrite_rules, on…
samitbasu Nov 21, 2026
3f6a06e
Merge select-sheet-443: Select builds from the sheet (#443/#446, mech…
samitbasu Nov 21, 2026
50e5d5e
Merge branch 'phase2-sheet' into tabs-emitter-446
samitbasu Nov 21, 2026
c512dbb
shadcn import: a widget can name its part enum
samitbasu Nov 21, 2026
29be615
Merge tabs-emitter-446: the importer settles widget states, maps data…
samitbasu Nov 21, 2026
d3e0d81
shadcn import: desktop breakpoints hold; has-[>…] is has_child; compo…
samitbasu Nov 21, 2026
4097489
The input's look is generated from shadcn; the group's control is a part
samitbasu Nov 21, 2026
d3f5da8
Merge input-look: the input's look from shadcn, the group's control a…
samitbasu Nov 21, 2026
3746465
xtask: find cargo's build output through CARGO_TARGET_DIR
samitbasu Nov 21, 2026
548d806
Merge target-dir: xtask finds cargo's output through CARGO_TARGET_DIR
samitbasu Nov 21, 2026
2967a60
The input group's look is generated from shadcn, with its anatomy
samitbasu Nov 21, 2026
400f948
Merge branch 'phase2-sheet' into input-group-look
samitbasu Nov 21, 2026
43db851
Merge input-group-look: the input group's look from shadcn, with its …
samitbasu Nov 21, 2026
cca20d3
A refused or disabled field fades as a whole (#385)
samitbasu Nov 21, 2026
068ad78
Merge input-disabled: a refused or disabled field fades as a whole (#…
samitbasu Nov 21, 2026
4676274
Select's look from shadcn, and one "highlighted" state for list items…
samitbasu Nov 22, 2026
8f0b4de
Merge select-look: Select's look from shadcn, and one highlighted sta…
samitbasu Nov 22, 2026
243777e
Tabs' look from shadcn, for tabs and the segmented control (#446)
samitbasu Nov 22, 2026
368bc48
Merge tabs-look: the tabs' look from shadcn, for tabs and the segment…
samitbasu Nov 22, 2026
37ee5df
In a wrapping list, a trigger grows from its content's width (#446)
samitbasu Nov 22, 2026
22287b8
Merge tabs-look: a wrapping list's triggers grow from their content (…
samitbasu Nov 22, 2026
8852b99
Menus' look from shadcn's dropdown-menu (#446)
samitbasu Nov 22, 2026
d66aa09
Merge menus-look: menus' look from shadcn's dropdown-menu (#446)
samitbasu Nov 22, 2026
5bd7d81
Tooltip's look from shadcn (#446)
samitbasu Nov 22, 2026
216472c
Merge tooltip-look: the tooltip's look from shadcn (#446)
samitbasu Nov 22, 2026
593cc7d
A section's setter writes the widgets' defaults, under a preset's loo…
samitbasu Nov 22, 2026
6c22eb8
Merge setters-446: a section's setter writes the widgets' defaults, u…
samitbasu Nov 22, 2026
dcaa8c0
Choices' look from shadcn: checkbox, radio group, switch, field (#446)
samitbasu Nov 22, 2026
244943c
Merge choices-look: choices' look from shadcn (#446)
samitbasu Nov 22, 2026
810c349
A choice field is as wide as its content, except in a form or a card …
samitbasu Nov 22, 2026
572c06d
Merge choices-look: a choice field is as wide as its content, except …
samitbasu Nov 22, 2026
58e9d38
Table's look from shadcn (#446)
samitbasu Nov 22, 2026
5943bf0
Merge table-look: the table's look from shadcn (#446)
samitbasu Nov 22, 2026
e0d3950
Style::at_current_layer: sections set inside write their looks at the…
samitbasu Nov 22, 2026
55ef8d2
Merge part-over: Style::at_current_layer in place of set_table_over (…
samitbasu Nov 22, 2026
0ed5f6c
Builder::part_over: a widget's own look for a part, under the sheet (…
samitbasu Nov 22, 2026
9d56c78
Merge part-over: Builder::part_over, a widget's own look under the sh…
samitbasu Nov 22, 2026
3e3c1b7
Combobox's look from shadcn, the first extension widget on the sheet …
samitbasu Nov 22, 2026
9b43cb6
Merge combobox-look: the combobox's look from shadcn, on the sheet th…
samitbasu Nov 22, 2026
d11a0ef
Fix two CI breaks: a stolen #[allow] and a debug-only import (#446)
samitbasu Nov 22, 2026
66e549f
Gate the preset's `variant` import on `extras`; CI lints featureless …
samitbasu Nov 22, 2026
1c692c9
Merge hover-card-look: fix two CI breaks; gate the preset's variant i…
samitbasu Nov 22, 2026
269bf3a
Hover card's look from shadcn, on the sheet (#446)
samitbasu Nov 22, 2026
57abf3a
Merge hover-card-look: the hover card's look from shadcn, on the shee…
samitbasu Nov 22, 2026
a103666
cargo xtask integrate: CI's steps but the slowest, the check before i…
samitbasu Nov 22, 2026
a63577f
Merge part-over: cargo xtask integrate, CI's steps but the slowest (#…
samitbasu Nov 22, 2026
2e5adb1
Fold #411 into Phase 2: the dialog surface, footer, sheet and popover…
samitbasu Nov 22, 2026
84892a9
A popover's fields stay inside its box: a test of #411's overflow (#411)
samitbasu Nov 22, 2026
f6b5780
Dialogs' looks from shadcn: dialog, alert dialog, sheet, popover (#41…
samitbasu Nov 22, 2026
949557b
Merge dialog-look: #411 folded in, and the dialogs' looks from shadcn…
samitbasu Nov 22, 2026
e88b8d8
Badge's and chip's look from shadcn, on the sheet (#446)
samitbasu Nov 22, 2026
7821ba5
Merge badge-look: the badge's and chip's look from shadcn (#446)
samitbasu Nov 22, 2026
bbcdc58
Form section's frame from shadcn's card, on the sheet (#446)
samitbasu Nov 22, 2026
34229b3
Merge form-look: the form section's frame from shadcn's card (#446)
samitbasu Nov 22, 2026
19b04b1
xtask stops when it is another worktree's binary
samitbasu Nov 22, 2026
d770c14
Merge xtask-home: xtask stops when it is another worktree's binary
samitbasu Nov 22, 2026
8c11a6a
Slider's look from shadcn, on the sheet (#446)
samitbasu Nov 22, 2026
45dfcfc
Merge slider-look: the slider's look from shadcn, and xtask's worktre…
samitbasu Nov 22, 2026
66c7363
Accordion's and disclosure section's look from shadcn, on the sheet (…
samitbasu Nov 22, 2026
89b4df0
Merge accordion-look: the accordion's and section's look from shadcn …
samitbasu Nov 22, 2026
2d61c7e
Accordion keeps the user's gap and chevron nudge over shadcn (#350, #…
samitbasu Nov 22, 2026
0830997
Merge acc-exceptions: the accordion keeps the user's gap and nudge (#…
samitbasu Nov 22, 2026
e4f4e3b
Notify's card on the sheet: sonner's classes as rules over its look (…
samitbasu Nov 22, 2026
a73de9b
Merge notify-look: notify's card on the sheet (#446)
samitbasu Nov 22, 2026
ee8812c
A scroll container takes a style sheet's no-scrollbar
samitbasu Nov 22, 2026
2b3e135
A listbox's rows can be headings (vlist::RowKind)
samitbasu Nov 22, 2026
5512de7
Command palette's look from shadcn, on the sheet (#446)
samitbasu Nov 22, 2026
afc0218
Merge command-look: the command palette's look from shadcn, vlist hea…
samitbasu Nov 22, 2026
f812aea
Whether a node can be focused is the widget's, never a sheet's
samitbasu Nov 22, 2026
9a79807
Merge sheet-sense: focusability is the widget's, never a sheet's
samitbasu Nov 22, 2026
97c39df
Skeleton's, spinner's and progress's looks from shadcn, on the sheet …
samitbasu Nov 22, 2026
64c8425
Merge small-looks: skeleton, spinner and progress from shadcn (#446)
samitbasu Nov 22, 2026
bf1b47b
The number field's look from shadcn's input group, on the sheet (#446)
samitbasu Nov 22, 2026
92506ec
Merge stepper-look: the number field's look from shadcn's input group…
samitbasu Nov 22, 2026
1821acb
Fit the stepper's buttons inside its group at sm and xs (#446)
samitbasu Nov 22, 2026
1527e32
Show the whole dropdown in the menu goldens (#446)
samitbasu Nov 22, 2026
659dd0a
Format the menu goldens' on-screen assertion (#446)
samitbasu Nov 22, 2026
15d0162
Keep eggshell's own metrics for sm and xs fields and steppers (#446)
samitbasu Nov 22, 2026
725d692
Merge p2-trial-fix: the user's #483 trial: xs/sm steppers and fields,…
samitbasu Nov 22, 2026
96bf71e
Scroll a menu or select list that is cut short, measured unseen first…
samitbasu Nov 22, 2026
d7180d0
Enter a measured menu's focus and highlight once it shows (#446)
samitbasu Nov 22, 2026
7873f37
A measured overlay is opening: menus stay exclusive from its first fr…
samitbasu Nov 22, 2026
e0f66f0
Merge menu-fit: a menu or select list cut short scrolls, measured uns…
samitbasu Nov 22, 2026
21aadee
An invalid control takes shadcn's aria-invalid look, and its group tu…
samitbasu Nov 22, 2026
5f09198
The signup form marks its invalid fields: their boxes turn red becaus…
samitbasu Nov 22, 2026
2bae5b4
Merge invalid-api: controls take shadcn's aria-invalid look, and the …
samitbasu Nov 22, 2026
a272264
Goldens for the child-influenced rules no golden showed in effect (#446)
samitbasu Nov 22, 2026
afb24ad
Drop a needless struct update in the accordion golden (#446)
samitbasu Nov 22, 2026
ec7d599
Pass the child-rule goldens' names by value (#446)
samitbasu Nov 22, 2026
f96cf6b
Merge child-goldens: goldens for the child-influenced rules none show…
samitbasu Nov 22, 2026
5bf0818
An open popup's trigger says aria-expanded to the sheet (#446)
samitbasu Nov 22, 2026
68640e6
Merge aria-expanded: an open popup's trigger says aria-expanded to th…
samitbasu Nov 22, 2026
148d4ac
A field's hint is shadcn's muted-foreground, in an invalid field too …
samitbasu Nov 22, 2026
7ba5a3c
Read a text's painted colour from its glyphs, as epaint draws it (#446)
samitbasu Nov 22, 2026
2f61843
Merge hint-muted: a field's hint is muted-foreground, as shadcn (#446)
samitbasu Nov 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,25 @@ jobs:
key: workspace-goldens-screenshots-clippy-release
- name: Mesa lavapipe for the golden images and screenshots
run: sudo apt-get update && sudo apt-get install -y mesa-vulkan-drivers
# The generated shadcn sheets are checked against shadcn's registry at
# the commit in xtask/shadcn.pin, beside the checkout as ../ref/shadcn.
- name: shadcn pin
id: shadcn
run: echo "sha=$(cat xtask/shadcn.pin)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v4
id: shadcn-cache
with:
path: ${{ github.workspace }}/../ref/shadcn
key: shadcn-registry-${{ steps.shadcn.outputs.sha }}
- name: shadcn registry at the pin
if: steps.shadcn-cache.outputs.cache-hit != 'true'
run: |
git init -q ../ref/shadcn
cd ../ref/shadcn
git remote add origin https://github.com/shadcn-ui/ui
git sparse-checkout set apps/v4/registry
git fetch -q --depth 1 --filter=blob:none origin "${{ steps.shadcn.outputs.sha }}"
git checkout -q FETCH_HEAD
# The fuzz step runs in the `fuzz` job, beside this one.
- run: cargo xtask ci --skip fuzz
- name: Disk usage
Expand Down
143 changes: 141 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ eggshell-ui-extras = { path = "crates/eggshell-ui-extras", features = [
"accordion",
"badge",
"command",
"dialog",
"disclosure",
"form",
"hover-card",
Expand Down
1 change: 1 addition & 0 deletions crates/eggshell-ui-extras/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ repository = "https://github.com/samitbasu/eggshell"
accordion = ["disclosure"]
badge = []
command = ["dep:unicode-normalization"]
dialog = []
disclosure = []
form = []
hover-card = []
Expand Down
12 changes: 11 additions & 1 deletion crates/eggshell-ui-extras/src/accordion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ use eggshell_ui::overlay::{Nav, Shown, Wrap};
use eggshell_ui::owned::{Enablement, Face};
use eggshell_ui::{Builder, Key, Scope, Tw, tw};

use eggshell_ui::sheet::Defaults;

use crate::disclosure::{DisclosureStyle, SectionExt};

/// What an accordion runs with what a header asked for.
Expand Down Expand Up @@ -216,12 +218,20 @@ impl<'f, A: 'static, K: Key, M: Mode<T, Change = C>, T: Value, C: 'static>
value: _,
} = self;
let style = b.style().extension::<DisclosureStyle>();
// shadcn's `not-last:border-b` on each item, which the importer
// cannot say, is the column's `divide-y`: the accordion's own.
let column = tw().flex().flex_col();
let column = match style.separator {
Some(line) => column.divide_y(1.0, line),
None => column,
};
b.div_id(key, column.merge(classes), |b| {
let column = b.part_over(
crate::disclosure::AccordionPart::Root,
&[],
Defaults(tw()),
column.merge(classes),
);
b.div_id(key, column, |b| {
items(&mut Items {
b,
mode: Rc::new(mode),
Expand Down
32 changes: 19 additions & 13 deletions crates/eggshell-ui-extras/src/badge/chip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,19 @@ impl<A: 'static, K: Key> Parts<'_, '_, '_, A, K> {
};
let paint = match stop {
Stop::Chip => look.classes(&core, style.radius, enablement, style.transition),
Stop::Remove => surrounds_focus(still(look), &core, &style, enablement),
Stop::Remove => still(look).classes(&core, style.radius, enablement, style.transition),
};
let caller = std::mem::replace(&mut face.options.classes, tw());
let classes = face.frame(&style, end).merge(paint).merge(caller);
// The ring while the × has the focus is the chip's own, not a look.
let ring = match stop {
Stop::Chip => tw(),
Stop::Remove => focus_ring(look, &core, enablement),
};
let classes = face.part(
b,
&style,
(face.frame(&style, end).merge(paint), stop == Stop::Chip),
ring,
);
let removes = remove.map(|Handler(remove)| remove);
let node = b.div_id(key, classes, |s| {
face.content(s, &style);
Expand Down Expand Up @@ -251,19 +260,15 @@ fn still(mut look: Look) -> Look {
look
}

/// The classes of a chip whose × is its Tab stop: `look`'s, with the focus
/// ring shown while the × has focus.
fn surrounds_focus(look: Look, core: &Style, style: &BadgeStyle, enablement: Enablement) -> Tw {
let classes = look
.classes(core, style.radius, enablement, style.transition)
.focusable_none();
/// The ring of a chip whose × is its Tab stop, shown while the × has focus.
fn focus_ring(look: Look, core: &Style, enablement: Enablement) -> Tw {
match enablement {
Enablement::Enabled => {
let ring = look.paint.focus.unwrap_or(core.focus());
let ring = look.paint.focus.unwrap_or(core.tokens.focus);
let border = look.paint.states.focused.border;
classes.focus_within(|p| p.border_color(border).ring(ring.width, ring.color))
tw().focus_within(|p| p.border_color(border).ring(ring.width, ring.color))
}
Enablement::Disabled => classes,
Enablement::Disabled => tw(),
}
}

Expand All @@ -284,7 +289,8 @@ fn remove_button<A: 'static>(
.sense_click()
.opacity(looks.rest)
.hover(|p| p.opacity(looks.hover))
.transition(style.transition);
.transition(style.transition)
.attr("icon", "inline-end");
let classes = match stop {
Stop::Chip => classes.focusable_none(),
Stop::Remove => classes,
Expand Down
Loading
Loading