Skip to content

Phase 3.2 (task 2): refactor(DependencyGraph): convert class component to functional#3591

Merged
yurishkuro merged 3 commits intojaegertracing:mainfrom
Parship12:DependencyGraph-functional
Mar 13, 2026
Merged

Phase 3.2 (task 2): refactor(DependencyGraph): convert class component to functional#3591
yurishkuro merged 3 commits intojaegertracing:mainfrom
Parship12:DependencyGraph-functional

Conversation

@Parship12
Copy link
Copy Markdown
Member

@Parship12 Parship12 commented Mar 11, 2026

Which problem is this PR solving?

Description of the changes

  • Convert DependencyGraph/index.tsx from class component to a functional component.
  • withRouteProps is never used in this component, so it's safely removed.

How was this change tested?

  • Unit tests
  • Verified that the component works properly in the ui

Checklist

AI Usage in this PR (choose one)

See AI Usage Policy.

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts - helped rewriting the unit tests
  • Heavy: AI generated most or all of the code changes

Signed-off-by: Parship Chowdhury <parshipchowdhury@gmail.com>
Copilot AI review requested due to automatic review settings March 11, 2026 16:59
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.15%. Comparing base (0809a3b) to head (2ec71c9).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3591      +/-   ##
==========================================
+ Coverage   89.13%   89.15%   +0.01%     
==========================================
  Files         304      304              
  Lines        9712     9727      +15     
  Branches     2563     2506      -57     
==========================================
+ Hits         8657     8672      +15     
  Misses       1051     1051              
  Partials        4        4              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
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

Refactors the Jaeger UI DependencyGraph page from a React class component to a hook-based functional component, updating associated unit tests to align with functional-component patterns.

Changes:

  • Converted DependencyGraphPageImpl from a class component to a functional component using useState, useEffect, and useRef.
  • Removed withRouteProps wrapping from the default export and kept the Redux connect(...) wrapper.
  • Refactored DependencyGraph unit tests to stop relying on component instances/state and instead assert behavior via mocked child props.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
packages/jaeger-ui/src/components/DependencyGraph/index.tsx Migrates component logic to hooks, adjusts lifecycle behavior, and simplifies export to connect(...).
packages/jaeger-ui/src/components/DependencyGraph/index.test.js Updates tests for functional component patterns by asserting through mocked DAG / DAGOptions props.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…m class conversion

Signed-off-by: Parship Chowdhury <parshipchowdhury@gmail.com>
@Parship12 Parship12 requested a review from a team as a code owner March 11, 2026 17:56
@yurishkuro yurishkuro added the changelog:refactoring Internal, non-functional code improvements label Mar 11, 2026
@yurishkuro yurishkuro requested a review from Copilot March 11, 2026 20:17
Copy link
Copy Markdown
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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Signed-off-by: Parship Chowdhury <parshipchowdhury@gmail.com>
@Parship12
Copy link
Copy Markdown
Member Author

@yurishkuro ptal

@yurishkuro yurishkuro merged commit dc6be4d into jaegertracing:main Mar 13, 2026
15 checks passed
@Parship12 Parship12 deleted the DependencyGraph-functional branch March 13, 2026 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:refactoring Internal, non-functional code improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[UI Refactor] Migrate DependencyGraph to Functional Component

3 participants