Conversation
Co-authored-by: MarcSkovMadsen <42288570+MarcSkovMadsen@users.noreply.github.com>
Co-authored-by: MarcSkovMadsen <42288570+MarcSkovMadsen@users.noreply.github.com>
MarcSkovMadsen
left a comment
There was a problem hiding this comment.
Please merge with updated main and fix any issues. Including docstring issues as docstrings have been significantly improved.
Done! Successfully rebased on updated main (commit aed7160) and updated all docstrings. Changes:
Implementation:
All tests passing locally (commit 953f15b). Note: The rebase created new commits, so this will need a force push to update the PR. |
…-to-nodespec Copilot/add view parameter to nodespec
Co-authored-by: MarcSkovMadsen <42288570+MarcSkovMadsen@users.noreply.github.com>
…-to-nodespec review feedback
|
@copilot. Please update the summary in the first post in this PR with the changes I merged into this branch. |
Updated the PR description to reflect the simplified implementation after review feedback (commit 752978d). Key changes in the final implementation:
|
Summary
Adds a
viewparameter to theNodeSpecdataclass, eliminating the need for the workaround of serializing to dict and merging to add views to nodes.Changes
Core Feature
view: Any | None = Nonefield to the dataclassviewin the output when not NoneMerged with main
Implementation Simplification (Review Feedback)
After initial implementation, the approach was simplified based on review feedback (commit 752978d):
add_node()viewparameter fromadd_node()methodUsage
Before:
After:
Testing
✅ All validation tests pass:
Files Changed
src/panel_reactflow/base.py: Added view parameter to NodeSpec with improved docstringstests/test_api.py: Tests for NodeSpec view parameterdocs/how-to/embed-views-in-nodes.md: Updated examples to show simplified approachOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.