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. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
41368430f5
commit
d7272e88bd
44 files changed
+535
-138
No files matched your search
@@ -402,3 +402,39 @@ fn effects_keep_their_content_and_let_presses_through(cx: &mut TestAppContext) {
|
||||
settle(cx);
|
||||
assert_eq!(view.read_with(cx, |effects, _| effects.presses), 1);
|
||||
}
|
||||
|
||||
/// Rows rising in, in a sized box down a column that fills a row.
|
||||
struct Rising;
|
||||
|
||||
impl Render for Rising {
|
||||
fn render(&mut self, _: &mut Window, _: &mut Context<Self>) -> impl IntoElement {
|
||||
let rows = ["Inbox", "Drafts", "Sent"].map(|name| {
|
||||
div()
|
||||
.debug_selector(move || name.into())
|
||||
.px_4()
|
||||
.py_2()
|
||||
.child(name)
|
||||
});
|
||||
let column = div().flex().flex_col().child(
|
||||
div()
|
||||
.debug_selector(|| "risen".into())
|
||||
.w(px(300.0))
|
||||
.child(super::Stagger::new("rise").children(rows)),
|
||||
);
|
||||
div().size_full().flex().child(div().flex_1().child(column))
|
||||
}
|
||||
}
|
||||
|
||||
#[gpui::test]
|
||||
fn a_stagger_box_takes_in_its_first_row_rise(cx: &mut TestAppContext) {
|
||||
cx.update(Theme::init);
|
||||
let (_, cx) = cx.add_window_view(|_, _| Rising);
|
||||
cx.run_until_parked();
|
||||
let bounds = |cx: &mut VisualTestContext, name| cx.debug_bounds(name).expect(name);
|
||||
let (held, first, last) = (bounds(cx, "risen"), bounds(cx, "Inbox"), bounds(cx, "Sent"));
|
||||
assert!(
|
||||
first.top() - held.top() > super::NUDGE,
|
||||
"the first row starts risen"
|
||||
);
|
||||
assert_eq!(last.bottom(), held.bottom(), "the box ends with its rows");
|
||||
}
|
||||
Reference in new issue
Block a user