chore: Update GPUI and fix uniform_list API changes. (#945)
close #943 I am not sure about title specification of PR. pls feel free to edit.
This commit is contained in:
parent
f82c347e37
commit
1214798abd
3 changed files with 66 additions and 38 deletions
57
Cargo.lock
generated
57
Cargo.lock
generated
|
|
@ -623,7 +623,7 @@ dependencies = [
|
||||||
"bitflags 2.9.1",
|
"bitflags 2.9.1",
|
||||||
"cexpr",
|
"cexpr",
|
||||||
"clang-sys",
|
"clang-sys",
|
||||||
"itertools 0.12.1",
|
"itertools 0.10.5",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"lazycell",
|
"lazycell",
|
||||||
"log",
|
"log",
|
||||||
|
|
@ -646,7 +646,7 @@ dependencies = [
|
||||||
"bitflags 2.9.1",
|
"bitflags 2.9.1",
|
||||||
"cexpr",
|
"cexpr",
|
||||||
"clang-sys",
|
"clang-sys",
|
||||||
"itertools 0.13.0",
|
"itertools 0.10.5",
|
||||||
"log",
|
"log",
|
||||||
"prettyplease",
|
"prettyplease",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
|
|
@ -1226,7 +1226,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "collections"
|
name = "collections"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed.git#ee2a3299815ea29770491b34592a448d95761cdb"
|
source = "git+https://github.com/zed-industries/zed.git#0852912fd6868c0fcffdeef1cd592def4c50fbc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap 2.9.0",
|
"indexmap 2.9.0",
|
||||||
"rustc-hash 2.1.0",
|
"rustc-hash 2.1.0",
|
||||||
|
|
@ -1255,6 +1255,16 @@ dependencies = [
|
||||||
"memchr",
|
"memchr",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "command-fds"
|
||||||
|
version = "0.3.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2ec1052629a80c28594777d1252efc8a6b005d13f9edfd8c3fc0f44d5b32489a"
|
||||||
|
dependencies = [
|
||||||
|
"nix 0.30.1",
|
||||||
|
"thiserror 2.0.12",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "concurrent-queue"
|
name = "concurrent-queue"
|
||||||
version = "2.5.0"
|
version = "2.5.0"
|
||||||
|
|
@ -1636,7 +1646,7 @@ version = "3.4.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "697b5419f348fd5ae2478e8018cb016c00a5881c7f46c717de98ffd135a5651c"
|
checksum = "697b5419f348fd5ae2478e8018cb016c00a5881c7f46c717de98ffd135a5651c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"nix",
|
"nix 0.29.0",
|
||||||
"windows-sys 0.59.0",
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -1739,7 +1749,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "derive_refineable"
|
name = "derive_refineable"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed.git#ee2a3299815ea29770491b34592a448d95761cdb"
|
source = "git+https://github.com/zed-industries/zed.git#0852912fd6868c0fcffdeef1cd592def4c50fbc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
|
@ -2786,7 +2796,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gpui"
|
name = "gpui"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed.git#ee2a3299815ea29770491b34592a448d95761cdb"
|
source = "git+https://github.com/zed-industries/zed.git#0852912fd6868c0fcffdeef1cd592def4c50fbc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"as-raw-xcb-connection",
|
"as-raw-xcb-connection",
|
||||||
|
|
@ -2955,7 +2965,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gpui_macros"
|
name = "gpui_macros"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed.git#ee2a3299815ea29770491b34592a448d95761cdb"
|
source = "git+https://github.com/zed-industries/zed.git#0852912fd6868c0fcffdeef1cd592def4c50fbc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heck 0.5.0",
|
"heck 0.5.0",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
|
|
@ -3225,7 +3235,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "http_client"
|
name = "http_client"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed.git#ee2a3299815ea29770491b34592a448d95761cdb"
|
source = "git+https://github.com/zed-industries/zed.git#0852912fd6868c0fcffdeef1cd592def4c50fbc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
|
@ -3242,7 +3252,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "http_client_tls"
|
name = "http_client_tls"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed.git#ee2a3299815ea29770491b34592a448d95761cdb"
|
source = "git+https://github.com/zed-industries/zed.git#0852912fd6868c0fcffdeef1cd592def4c50fbc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rustls",
|
"rustls",
|
||||||
"rustls-platform-verifier",
|
"rustls-platform-verifier",
|
||||||
|
|
@ -4021,7 +4031,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "media"
|
name = "media"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed.git#ee2a3299815ea29770491b34592a448d95761cdb"
|
source = "git+https://github.com/zed-industries/zed.git#0852912fd6868c0fcffdeef1cd592def4c50fbc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bindgen 0.71.1",
|
"bindgen 0.71.1",
|
||||||
|
|
@ -4230,6 +4240,18 @@ dependencies = [
|
||||||
"memoffset",
|
"memoffset",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "nix"
|
||||||
|
version = "0.30.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6"
|
||||||
|
dependencies = [
|
||||||
|
"bitflags 2.9.1",
|
||||||
|
"cfg-if",
|
||||||
|
"cfg_aliases",
|
||||||
|
"libc",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "nodrop"
|
name = "nodrop"
|
||||||
version = "0.1.14"
|
version = "0.1.14"
|
||||||
|
|
@ -4414,7 +4436,7 @@ version = "0.7.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56"
|
checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro-crate 3.2.0",
|
"proc-macro-crate 1.3.1",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn 2.0.101",
|
"syn 2.0.101",
|
||||||
|
|
@ -5738,7 +5760,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "refineable"
|
name = "refineable"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed.git#ee2a3299815ea29770491b34592a448d95761cdb"
|
source = "git+https://github.com/zed-industries/zed.git#0852912fd6868c0fcffdeef1cd592def4c50fbc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"derive_refineable",
|
"derive_refineable",
|
||||||
"workspace-hack",
|
"workspace-hack",
|
||||||
|
|
@ -5848,7 +5870,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "reqwest_client"
|
name = "reqwest_client"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed.git#ee2a3299815ea29770491b34592a448d95761cdb"
|
source = "git+https://github.com/zed-industries/zed.git#0852912fd6868c0fcffdeef1cd592def4c50fbc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
|
@ -6397,7 +6419,7 @@ checksum = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "semantic_version"
|
name = "semantic_version"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed.git#ee2a3299815ea29770491b34592a448d95761cdb"
|
source = "git+https://github.com/zed-industries/zed.git#0852912fd6868c0fcffdeef1cd592def4c50fbc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"serde",
|
"serde",
|
||||||
|
|
@ -6895,7 +6917,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sum_tree"
|
name = "sum_tree"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed.git#ee2a3299815ea29770491b34592a448d95761cdb"
|
source = "git+https://github.com/zed-industries/zed.git#0852912fd6868c0fcffdeef1cd592def4c50fbc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrayvec",
|
"arrayvec",
|
||||||
"log",
|
"log",
|
||||||
|
|
@ -8071,12 +8093,13 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "util"
|
name = "util"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/zed-industries/zed.git#ee2a3299815ea29770491b34592a448d95761cdb"
|
source = "git+https://github.com/zed-industries/zed.git#0852912fd6868c0fcffdeef1cd592def4c50fbc5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-fs 2.1.2",
|
"async-fs 2.1.2",
|
||||||
"async_zip",
|
"async_zip",
|
||||||
"collections",
|
"collections",
|
||||||
|
"command-fds",
|
||||||
"dirs 4.0.0",
|
"dirs 4.0.0",
|
||||||
"dunce",
|
"dunce",
|
||||||
"futures",
|
"futures",
|
||||||
|
|
@ -9426,7 +9449,7 @@ dependencies = [
|
||||||
"futures-core",
|
"futures-core",
|
||||||
"futures-lite 2.6.0",
|
"futures-lite 2.6.0",
|
||||||
"hex",
|
"hex",
|
||||||
"nix",
|
"nix 0.29.0",
|
||||||
"ordered-stream",
|
"ordered-stream",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_repr",
|
"serde_repr",
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
use std::ops::Range;
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
use std::{cell::Cell, rc::Rc};
|
use std::{cell::Cell, rc::Rc};
|
||||||
|
|
||||||
|
|
@ -560,7 +561,6 @@ where
|
||||||
D: ListDelegate,
|
D: ListDelegate,
|
||||||
{
|
{
|
||||||
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {
|
||||||
let view = cx.entity().clone();
|
|
||||||
let vertical_scroll_handle = self.vertical_scroll_handle.clone();
|
let vertical_scroll_handle = self.vertical_scroll_handle.clone();
|
||||||
let items_count = self.delegate.items_count(cx);
|
let items_count = self.delegate.items_count(cx);
|
||||||
let loading = self.delegate.loading(cx);
|
let loading = self.delegate.loading(cx);
|
||||||
|
|
@ -631,22 +631,28 @@ where
|
||||||
})
|
})
|
||||||
.when(items_count > 0, |this| {
|
.when(items_count > 0, |this| {
|
||||||
this.child(
|
this.child(
|
||||||
uniform_list(view, "uniform-list", items_count, {
|
uniform_list(
|
||||||
move |list, visible_range, window, cx| {
|
"uniform-list",
|
||||||
list.load_more_if_need(
|
items_count,
|
||||||
items_count,
|
cx.processor(
|
||||||
visible_range.end,
|
move |list, visible_range: Range<usize>, window, cx| {
|
||||||
window,
|
list.load_more_if_need(
|
||||||
cx,
|
items_count,
|
||||||
);
|
visible_range.end,
|
||||||
|
window,
|
||||||
|
cx,
|
||||||
|
);
|
||||||
|
|
||||||
visible_range
|
visible_range
|
||||||
.map(|ix| {
|
.map(|ix| {
|
||||||
list.render_list_item(ix, window, cx)
|
list.render_list_item(
|
||||||
})
|
ix, window, cx,
|
||||||
.collect::<Vec<_>>()
|
)
|
||||||
}
|
})
|
||||||
})
|
.collect::<Vec<_>>()
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
.flex_grow()
|
.flex_grow()
|
||||||
.with_sizing_behavior(sizing_behavior)
|
.with_sizing_behavior(sizing_behavior)
|
||||||
.track_scroll(vertical_scroll_handle)
|
.track_scroll(vertical_scroll_handle)
|
||||||
|
|
|
||||||
|
|
@ -1539,11 +1539,10 @@ where
|
||||||
this.child(
|
this.child(
|
||||||
h_flex().id("table-body").flex_grow().size_full().child(
|
h_flex().id("table-body").flex_grow().size_full().child(
|
||||||
uniform_list(
|
uniform_list(
|
||||||
view,
|
|
||||||
"table-uniform-list",
|
"table-uniform-list",
|
||||||
rows_count + extra_rows_needed,
|
rows_count + extra_rows_needed,
|
||||||
{
|
cx.processor(
|
||||||
move |table, visible_range, window, cx| {
|
move |table, visible_range: Range<usize>, window, cx| {
|
||||||
// We must calculate the col sizes here, because the col sizes
|
// We must calculate the col sizes here, because the col sizes
|
||||||
// need render_th first, then that method will set the bounds of each col.
|
// need render_th first, then that method will set the bounds of each col.
|
||||||
let col_sizes: Rc<Vec<gpui::Size<Pixels>>> = Rc::new(
|
let col_sizes: Rc<Vec<gpui::Size<Pixels>>> = Rc::new(
|
||||||
|
|
@ -1597,8 +1596,8 @@ where
|
||||||
});
|
});
|
||||||
|
|
||||||
items
|
items
|
||||||
}
|
},
|
||||||
},
|
),
|
||||||
)
|
)
|
||||||
.flex_grow()
|
.flex_grow()
|
||||||
.size_full()
|
.size_full()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue