Skip to content

[Feature]: Plugin tools: nested toolbox groups in the Tools pane (QGIS-style module structure) #3022

Done

Description

@Valery35

Before you start

What problem does this solve?

We port the Isoliner QGIS plugin (79 tools in 10 numbered sections, some with sub-sections) to RustGIS as a process plugin: https://github.com/Valery35/isoliner-rustgis (v0.1.12). We want the Tools pane to show the same tree as QGIS Processing:

    1. Grid and isolines
    • 1.01 2D Kriging
    • 1.05 Declustering (weights)
    • ...
    1. Topography
    • 2.01 DEM download
    • ...
    1. Topography: diagnostics and cleanup

Today plugin tools get only one flat level. In crates/ui-egui/src/panes.rs the plugin_tools branch groups tools by the exact toolbox string with boxes.dedup() and uses b.rsplit(" › ").next() only as the label. A toolbox "Isoliner › 1. Grid and isolines" is shown as one flat 1. Grid and isolines group; it is not nested. The GeoLibre branch right above splits on " › " (level(x, 1), level(x, 2)) and builds nested CollapsingHeaders.

The flat grouping also depends on tool order: boxes.dedup() removes only consecutive duplicates. If tools with the same toolbox are interleaved in plugin.json, the same group is drawn several times. We sort the tools by toolbox in our manifest to work around it, but the UI should not depend on the order.

A second, related blocker: plugin tools cannot take raster layers, so most Isoliner tools (topography, kriging, subsidence) stay as ribbon commands instead of Tools-pane tools. That is tracked separately in #1933.

Proposed solution

Use the same › splitting in the plugin tools branch as in the GeoLibre branch:

  1. Split toolbox on " › " and build nested headers by level, exactly as geolibre_section does with level(x, 1) and level(x, 2) (and deeper if needed).
  2. Keep the Plugins › prefix that crates/plugins/src/tools.rs adds, or strip it before splitting, so a manifest toolbox like "1. Grid and isolines › Variograms" becomes Plugins › 1. Grid and isolines › Variograms.
  3. Replace boxes.dedup() with a sort + dedup (or a BTreeMap/HashSet of paths), so interleaved tools cannot create duplicate groups.
  4. Keep the current behaviour when a toolbox has no ›: one flat group, as now.

Example manifest:

{
  "id": "isoliner",
  "tools": [
    {
      "id": "declustering",
      "name": "1.05 Declustering (weights)",
      "toolbox": "1. Grid and isolines › Variograms",
      "...": "..."
    },
    {
      "id": "examplewells",
      "name": "1.10 Example wells (demo)",
      "toolbox": "1. Grid and isolines › Examples",
      "...": "..."
    },
    {
      "id": "contoursplit",
      "name": "2.08 Split contours for validation",
      "toolbox": "2. Topography",
      "...": "..."
    }
  ]
}

Tools pane:

Plugins
  1. Grid and isolines
    Variograms
      1.05 Declustering (weights)
      1.06 Variogram (experimental)
    Examples
      1.10 Example wells (demo)
  2. Topography
    2.08 Split contours for validation

This mirrors QGIS Processing, where the provider (Isoliner) has numbered groups and sub-groups, and the same › convention is already used by GeoLibre.

Estimated scope

Small: crates/ui-egui/src/panes.rs (the plugin tools branch), maybe a helper shared with the GeoLibre branch. No engine or manifest change: the toolbox string already carries the path.

Alternatives considered

  • One flat level with numbered prefixes. Works today, but does not match QGIS and becomes unreadable with 79 tools.
  • A separate groups array in the manifest. More schema and validation; the › convention is already in use.
  • Rely on tool order and boxes.dedup(). Fragile: it breaks as soon as two tools of the same group are not adjacent.

Additional context

RustGIS 0.8.0. Plugin: https://github.com/Valery35/isoliner-rustgis (process plugin, plugin.json tools section). Raster inputs for plugin tools are tracked in #1933.

Activity

  1. choupeanut commented on Nov 28, 2026

    @choupeanut
    Contributor

    I'd like to take this one: plugin tools will reuse the Browser's nested toolbox levels in the Tools pane, with the groups sorted and deduplicated. I'll open a pull request shortly.

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