Repository navigation
Description
Context
opengeos/RustGIS#1080 (for opengeos/RustGIS#1050) added a fifth panel widget, tree: nodes the plugin gives (themes and their datasets, say), with an optional search box (search: true). RustGIS documents it in docs/plugins.md › A panel:
- declared as
{"kind": "tree", "id": "catalogue", "label": "Catalogue", "command": "show", "search": true}; - filled by any answer with
panel.items.<id>.nodes = [{"id", "label", "count", "children"}](at most 5,000 nodes, 8 levels deep, ids of up to 200 characters, unique in the tree); - its value in
panel.valuesis the chosen node's id, ornull.
It isn't in a RustGIS release yet (it landed after 0.4.0).
Problem
This repository doesn't know the tree yet:
scripts/build.pyhasPANEL_KINDS = {"text", "checkbox", "slider", "button"}, so a manifest with a tree is refused ("unknown kind 'tree'"), although RustGIS accepts it.- The SDK's
Panelcan set values, texts, labels,enabledandvisible, but not a tree'snodes.Requestreads a checkbox (panel_bool) and a slider (panel_i64), but not a tree's chosen id. docs/develop.md› A panel lists four widgets.
Proposal
scripts/build.py: accepttree, mirroringPanelDecl::validatein RustGIS (crates/plugins/src/panel.rs):searchonly on a tree ("search is for trees");- a tree has no
default("only checkboxes and sliders have a default"); - no
min,max,stepsortexton a tree, as for the other non-slider kinds.
- SDK:
- a
Nodetype (id,label,count,children) with a small builder; Panel::nodes(id, nodes), which answersitems.<id>.nodes;Request::panel_str(id)for a tree's chosen node (Nonewhen nothing is chosen);- unit tests for both.
- a
docs/develop.md:- the tree in the widget list, with its limits;
- a short example that gives a tree and reads the chosen node;
- the RustGIS version it needs: older versions refuse a manifest with a tree, so
minRustgisVersionshould be set to the first release with feat(plugins): a tree widget for plugin panels RustGIS#1080.
Open question: should build.py also refuse a tree when minRustgisVersion is older than that release? It would stop a plugin that won't load from reaching the registry, but the version isn't known until the release.
Motivation
IDE Bogotá (a catalogue browser for IDECA's 549 services, outside this repository) walks the catalogue with three sliders: category, subcategory and service. A searchable tree replaces them. The same applies to the IDE Barranquilla and IGAC plugins that come next.
I'd like to take this one.
Activity
giswqs commentedon Oct 29, 2026
@jgregoriorincon The proposal sounds good to me. Please free to submit PR.
Panel trees: build.py accepts them, the SDK gives their nodes and rea…