ITADN

dave: replace custom collapsing folder widget with egui CollapsingHeader

#1454Closedjb55 创建于 2026-04-25
J
jb55commented
The session-list sidebar in `notedeck_dave` currently uses a hand-rolled collapsible folder widget in `crates/notedeck_dave/src/ui/session_list.rs` (`cwd_folder_header`, `host_header_ui`, `disclosure_triangle`). Introduced in c945d51266c2b. `egui::collapsing_header::CollapsingState` covers the same need with built-in animation, accessibility, and disclosure rendering. The reason it wasn't used originally: `CollapseState` (the external store) has to be queryable from outside the UI render pass for keyboard navigation (Ctrl+Tab, Ctrl+1-9) and for `collapse_state.json` persistence. Refactor: keep `CollapseState` as the source of truth, but render the headers using `CollapsingState` and force `set_open` from the external state every frame. Scope: - `crates/notedeck_dave/src/ui/session_list.rs` only. - `CollapseState`, `SessionListAction`, and the `lib.rs`/`update.rs`/`session.rs` consumers stay unchanged.
关闭于 2026-04-25 2 条评论