Repository navigation
Panel trees: build.py accepts them, the SDK gives their nodes and reads the chosen one - #33
Merged
Merged
Conversation
…ds the chosen one (opengeos#32)
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Code reviewBugs
Security
Performance
Quality
CLAUDE.md
Scope
Checked: the full diff, Change sizeThe whole PR against main (merge base 61bd755 to PR head 396c5bc).
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #32.
opengeos/RustGIS#1080 added the
treepanel widget. This repository refused it:build.pydidn't know the kind, and the SDK couldn't give a tree its nodes or read the chosen one.Changes
scripts/build.py:treeis a panel kind. AsPanelDecl::validatein RustGIS,searchmust be true or false and is for trees only; a tree has nodefault,min,max,stepsortext(the rules the other non-slider kinds already had).Nodetype (id,label,count,children, withnew,count,childandchildren);Panel::nodes(id, nodes);Request::panel_str(id)for the chosen node's id.Panel::valuedocuments choosing a node by id, or none withValue::Null.docs/develop.md› A panel: the tree among the widgets, its limits, that its search box is RustGIS's own (the plugin only hears of the chosen node), an example withNode, and the version it needs.Verification
cargo test -p rustgis-plugin(a new test,panel_trees_take_nodes_and_give_the_chosen_one), clippy for wasm32 with-D warnings,cargo fmt --check,python scripts/build.py --check(the 9 registry plugins still pass).check_panelagainst 11 manifests (a tree with and without search,searchon other kinds or not a boolean, a tree withdefault,min,steps,text, an unknown command, no id): it accepts and refuses what RustGIS'sPanelDecl::validatedoes.rustgis-pluginscrate fedPanel::nodesandvaluetoPanelState::apply. Nodes, counts, children, the chosen node in the same answer, choosing none and an empty tree were all taken.minRustgisVersionnote.Not in this PR
rustgis-python-plugin-template,plugin/rustgis_plugin.py) has its ownPanel, which can't give nodes either (and typesvalueasbool | int). That is a change in that repository.build.pywhenminRustgisVersionis older than the first release with trees (the open question in Support the panel tree widget (RustGIS #1080) in build.py, the SDK and the docs #32): left until that version is known.