-
Notifications
You must be signed in to change notification settings - Fork 4k
Implement visitTransientNode on RenderNodeVisitor #12825
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 RenderNodeVisitor #12825
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.0100%
✅ Coverage change is within normal range. |
f495729 to
df55dda
Compare
fd2949a to
a08f533
Compare
df55dda to
b29ab22
Compare
25fb3a2 to
ab774d5
Compare
b29ab22 to
2494645
Compare
📉 Python coverage change detectedThe Python unit test coverage has decreased by 0.0049%
✅ Coverage change is within normal range. Coverage by files
|
2494645 to
ddb5f47
Compare
ab774d5 to
ce454a9
Compare
4701026 to
311e7f7
Compare
a685eb1 to
21742c2
Compare
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 rendering support for TransientNode elements in the RenderNodeVisitor class. Previously, transient nodes were not rendered (the method returned null), but now they are properly rendered with their transient elements and anchor node.
Key changes:
- Updated
visitTransientNodeto render both transient child elements and the anchor element - Added support for an optional
elementKeyOverrideparameter to control React keys for transient elements - Changed return types from
OptionalReactElementtoOptionalReactElementsto support returning arrays of elements
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| RenderNodeVisitor.tsx | Implements transient node rendering logic, adds key override mechanism, and updates type signatures to support arrays |
| RenderNodeVisitor.test.tsx | Adds comprehensive test coverage for the new visitTransientNode functionality |
frontend/lib/src/components/core/Block/RenderNodeVisitor.test.tsx
Outdated
Show resolved
Hide resolved
frontend/lib/src/components/core/Block/RenderNodeVisitor.test.tsx
Outdated
Show resolved
Hide resolved
frontend/lib/src/components/core/Block/RenderNodeVisitor.test.tsx
Outdated
Show resolved
Hide resolved
frontend/lib/src/components/core/Block/RenderNodeVisitor.test.tsx
Outdated
Show resolved
Hide resolved
21742c2 to
d31f7d6
Compare
311e7f7 to
98489a8
Compare
d31f7d6 to
c243fdb
Compare
98489a8 to
9733c23
Compare
c243fdb to
ef039c6
Compare
901f681 to
a48d051
Compare
d576da1 to
5656d58
Compare
a48d051 to
652f605
Compare
5656d58 to
d739b88
Compare
652f605 to
79af71b
Compare
79af71b to
4230417
Compare
d739b88 to
1572978
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 👍
4230417 to
fc88b4d
Compare
1572978 to
4cf1b51
Compare
fc88b4d to
3ba5eb9
Compare
4cf1b51 to
c6876b6
Compare
3ba5eb9 to
c7891e9
Compare

Describe your changes
Added support for rendering
TransientNodeelements in theRenderNodeVisitorclass. This implementation:visitTransientNodemethod that properly renders both transient elements and their anchortransient-{n}formatUpdated the
OptionalReactElementtype toOptionalReactElementsto better handle arrays of elements that can be returned from visitor methods.Testing Plan
visitTransientNodemethodContribution License Agreement
By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.