-
Notifications
You must be signed in to change notification settings - Fork 4k
Implement visitTransientNode on most visitors #12823
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement visitTransientNode on most visitors #12823
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
✅ PR preview is ready!
|
📈 Frontend coverage change detectedThe frontend unit test (vitest) coverage has increased by 0.0300%
✅ Coverage change is within normal range. |
d2b101d to
8cafff6
Compare
dd57800 to
15ec0e9
Compare
8cafff6 to
ec390ec
Compare
258038e to
d33a158
Compare
ec390ec to
9f51720
Compare
📉 Python coverage change detectedThe Python unit test coverage has decreased by 0.0049%
✅ Coverage change is within normal range. Coverage by files
|
d33a158 to
f04f690
Compare
9f51720 to
24a81bd
Compare
frontend/lib/src/render-tree/visitors/GetNodeByDeltaPathVisitor.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements visitor methods for TransientNode across multiple visitor classes, replacing placeholder "Method not implemented" errors with functional implementations. The changes enable proper traversal and manipulation of transient nodes in the render tree.
Key changes:
- Added
updateTransientNodeshelper method toTransientNodefor filtering/mapping operations - Implemented
visitTransientNodein 5 visitor classes with appropriate logic for each visitor's purpose - Added comprehensive test coverage for all new implementations
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
TransientNode.ts |
Added updateTransientNodes helper method for filtering/mapping transient node arrays |
TransientNode.test.ts |
Added tests for the new updateTransientNodes method |
GetNodeByDeltaPathVisitor.ts |
Implemented path-based node retrieval for transient nodes |
GetNodeByDeltaPathVisitor.test.ts |
Added tests covering empty paths, valid/invalid indices, and deeper path recursion |
FilterMainScriptElementsVisitor.ts |
Implemented filtering logic for transient nodes based on script hash |
FilterMainScriptElementsVisitor.test.ts |
Added tests for various filtering scenarios |
ElementsSetVisitor.ts |
Implemented element collection from transient nodes and anchors |
ElementsSetVisitor.test.ts |
Added tests for element collection including edge cases |
ClearStaleNodeVisitor.ts |
Implemented stale node clearing logic with fragment run handling |
ClearStaleNodeVisitor.test.ts |
Added tests for fragment runs and stale node scenarios |
frontend/lib/src/render-tree/visitors/FilterMainScriptElementsVisitor.ts
Outdated
Show resolved
Hide resolved
frontend/lib/src/render-tree/visitors/GetNodeByDeltaPathVisitor.ts
Outdated
Show resolved
Hide resolved
e2edc05 to
c696dd0
Compare
8056447 to
89832ac
Compare
c696dd0 to
7cc56f3
Compare
cf891c6 to
b440ae2
Compare
89832ac to
7b3b980
Compare
b440ae2 to
98580f3
Compare
7b3b980 to
3aeebea
Compare
98580f3 to
a508d7a
Compare
ba77f88 to
50071ab
Compare
ca0d171 to
8a8cd4b
Compare
50071ab to
990657a
Compare
990657a to
e49ccdb
Compare
8a8cd4b to
8c4e150
Compare
📈 Significant wheel size change detectedThe wheel file size has increased by 11.37% (threshold: 0.25%)
Please verify this change is expected. |
lukasmasuch
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
8c4e150 to
5c50853
Compare

Describe your changes
We can implement some of the details for Transient Nodes in the visitors. We ignore two places:
Testing Plan
Contribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.