From eee260824aa544d4b1ec59b24284ec59ffcfaddb Mon Sep 17 00:00:00 2001 From: Jeremy Wall Date: Tue, 26 Nov 2024 17:09:57 -0500 Subject: [PATCH] chore: cleanup portion of #5 --- src/book/mod.rs | 2 -- src/ui/mod.rs | 2 -- src/ui/render/viewport.rs | 4 +--- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/book/mod.rs b/src/book/mod.rs index f532252..742db65 100644 --- a/src/book/mod.rs +++ b/src/book/mod.rs @@ -23,8 +23,6 @@ pub struct Book { pub(crate) model: Model, pub current_sheet: u32, pub location: crate::ui::Address, - // TODO(zaphar): Because the ironcalc model is sparse we need to track our render size - // separately } impl Book { diff --git a/src/ui/mod.rs b/src/ui/mod.rs index a67ec75..851528f 100644 --- a/src/ui/mod.rs +++ b/src/ui/mod.rs @@ -162,8 +162,6 @@ impl<'ws> Workspace<'ws> { /// Handle input in our ui loop. pub fn handle_input(&mut self, evt: Event) -> Result> { - // TODO(jwall): We probably want to separate this out into - // a pure function so we can script various testing scenarios. if let Event::Key(key) = evt { let result = match self.state.modality() { Modality::Navigate => self.handle_navigation_input(key)?, diff --git a/src/ui/render/viewport.rs b/src/ui/render/viewport.rs index c5e6988..f5dc763 100644 --- a/src/ui/render/viewport.rs +++ b/src/ui/render/viewport.rs @@ -60,7 +60,7 @@ impl<'book> Viewport<'book> { } pub(crate) fn get_visible_rows(&self, height: u16, state: &ViewportState) -> Vec { - // TODO(jeremy): For now the row default height is 1. We'll have + // NOTE(jeremy): For now the row default height is 1. We'll have // to adjust that if this changes. let mut length = 1; let start_row = std::cmp::min(self.selected.row, state.prev_corner.row); @@ -189,8 +189,6 @@ impl<'book> Viewport<'book> { let count = if i == 26 { 1 } else { (i / 26) + 1 }; Cell::new(COLNAMES[(i - 1) % 26].repeat(count)) })); - // TODO(zaphar): We should calculate the length from the length of the stringified version of the - // row indexes. let mut col_constraints = vec![Constraint::Length(5)]; col_constraints.extend(constraints.into_iter()); Ok(Table::new(rows, col_constraints)