Skip to content

Conversation

@btwshivam
Copy link
Contributor

Reverts #1994

Copilot AI review requested due to automatic review settings October 10, 2025 07:14
@kubestellar-prow kubestellar-prow bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 10, 2025
@github-actions github-actions bot added frontend and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 10, 2025
Copy link
Contributor

Copilot AI left a 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 reverts a previous fix (#1994) that addressed node overlapping issues at 50% zoom level in the FlowCanvas component.

  • Removes complex zoom-responsive node positioning and edge spacing logic
  • Eliminates dynamic node scaling and anti-overlap algorithms
  • Simplifies edge processing by removing multi-edge grouping and zoom-based styling

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +18 to +20
* Renders a beautiful flow diagram canvas with custom nodes and edges in a ReactFlow container.
* Features stunning gradients, patterns, and animations for an adorable user experience.
* Provides smooth zooming, panning, and auto-centering functionality for the Kubernetes resource visualization.
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment uses subjective language like 'beautiful', 'stunning', and 'adorable' which is unprofessional for technical documentation. Consider using more objective language that describes the component's functionality.

Suggested change
* Renders a beautiful flow diagram canvas with custom nodes and edges in a ReactFlow container.
* Features stunning gradients, patterns, and animations for an adorable user experience.
* Provides smooth zooming, panning, and auto-centering functionality for the Kubernetes resource visualization.
* Renders a flow diagram canvas with custom nodes and edges in a ReactFlow container.
* Includes gradients, patterns, and animations to enhance visualization.
* Provides smooth zooming, panning, and auto-centering functionality for Kubernetes resource visualization.

Copilot uses AI. Check for mistakes.
const { setViewport, getViewport } = useReactFlow();
const highlightedLabels = useLabelHighlightStore(state => state.highlightedLabels);
const { currentZoom, getScaledNodeStyle, setZoom } = useZoomStore();
const { currentZoom } = useZoomStore();
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The destructured object only extracts currentZoom but the original code also used getScaledNodeStyle and setZoom methods. This incomplete revert may cause runtime errors if these methods are used elsewhere in the component.

Suggested change
const { currentZoom } = useZoomStore();
const { currentZoom, setZoom, getScaledNodeStyle } = useZoomStore();

Copilot uses AI. Check for mistakes.
const { edgeType } = useEdgeTypeStore();

// Get edge gradients
// Get enhanced edge gradients
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment describes 'enhanced edge gradients' but the enhancement logic was removed in this revert. The comment should be updated to reflect the current functionality.

Suggested change
// Get enhanced edge gradients
// Get edge gradients

Copilot uses AI. Check for mistakes.
useEffect(() => {}, [highlightedLabels]);

// Set background styles based on theme
// Beautiful background styles based on theme
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using 'Beautiful' in technical comments is subjective and unprofessional. Consider using 'Theme-based background styles' instead.

Suggested change
// Beautiful background styles based on theme
// Theme-based background styles

Copilot uses AI. Check for mistakes.
@btwshivam
Copy link
Contributor Author

/ok-to-test
/approve

@kubestellar-prow kubestellar-prow bot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Oct 10, 2025
@kubestellar-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: btwshivam

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 10, 2025
@btwshivam btwshivam added the lgtm Indicates that a PR is ready to be merged. label Oct 10, 2025
@kubestellar-prow kubestellar-prow bot merged commit 5f71ea9 into dev Oct 10, 2025
17 checks passed
@kubestellar-prow kubestellar-prow bot deleted the revert-1994-feture branch October 10, 2025 07:22
@github-project-automation github-project-automation bot moved this from In Progress to Done in KubeStellar UI Project Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. frontend lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants