Skip to content

Support the panel tree widget (RustGIS #1080) in build.py, the SDK and the docs #32

Closed

Description

@jgregoriorincon

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.values is the chosen node's id, or null.

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.py has PANEL_KINDS = {"text", "checkbox", "slider", "button"}, so a manifest with a tree is refused ("unknown kind 'tree'"), although RustGIS accepts it.
  • The SDK's Panel can set values, texts, labels, enabled and visible, but not a tree's nodes. Request reads 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

  1. scripts/build.py: accept tree, mirroring PanelDecl::validate in RustGIS (crates/plugins/src/panel.rs):
    • search only on a tree ("search is for trees");
    • a tree has no default ("only checkboxes and sliders have a default");
    • no min, max, steps or text on a tree, as for the other non-slider kinds.
  2. SDK:
    • a Node type (id, label, count, children) with a small builder;
    • Panel::nodes(id, nodes), which answers items.<id>.nodes;
    • Request::panel_str(id) for a tree's chosen node (None when nothing is chosen);
    • unit tests for both.
  3. 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 minRustgisVersion should 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

  1. giswqs commented on Oct 29, 2026

    @giswqs
    Member

    @jgregoriorincon The proposal sounds good to me. Please free to submit PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions