Skip to content

Hide minimap when timeline is hidden#3764

Open
okxint wants to merge 4 commits intojaegertracing:mainfrom
okxint:fix/hide-minimap-with-timeline
Open

Hide minimap when timeline is hidden#3764
okxint wants to merge 4 commits intojaegertracing:mainfrom
okxint:fix/hide-minimap-with-timeline

Conversation

@okxint
Copy link
Copy Markdown

@okxint okxint commented Apr 20, 2026

Which problem is this PR solving?

Closes #3762

When the trace timeline is hidden via Settings, the minimap (which is just another representation of the timeline) remains visible. It should be hidden too.

Description of the changes

Added !timelineBarsVisible to the hideMap condition in TracePage, so the minimap is hidden whenever the timeline bars are not visible.

How was this change tested?

Added a unit test that verifies the minimap is hidden when timelineBarsVisible is false.

When the trace timeline is hidden via Settings, the minimap (which is
another representation of the timeline) should also be hidden. This adds
timelineBarsVisible to the hideMap condition so the minimap is hidden
whenever the timeline bars are not visible.

Closes jaegertracing#3762

Signed-off-by: okxint <cashmein.eth@gmail.com>
Copilot AI review requested due to automatic review settings April 20, 2026 05:32
@okxint okxint requested a review from a team as a code owner April 20, 2026 05:32
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

This PR aligns the TracePage minimap visibility with the timeline visibility setting, ensuring the minimap is hidden when timeline bars are turned off (closing #3762).

Changes:

  • Update TracePage’s hideMap condition to also hide the minimap when timelineBarsVisible is false.
  • Add a unit test to verify the minimap is not rendered when timeline bars are hidden.

Reviewed changes

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

File Description
packages/jaeger-ui/src/components/TracePage/index.tsx Extends hideMap logic to include !timelineBarsVisible, hiding the minimap when the timeline is hidden.
packages/jaeger-ui/src/components/TracePage/index.test.jsx Adds a regression test ensuring the minimap is not rendered when timeline bars are disabled.

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

Comment thread packages/jaeger-ui/src/components/TracePage/index.test.jsx Outdated
Copy link
Copy Markdown
Member

@Parship12 Parship12 left a comment

Choose a reason for hiding this comment

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

add screenshots or a short recording to show the before/after ui behavior for this change?

@Parship12
Copy link
Copy Markdown
Member

Before:
Screenshot 2026-04-21 124625

After:
Screenshot 2026-04-21 124708

Copy link
Copy Markdown
Member

@Parship12 Parship12 left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@okxint Thanks for your contribution! Please take a look at the copilot comment and resolve it.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.29%. Comparing base (9a23402) to head (1d222b7).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3764   +/-   ##
=======================================
  Coverage   90.29%   90.29%           
=======================================
  Files         329      329           
  Lines       10090    10092    +2     
  Branches     2623     2623           
=======================================
+ Hits         9111     9113    +2     
  Misses        853      853           
  Partials      126      126           

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

@yurishkuro yurishkuro added the changelog:bugfix-or-minor-feature 🐞 Bug fixes, Minor Improvements label Apr 21, 2026
…tion

Signed-off-by: okxint <cashmein.eth@gmail.com>
@okxint
Copy link
Copy Markdown
Author

okxint commented Apr 22, 2026

Addressed the review feedback - moved the timelineBarsVisible reset into an afterEach block for proper test isolation. Thanks @Parship12 for the approval!

Signed-off-by: Yuri Shkuro <github@ysh.us>
Copilot AI review requested due to automatic review settings April 23, 2026 03:58
@yurishkuro yurishkuro enabled auto-merge April 23, 2026 03:59
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 1 comment.


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

Comment on lines +617 to +620
it('is true when timeline bars are hidden', () => {
mockLayoutPrefsStore.timelineBarsVisible = false;
renderWithRouter(<TracePage {...defaultProps} />);

Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

Test name is ambiguous: within calculates hideMap correctly, the new it('is true when timeline bars are hidden'...) doesn’t mention hideMap/minimap, and it only asserts on DOM presence. Consider renaming to explicitly reference hideMap/minimap and (optionally) asserting capturedHeaderProps.hideMap === true to make the intent clearer and less coupled to the mock header markup.

Suggested change
it('is true when timeline bars are hidden', () => {
mockLayoutPrefsStore.timelineBarsVisible = false;
renderWithRouter(<TracePage {...defaultProps} />);
it('sets hideMap to true and hides the minimap when timeline bars are hidden', () => {
mockLayoutPrefsStore.timelineBarsVisible = false;
renderWithRouter(<TracePage {...defaultProps} />);
expect(capturedHeaderProps.hideMap).toBe(true);

Copilot uses AI. Check for mistakes.
@okxint
Copy link
Copy Markdown
Author

okxint commented Apr 27, 2026

This has approvals from @Parship12 and @yurishkuro, and the review feedback has been addressed. Ready to merge whenever convenient. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:bugfix-or-minor-feature 🐞 Bug fixes, Minor Improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: When timeline is hidden minimap should be hidden too

4 participants