T11b loading: progress bars and rings that glide, loading overlay, lazy load, suspense and async view, refresh and typing indicators, upload list; draw-time notifies ask for a frame

This commit is contained in:
ZacharyZhang-NY committed 2026-09-25 17:27:21 -04:00
1 parent d4066661d5
commit ce31c7fb06
38 files changed
+1646 -91

No files matched your search

+2 -1
View File
@@ -53,13 +53,14 @@ impl RenderOnce for FloatingToolbar {
.id(self.id.clone())
.child(canvas(
|_, _, _| {},
move |_, _, _, cx| {
move |_, _, window, cx| {
let now = field.read(cx).bounds_for(from);
if now != start {
log::debug!("floating toolbar: the selection moved to {now:?}");
seen.update(cx, |seen, cx| {
*seen = now;
cx.notify();
window.request_animation_frame();
});
}
},
+4 -2
View File
@@ -84,11 +84,12 @@ impl RenderOnce for HoverCard {
})
.child(
canvas(
move |bounds, _, cx| {
move |bounds, window, cx| {
if measure.read(cx).host != bounds {
measure.update(cx, |hover, cx| {
hover.host = bounds;
cx.notify();
window.request_animation_frame();
});
}
},
@@ -114,11 +115,12 @@ impl RenderOnce for HoverCard {
.child((self.content)(window, cx))
.child(
canvas(
move |bounds, _, cx| {
move |bounds, window, cx| {
if tall.read(cx).height != bounds.size.height {
tall.update(cx, |hover, cx| {
hover.height = bounds.size.height;
cx.notify();
window.request_animation_frame();
});
}
},
+2 -1
View File
@@ -223,11 +223,12 @@ impl RenderOnce for Lightbox {
.child(picture)
.child(
canvas(
move |bounds, _, cx| {
move |bounds, window, cx| {
if area.read(cx) != &bounds.size {
area.update(cx, |area, cx| {
*area = bounds.size;
cx.notify();
window.request_animation_frame();
});
}
},
+4 -2
View File
@@ -97,11 +97,12 @@ impl RenderOnce for Popover {
.child(trigger)
.child(
canvas(
move |bounds, _, cx| {
move |bounds, window, cx| {
if measure.read(cx).host != bounds {
measure.update(cx, |pop, cx| {
pop.host = bounds;
cx.notify();
window.request_animation_frame();
});
}
},
@@ -150,11 +151,12 @@ impl RenderOnce for Popover {
)
.child(
canvas(
move |bounds, _, cx| {
move |bounds, window, cx| {
if tall.read(cx).height != bounds.size.height {
tall.update(cx, |pop, cx| {
pop.height = bounds.size.height;
cx.notify();
window.request_animation_frame();
});
}
},
+2 -1
View File
@@ -174,11 +174,12 @@ fn light(
.child(card)
.child(
canvas(
move |bounds, _, cx| {
move |bounds, window, cx| {
if measure.read(cx).card != bounds.size.height {
measure.update(cx, |lit, cx| {
lit.card = bounds.size.height;
cx.notify();
window.request_animation_frame();
});
}
},