Skip to content

refactor(plexus): migrate Node to functional component (#3392)#3531

Merged
jkowall merged 1 commit intojaegertracing:mainfrom
hharshhsaini:refactor/node-functional-component-3392
Mar 11, 2026
Merged

refactor(plexus): migrate Node to functional component (#3392)#3531
jkowall merged 1 commit intojaegertracing:mainfrom
hharshhsaini:refactor/node-functional-component-3392

Conversation

@hharshhsaini
Copy link
Copy Markdown
Contributor

@hharshhsaini hharshhsaini commented Feb 9, 2026

Which problem is this PR solving?

Description of the changes

  • Migrated the Node component from a class-based component to a functional component with React.memo()
  • Converted Node class component extending React.PureComponent to a functional component
  • Wrapped the component with React.memo() to preserve the shallow prop comparison behavior of PureComponent
  • Destructured props directly in the function signature
  • Removed the render() method and converted to direct return statement
  • Maintained generic type support using double type assertion pattern: as unknown as <T = {}>(props: TProps<T>) => React.ReactElement | null
  • Preserved all existing functionality including conditional rendering logic
  • No changes to component logic or behavior, only structural refactoring

How was this change tested?

  • All existing plexus tests pass (18 tests)
  • TypeScript compilation successful
  • Prettier formatting verified
  • Build successful for plexus package
  • Minimal diff: 18 insertions, 18 deletions

Proof -

3392 proof

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
  • Heavy: AI generated most or all of the code changes

@hharshhsaini hharshhsaini requested a review from a team as a code owner February 9, 2026 11:28
@github-actions github-actions bot added the pr-quota-reached PR is on hold due to quota limits for new contributors label Feb 9, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 9, 2026

Hi @hharshhsaini, thanks for your contribution! To ensure quality reviews, we limit how many concurrent open PRs new contributors can open.

This PR is currently on hold (Status: 9/1 open). We will automatically move this into the review queue once your existing PRs are merged or closed.

Please see our Contributing Guidelines for details on our tiered quota policy.

@greedy-wudpeckr
Copy link
Copy Markdown
Contributor

@hharshhsaini , i think for the issues whom you are creating PR's , someone has already created PR's for them , kindly look that first.

@yurishkuro PTAL .

@hharshhsaini
Copy link
Copy Markdown
Contributor Author

@hharshhsaini , i think for the issues whom you are creating PR's , someone has already created PR's for them , kindly look that first.

@yurishkuro PTAL .

@greedy-wudpeckr
@yurishkuro I did notice the existing PRs, but since they haven’t been merged yet and seem to be on hold, I submitted this PR as an alternative implementation. Please let me know if you’d prefer I close this in favor of another PR.

@jkowall jkowall added the changelog:refactoring Internal, non-functional code improvements label Mar 5, 2026
@jkowall jkowall requested a review from Copilot March 5, 2026 19:18
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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 1 out of 1 changed files in this pull request and generated 1 comment.


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

@jkowall
Copy link
Copy Markdown
Contributor

jkowall commented Mar 6, 2026

@hharshhsaini please address copilot comments.

@github-actions github-actions bot added waiting-for-author PR is waiting for author to respond to maintainer's comments and removed pr-quota-reached PR is on hold due to quota limits for new contributors labels Mar 6, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 6, 2026

PR quota unlocked!

@hharshhsaini, this PR has been moved out of the waiting room and into the active review queue:

  • Open: 7
  • Limit: 3

Thank you for your patience.

…#3392)

Signed-off-by: hharshhsaini <sainiharsh3311@gmail.com>
@hharshhsaini hharshhsaini force-pushed the refactor/node-functional-component-3392 branch from 4123b35 to e4eb5ff Compare March 6, 2026 10:44
@github-actions github-actions bot removed the waiting-for-author PR is waiting for author to respond to maintainer's comments label Mar 6, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 0% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.68%. Comparing base (c043a42) to head (e4eb5ff).
⚠️ Report is 27 commits behind head on main.

Files with missing lines Patch % Lines
packages/plexus/src/Digraph/Node.tsx 0.00% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3531      +/-   ##
==========================================
+ Coverage   88.60%   88.68%   +0.08%     
==========================================
  Files         299      300       +1     
  Lines        9484     9560      +76     
  Branches     2500     2449      -51     
==========================================
+ Hits         8403     8478      +75     
- Misses       1078     1079       +1     
  Partials        3        3              

☔ 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.

@hharshhsaini
Copy link
Copy Markdown
Contributor Author

@hharshhsaini please address copilot comments.

@jkowall the export typing Copilot suggestion (as typeof Node) and rebased on jaegertracing:main. All tests and type checks are passing now .

Copy link
Copy Markdown
Contributor

@jkowall jkowall left a comment

Choose a reason for hiding this comment

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

Looks good, thanks @hharshhsaini

@jkowall jkowall added this pull request to the merge queue Mar 11, 2026
Merged via the queue into jaegertracing:main with commit 0809a3b Mar 11, 2026
15 checks passed
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] [plexus] Migrate Node to Functional Component

4 participants