✨ Add literal values support in search#454
Conversation
MFA-X-AI
left a comment
There was a problem hiding this comment.
Thanks for the PR!
This does seem to work. I've added one quick thing I'd like you to fix, but more importantly I'd like you to consider if say said Literal is an attached literal node. Currently it highlights the empty space where the node was before being attached.
The solution should be to simply highlight the port where it is attached.
To see if a node is attached, you can refer to their
extras.attached bool status.
|
Done — I’ve updated the logic to use "Literal " (with a space) exactly as you suggested, so we reliably detect only actual literal nodes. Additionally, I modified the search behavior so that when a Literal node is attached, the search now highlights the target port it’s connected to instead of the empty space where the node used to be. |
MFA-X-AI
left a comment
There was a problem hiding this comment.
Great work, works as expected!
Merging
Description
This PR enhances the search functionality in Xircuits by including literal values stored in port labels, in addition to node names.
This makes it easier for users to quickly locate nodes by their literal string contents, not just by node names.
Key Changes
collectLiteralValueshelper to gatherport.labelvalues.searchModelto match against:options.name)port.label)Pull Request Type
Type of Change
Tests
Print,BranchComponent) → nodes correctly matched.True,Xircuits,Hello) → literal nodes correctly matched.BranchComponent) were not included in search results.Tested on? Specify Version.