tawasuyu

tawasuyu/llimphi

Sovereign retained-mode GPU UI framework in Rust (wgpu+vello+taffy+parley), Elm loop, 40+ widgets.

Rust 238TOML 102Markdown 83Shell 24178 Sutichaykuna

⎇ main widgets/rag-sidebar/README.md Markdown · 36 siq'ikuna · 1.5 KB Ñawpa willay ch'uya

chore: refresco desde el monorepo — 27 crates nuevos (anim, lottie, svg, mesh, image, layer, test, wire-view, widgets rag-sidebar/router/lazy-list/rive-button) y sync de los 95 existentes 93253cc22 · Sergio ·

1# llimphi-widget-rag-sidebar
2
3The **reusable chrome** of a dockable sidebar (the "rag sidebar"): the bar with a
4**hierarchical search box** + a **mutable control**, the uniform panel
5**header**, and the layout **multiswitch popover**.
6
7Render-only and `Msg`-agnostic. The widget does NOT know the domain: the host
8(pata, wawa-panel, any app) supplies
9
10- the rail's **teeth** (through `llimphi_widget_dock_rail`, separately),
11- the **body** of the open panel (a `View<Msg>` already painted by the host),
12- the multiswitch **groups** (each a `segmented` with its callback),
13
14and the widget paints the uniform chrome around them. That way **one single
15owner** paints the header/search/control across every app, instead of each one
16re-deriving it.
17
18(Not to be confused with `pata-llimphi/src/rag.rs`, which is a concrete *tooth* —
19asking your mail through RAG. Here "rag" is the sidebar's name.)
20
21```ignore
22let body = my_panel(...);                 // the host paints the body
23let spec = RagSidebarSpec {
24    title: "Files".into(), no_header: false, accessory: Some(toggle), body,
25    search: nav.search.clone(), search_focused: nav.focused, search_hits: hits,
26    on_search_focus: Arc::new(|f| Msg::SearchFocus(f)),
27    control_open: nav.control_open, t, on_control_toggle: Msg::ControlToggle,
28    groups: vec![RagSwitchGroup::new("Rail", &["Inside","Outside"], outside as usize,
29                   move |i| Msg::SetOutside(i==1))],
30};
31rag_drawer_view(spec, w, h, &RagSidebarPalette::from_theme(&theme))
32```
33
34---
35
36Part of **llimphi** — see [llimphi](../../README.md).

README.md

llimphi-widget-rag-sidebar

The reusable chrome of a dockable sidebar (the "rag sidebar"): the bar with a hierarchical search box + a mutable control, the uniform panel header, and the layout multiswitch popover.

Render-only and Msg-agnostic. The widget does NOT know the domain: the host (pata, wawa-panel, any app) supplies

and the widget paints the uniform chrome around them. That way one single owner paints the header/search/control across every app, instead of each one re-deriving it.

(Not to be confused with pata-llimphi/src/rag.rs, which is a concrete tooth — asking your mail through RAG. Here "rag" is the sidebar's name.)

let body = my_panel(...);                 // the host paints the body
let spec = RagSidebarSpec {
    title: "Files".into(), no_header: false, accessory: Some(toggle), body,
    search: nav.search.clone(), search_focused: nav.focused, search_hits: hits,
    on_search_focus: Arc::new(|f| Msg::SearchFocus(f)),
    control_open: nav.control_open, t, on_control_toggle: Msg::ControlToggle,
    groups: vec![RagSwitchGroup::new("Rail", &["Inside","Outside"], outside as usize,
                   move |i| Msg::SetOutside(i==1))],
};
rag_drawer_view(spec, w, h, &RagSidebarPalette::from_theme(&theme))

Part of llimphi — see llimphi.