Repository navigation
fix(wunderbaum): node classes as a Set and no_events for set_active_node - #62
Merged
Merged
Conversation
- updateNode converts classes to a Set; a string was added one character at a time and a space threw InvalidCharacterError
- an empty classes value now clears a node's custom classes
- setActiveNode forwards noEvents so mirrored trees stop calling back
- set_active_node takes no_events, default False, so callers are unchanged
- getSerializableSource emits classes as a string; a Set encoded to {}
- 9 Playwright tests over two trees that mirror each other's activation - covers both write paths into node.classes: updateNode and the loader - 8 of the 9 fail against the pre-fix bundle
Release previewMerging this PR would release 1.0.1 (current: Changelog preview (truncated)## v1.0.1 (2026-09-18)
### Bug Fixes
- **wunderbaum**: Correct node classes and add no_events to activation
([`d02ec44`](https://github.com/opensemanticworld/panelini/commit/d02ec44975fc83bb51b55e0f1b0e78a694e8becb))
### Documentation
- **wunderbaum**: Document no_events on set_active_node
([`9fc5794`](https://github.com/opensemanticworld/panelini/commit/9fc5794664f3dc750c4280c245fc921c69cbb9dc))
### Testing
- **wunderbaum**: Cover node classes and no_events activation
([`c6165aa`](https://github.com/opensemanticworld/panelini/commit/c6165aa7023ac8eb668384441a81274270a30f42))
- **wunderbaum**: State what the loop bound does and does not prove
([`d78eadb`](https://github.com/opensemanticworld/panelini/commit/d78eadb48f5fdc2fc1fd91ab757f3f03a79b4006))
Preview via python-semantic-release and conventional commits. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Changes
wunderbaum.vueupdateNode: convertclassesto aSetthrough a newtoClassSet()helper. An empty string orNoneclears the classes.wunderbaum.vuesetActiveNodeand thesetActiveNodeaction dispatch: forwardnoEventstonode.setActive().wunderbaum.pyset_active_node: newno_events: bool = Falseparameter.wunderbaum.vuegetSerializableSource: emitclassesas a space-separated string.vue/dist/wunderbaum_vue.mjs: rebuilt bundle.tests/panels/wunderbaum/test_wunderbaum_node_classes.pywith 9 Playwright tests.docs/panels/wunderbaum.md: one sentence onno_events.Rationale
node.classesasSet<string> | nulland renders it withclassList.add(...node.classes).updateNodeassigned the raw string, so"highlighted"became 11 one-letter classes and"highlighted urgent"threwInvalidCharacterError.set_active_nodealways firedactivate. Two trees whoseactivatehandlers mirror the active node into each other called each other without end.getSerializableSourceput theSetinto the payload.JSON.stringifyencodes aSetas{}, so classes loaded from the source were lost on every sync back to Python.Compatibility
no_eventsdefaults toFalse, so existing callers keep the old behaviour. The only caller in the repository, examples/usecases/wunderbaum_visnetwork.py#L419, is unchanged.addNodeand the source loader were not affected: the library's node constructor already convertsclassesthroughsetClass().Testing
pytest tests/panels/wunderbaum/test_wunderbaum_node_classes.py: 9 passedpytest tests/panels/wunderbaum/: 84 passed, 1 xfailedpre-commit runon the changed files: passedNot in this PR
updateNodeSilent, used bybatch_updateandexecute_step, ignoresclasses. This gap existed before this change.docs/apidocs/panelini/panelini.panels.wunderbaum.wunderbaum.mdstill shows the oldset_active_nodesignature until the next autodoc2 docs build.