Port · Parity: every page matches gpui 0.2.2's; the rules re-tested

Every page and scripted state was shot with gpui 0.2.2 and with the
port, light and dark, full width and at 280px, judged pair by pair by
agents with skeptics, and every page's log diffed. What differed is
fixed, each with a test that fails without it where the test platform
can show it:

- The gallery's harness takes posted mouse moves (gpui_macos listens
  to a tracking area), posts each drag move twice (it no longer
  replays a held drag), and waits three frames before each shot.
- Rolling digits: a block column, so taffy 0.13 lends the cell no
  baseline, and a line of whole device pixels, since gpui snaps each
  length on its own. DescriptionList's row aligns ends.
- Margins that taffy 0.13 collapses through a plain block: the
  drawer's pull and snap, the stagger and transition rise, the dialog
  and palette rises, the fullscreen dialog's slide.
- An Input keeps room to type in a squeezed row; the field rows drop
  w_full, whose reason was taffy 0.9's.

AGENTS.md's rules that named gpui 0.2.2 or taffy 0.9 were re-tested
against both sources and rewritten, and new ones say what the port
changed. TASKS.md's tags follow: what the new gpui makes possible is
prove. Captions, doc comments and README say what holds now.
This commit is contained in:
ZacharyZhang-NY committed 2026-09-29 10:39:55 -04:00
1 parent 3189df013f
commit 3f1597fa28
44 files changed
+535 -138

No files matched your search

+1 -1
View File
@@ -95,9 +95,9 @@ impl RenderOnce for InputGroup {
.child(addon)
};
div()
.debug_selector(|| "group-root".into())
.flex()
.items_center()
.w_full()
.h(theme.control_height(self.size))
.overflow_hidden()
.rounded(theme.radius(Radius::Md))
+10 -2
View File
@@ -90,9 +90,9 @@ impl RenderOnce for Input {
};
let (state, clear_id) = (self.state.clone(), self.state.entity_id());
div()
.debug_selector(|| "input-root".into())
.flex()
.gap_2()
.w_full()
.px(theme.control_padding(self.size))
.map(|frame| {
if multi {
@@ -119,7 +119,15 @@ impl RenderOnce for Input {
window.focus(&focus, cx)
})
.children(self.prefix)
.child(div().flex_1().min_w_0().child(self.state))
.child(
div()
.debug_selector(|| "input-text".into())
.flex_1()
.min_w_0()
.child(self.state)
// An empty strut keeps the frame's inset to type in; squeezed, it spills unseen.
.child(div().px(theme.control_padding(self.size)).border_x_1()),
)
.when(self.clearable && !empty && !disabled, |frame| {
frame.child(
IconButton::new(("input-clear", clear_id), IconName::CircleX)
-1
View File
@@ -215,7 +215,6 @@ impl RenderOnce for TagInput {
.flex_wrap()
.items_center()
.gap_1()
.w_full()
.min_h(theme.control_height(ControlSize::Md))
.px_1()
.py_0p5()
+12 -3
View File
@@ -7,8 +7,8 @@ use super::setup;
use crate::{
buttons::Button,
forms::{
Choice, DatePicker, EmailInput, FieldArray, Form, FormField, Input, InputEvent,
MentionInput, NumberInput, Select, Slider, TextInput,
Choice, DatePicker, EmailInput, FieldArray, Form, FormField, Input, InputEvent, InputGroup,
MentionInput, NumberInput, Select, Slider, TagInput, TextInput,
},
layout::tests::narrow_width,
};
@@ -224,10 +224,19 @@ fn fields_fill_a_column_their_block_measures_by_content(cx: &mut TestAppContext)
narrow_width(cx, "number-root", |_, _| {
NumberInput::new("number", 42.0).into_any_element()
}),
narrow_width(cx, "input-root", move |window, cx| {
Input::new(&field(window, cx)).into_any_element()
}),
narrow_width(cx, "group-root", move |window, cx| {
InputGroup::new(&field(window, cx)).into_any_element()
}),
narrow_width(cx, "tag-input tags", |_, _| {
TagInput::new("tags", ["a"]).into_any_element()
}),
];
assert_eq!(
widths,
[px(240.0); 6],
[px(240.0); 9],
"each field spans the card inside its padding"
);
}