nav-scrollable: set skip-able sections
[?]
Jul 5, 2025, 9:19 AM
GOLHUD6RCYCO2SPULCFGWIW3ALBDODNEMUHVAKCDWYQREKWGFTLQCDependencies
- [2]
QMAUTRB6refactor diff - [3]
DCSUCH6Radd undecoded diff view, improve decoded view style - [4]
BFN2VHZSrefactor file stuff into sub-mod - [5]
23SFYK4Qbig view refactor into a new crate - [6]
WW36JYLRadd iced_nav_scrollable widget crate - [7]
WIFVLV37nav-scrollabe: detect size to determine if needs scrolling, msg when ready - [8]
SASAN2XCuse nav-scrollable - [9]
YKHE3XMWrefactor diffs handling - [10]
ACDXXAX2refactor main's updates into smaller fns - [11]
KEPKF3WOunify diffs handling, simplify view - [*]
6YZAVBWUInitial commit - [*]
MJDGPSHGWIP contents diff
Change contents
- replacement in inflorescence/src/main.rs at line 186
if let Some(file::Loaded { id, contents_count }) = loaded {if let Some(file::Loaded {id,contents_count,unchanged_sections,}) = loaded{ - replacement in inflorescence/src/main.rs at line 194
let (nav, tasks) = iced_nav_scrollable::init(contents_count);let (nav, tasks) = iced_nav_scrollable::init(contents_count,unchanged_sections,); - replacement in inflorescence/src/main.rs at line 754
let (nav, nav_tasks) =iced_nav_scrollable::init(contents_count);let unchanged_sections = diff::unchanged_sections(&diff);let (nav, nav_tasks) = iced_nav_scrollable::init(contents_count,unchanged_sections,); - edit in inflorescence/src/file.rs at line 11
use std::collections::HashSet; - edit in inflorescence/src/file.rs at line 96
pub unchanged_sections: HashSet<usize>, - edit in inflorescence/src/file.rs at line 124
let unchanged_sections =diff::unchanged_sections(&file_diff); - replacement in inflorescence/src/file.rs at line 133
return Some(Loaded { id, contents_count });return Some(Loaded {id,contents_count,unchanged_sections,}); - edit in inflorescence/src/file.rs at line 147
let skip_sections =diff::unchanged_sections(&file_diff); - replacement in inflorescence/src/file.rs at line 156
return Some(Loaded { id, contents_count });return Some(Loaded {id,contents_count,unchanged_sections: skip_sections,}); - edit in inflorescence/src/diff.rs at line 17
use std::collections::HashSet; - edit in inflorescence/src/diff.rs at line 169
/// Get indices of unchanged sections that are less relevant than the actual/// changespub fn unchanged_sections(diff: &File) -> HashSet<usize> {match diff {File::Decoded(file) => file.combined.sections.iter().enumerate().filter_map(|(ix, section)| match section {Section::Unchanged(_) => Some(ix),Section::Changed { .. } => None,}).collect(),File::Undecodable(_file) => HashSet::new(),}} - edit in iced_nav_scrollable/src/lib.rs at line 3
use std::collections::HashSet; - edit in iced_nav_scrollable/src/lib.rs at line 21
/// Indices of sections that should be skipped on scrollpub skip_sections: HashSet<usize>, - replacement in iced_nav_scrollable/src/lib.rs at line 49
pub fn init(contents_count: usize) -> (NavScrollable, Task<Msg>) {pub fn init(contents_count: usize,skip_sections: HashSet<usize>,) -> (NavScrollable, Task<Msg>) { - edit in iced_nav_scrollable/src/lib.rs at line 91
skip_sections,