refactor out the nav-scrollable children len arg
[?]
Jul 22, 2025, 3:19 PM
C5P3JIFC55TCXP53SWVYB5GHM4O7DBSBIEYSQEJ3NUX7762TUQAACDependencies
- [2]
23SFYK4Qbig view refactor into a new crate - [3]
WW36JYLRadd iced_nav_scrollable widget crate - [4]
WIFVLV37nav-scrollabe: detect size to determine if needs scrolling, msg when ready - [5]
XZ6D3UUEavoid alloc - [6]
KWTBNTO3diffs selection and scrolling - [7]
PTWZYQFRuse nav-scrollable for repo status - [8]
UR4J677Rnav for log changes and refactors - [9]
7SSBM4UQview: refactor repo view - [10]
KEPKF3WOunify diffs handling, simplify view - [11]
I2AG42PAnew cols layout - [12]
5MUEECMJsmooth scrolling nav - [13]
MYGIBRRHwip custom theme - [14]
SASAN2XCuse nav-scrollable
Change contents
- edit in inflorescence_view/src/diff.rs at line 92
let children_len = sections_view.len(); - edit in inflorescence_view/src/diff.rs at line 95
children_len, - edit in inflorescence_view/src/diff.rs at line 134
let diffs_len = diffs_with_contents.len() + diffs_without_contents.len(); - replacement in inflorescence_view/src/diff.rs at line 135
el(iced_nav_scrollable::view(nav, diffs, diffs_len, Msg::DiffNav).class(if diff_selected {theme::Scrollable::Selected} else {theme::Scrollable::Normal},),)el(iced_nav_scrollable::view(nav, diffs, Msg::DiffNav).class(if diff_selected {theme::Scrollable::Selected} else {theme::Scrollable::Normal},)) - edit in inflorescence_view/src/app.rs at line 292
let files_len = entry.file_paths.len(); - replacement in inflorescence_view/src/app.rs at line 299
el(iced_nav_scrollable::view(nav,files,files_len,move |msg| Msg::LogNav { hash, msg },)el(iced_nav_scrollable::view(nav, files, move |msg| {Msg::LogNav { hash, msg }}) - edit in inflorescence_view/src/app.rs at line 356
let status_nav_children_len = repo::nav_contents_count(&repo.state); - edit in inflorescence_view/src/app.rs at line 374
status_nav_children_len, - edit in iced_nav_scrollable/src/lib.rs at line 228
children_len: usize, - replacement in iced_nav_scrollable/src/lib.rs at line 236
debug_assert_eq!(nav.section_heights.len(), children_len, "The `NavScrollable` was most likely initialized with a count different from the number of actual children given to the the view function. Actual number is {}, but got {} children_len arg", nav.section_heights.len(), children_len);#[cfg(debug_assertions)]let mut unmatched_sections = nav.section_heights.len();let children = children.into_iter().zip(nav.section_heights.keys()).map(|(child, id)| {unmatched_sections -= 1;Element::from(container(child).id(id.clone()))},); - replacement in iced_nav_scrollable/src/lib.rs at line 246[3.4212]→[3.4212:4261](∅→∅),[3.4261]→[4.4637:4678](∅→∅),[4.4678]→[3.4295:4371](∅→∅),[3.4295]→[3.4295:4371](∅→∅),[3.4371]→[6.50767:50816](∅→∅)
let children = children.into_iter().zip(nav.section_heights.keys()).map(|(child, id)| Element::from(container(child).id(id.clone())));widget::scrollable(widget::column(children))let view = widget::scrollable(widget::column(children)) - replacement in iced_nav_scrollable/src/lib.rs at line 248
.on_scroll(move |viewport| map_msg(Msg::Scrolled(viewport))).on_scroll(move |viewport| map_msg(Msg::Scrolled(viewport)));debug_assert_eq!(unmatched_sections, 0,"The `NavScrollable` was most likely initialized with a count different from the number of actual children given to the the view function. Actual number is {}, but got only {} children", nav.section_heights.len(), nav.section_heights.len() - unmatched_sections);view