Skip to content

Part of Phase 3.2 (task 1): factor out keyboard shortcut setup into a separate function in the TracePage#3609

Merged
yurishkuro merged 1 commit intojaegertracing:mainfrom
Parship12:keyboard-shortcut-setup
Mar 14, 2026
Merged

Part of Phase 3.2 (task 1): factor out keyboard shortcut setup into a separate function in the TracePage#3609
yurishkuro merged 1 commit intojaegertracing:mainfrom
Parship12:keyboard-shortcut-setup

Conversation

@Parship12
Copy link
Copy Markdown
Member

Which problem is this PR solving?

Description of the changes

  • Factor out keyboard shortcut setup from componentDidMount into _setupKeyboardShortcuts.
  • This is a readability refactor, no logic was changed, just reorganized.

How was this change tested?

  • Unit tests
  • keyboard shortcuts working correctly

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

…rate function

Signed-off-by: Parship Chowdhury <parshipchowdhury@gmail.com>
@Parship12 Parship12 requested a review from a team as a code owner March 14, 2026 06:23
Copilot AI review requested due to automatic review settings March 14, 2026 06:23
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 TracePageImpl keyboard shortcut initialization by extracting the setup logic out of componentDidMount() into a dedicated helper method, improving readability while keeping behavior the same.

Changes:

  • Moved keyboard shortcut wiring from componentDidMount() into _setupKeyboardShortcuts().
  • Updated the existing unit test to hook into _setupKeyboardShortcuts() rather than componentDidMount().

Reviewed changes

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

File Description
packages/jaeger-ui/src/components/TracePage/index.tsx Extracts keyboard shortcut setup into _setupKeyboardShortcuts() and calls it from componentDidMount().
packages/jaeger-ui/src/components/TracePage/index.test.js Adjusts the keyboard-shortcut setup test to patch _setupKeyboardShortcuts() for verifying adjViewRange wiring.

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

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.15%. Comparing base (9edb560) to head (219efd9).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3609   +/-   ##
=======================================
  Coverage   89.15%   89.15%           
=======================================
  Files         304      304           
  Lines        9725     9727    +2     
  Branches     2505     2593   +88     
=======================================
+ Hits         8670     8672    +2     
- Misses       1051     1052    +1     
+ Partials        4        3    -1     

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

@Parship12 Parship12 changed the title Part of Phase 3.2 (task 2): factor out keyboard shortcut setup into a separate function in the TracePage Part of Phase 3.2 (task 1): factor out keyboard shortcut setup into a separate function in the TracePage Mar 14, 2026
@yurishkuro yurishkuro added the changelog:refactoring Internal, non-functional code improvements label Mar 14, 2026
@yurishkuro yurishkuro merged commit 9fbfe3a into jaegertracing:main Mar 14, 2026
17 of 19 checks passed
@Parship12 Parship12 deleted the keyboard-shortcut-setup branch March 15, 2026 09:44
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.

3 participants