-
Notifications
You must be signed in to change notification settings - Fork 227
fix: Missing link between namespace and child resources in Remote-Cluster Treeview #2310
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
base: dev
Are you sure you want to change the base?
fix: Missing link between namespace and child resources in Remote-Cluster Treeview #2310
Conversation
…ree view - Removed conditional isExpanded check that prevented edge creation - Ensures all parent-child relationships render visual connections - Fixes inconsistent edge rendering in Remote-Cluster Treeview Fixes kubestellar#2301
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @ANAMASGARD. Thanks for your PR. I'm waiting for a kubestellar member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
👋 Hello! @ANAMASGARD Welcome to the Kubestellar. Thank you for submitting your first Pull Request to KubeStellar. We are delighted to have you in our Universe! |
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 fixes a visual bug in the Remote-Cluster Treeview where namespace nodes and their child resources appeared without connecting lines (edges). The fix removes an unnecessary conditional check that prevented edge creation during certain component lifecycle states.
Key Changes:
- Removed the
isExpandedcondition from the edge creation logic in thecreateNodefunction - Edges are now consistently created whenever a parent-child relationship exists, allowing ReactFlow to properly manage the visual hierarchy
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kunal-511
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.
@ANAMASGARD What is this screenshot trying to convey ?
|
/ok-to-test |
|
@ANAMASGARD do u search is there existing issue is open for that ? |
|
@ANAMASGARD can u please add the correct Screen shot of the missing link between the nodes ? (ns and its child nodes) |
|
/ok-to-test |
Description
This PR fixes the missing visual connections (edges) between namespace nodes and their child resource nodes in the Remote-Cluster Treeview. The issue caused a broken visual hierarchy where resources appeared under namespaces but without connecting lines, making the parent-child relationships unclear.
Fixes #2301
Screenshot
Before (Bug):
Root Cause
The edge creation logic in WecsTopology.tsx included a conditional check that prevented edges from being created in certain states:
// BEFORE (Line 834 - Buggy)
if (parent && stateRef.current.isExpanded) {
// edges only created when isExpanded === true
}
Solution
Removed the isExpanded conditional check from edge creation logic. Edges are now always created when a parent-child relationship exists, allowing ReactFlow to properly manage their visibility:
// AFTER (Line 834 - Fixed)
if (parent) {
// edges always created when parent exists
}