···4848 Constraint::Percentage(10),
4949 Constraint::Percentage(90),
5050 ]),
5151- z_preview: Layout::vertical(vec![
5252- Constraint::Percentage(20),
5353- Constraint::Percentage(80),
5454- ]),
5151+ z_preview: Layout::vertical(vec![Constraint::Max(6), Constraint::Percentage(80)]),
5552 }
5653 }
5754}
···221218 .get_node_by_zettel_id(id)
222219 .expect("Invariant broken, this must exist.");
223220224224- //TODO: we would actually want to create the new zettel_list_item
225225- // and insert it into the list where the selected id is there, that
226226- // is what makes the most sense imo
221221+ // actually this is the only way to do it with the list thing,
222222+ // the ratatui api doesnt expose a swap function to the inner render
223223+ // list.
227224 self.zettel_list = ZettelList::new(
228228- // ideally we dont want to do this right?
229225 kh.graph.nodes_iter().collect::<Vec<_>>().as_slice(),
230226 self.zettel_list.state,
231227 self.zettel_list.width,
232228 );
229229+233230 self.zettel_view = ZettelView::from(node.payload());
234231 self.preview = Preview::from(node.payload().content(&kh.ws).await?);
235232 drop(kh);
···267264268265 frame.render_widget(self.zettel_view.clone(), zettel_layout);
269266 frame.render_widget(self.preview.clone(), preview_layout);
267267+ // frame.render_widget(Block::new().bg(Color::Red), preview_layout);
270268271269 Ok(())
272270 }