feat: add category tree with expand/collapse in category panel
Add a tree-based category panel that supports expand/collapse of categories. Introduces CatTreeEntry and build_cat_tree to render categories as a collapsible tree. The category panel now displays categories with expand indicators (▶/▼) and shows items under expanded categories. CmdContext gains cat_tree_entry(), cat_at_cursor(), and cat_tree_len() methods to work with the tree. App tracks expanded_cats in a HashSet. Keymap updates: Enter in category panel now triggers filter-to-item. Co-Authored-By: fiddlerwoaroof/git-smart-commit (unsloth/Qwen3.5-35B-A3B-GGUF:Q5_K_M)
This commit is contained in:
@ -228,7 +228,12 @@ fn draw_content(f: &mut Frame, area: Rect, app: &App) {
|
||||
if app.category_panel_open {
|
||||
let a = Rect::new(side.x, y, side.width, ph);
|
||||
f.render_widget(
|
||||
CategoryPanel::new(&app.model, &app.mode, app.cat_panel_cursor),
|
||||
CategoryPanel::new(
|
||||
&app.model,
|
||||
&app.mode,
|
||||
app.cat_panel_cursor,
|
||||
&app.expanded_cats,
|
||||
),
|
||||
a,
|
||||
);
|
||||
y += ph;
|
||||
|
||||
Reference in New Issue
Block a user