Feat: begin sample explorer overhaul
All checks were successful
Deploy Website / deploy (push) Has been skipped

This commit is contained in:
2026-03-05 00:42:39 +01:00
parent 2c8a6794a3
commit 4743c33916
5 changed files with 143 additions and 28 deletions

View File

@@ -299,6 +299,13 @@ fn render_side_panel(frame: &mut Frame, app: &App, area: Rect) {
let [tree_area, preview_area] =
Layout::vertical([Constraint::Fill(1), Constraint::Length(6)]).areas(area);
// Compute visible height: tree_area minus borders (2), minus search bar (1) if shown
let mut vh = tree_area.height.saturating_sub(2) as usize;
if state.search_active || !state.search_query.is_empty() {
vh = vh.saturating_sub(1);
}
state.visible_height.set(vh);
let entries = state.entries();
SampleBrowser::new(&entries, state.cursor)
.scroll_offset(state.scroll_offset)
@@ -542,6 +549,13 @@ fn render_footer(frame: &mut Frame, app: &App, snapshot: &SequencerSnapshot, are
])
} else {
let bindings: Vec<(&str, &str)> = match app.page {
Page::Main if app.panel.visible && app.panel.focus == PanelFocus::Side => vec![
("↑↓", "Navigate"),
("", "Expand/Play"),
("", "Collapse"),
("/", "Search"),
("Tab", "Close"),
],
Page::Main => vec![
("Space", "Play"),
("Enter", "Edit"),