Skip to content

Conversation

@Maosaic
Copy link
Collaborator

@Maosaic Maosaic commented Nov 12, 2025

Description

Summary

Implement dynamic breadcrumbs in Explore plugin that navigate users back to the page they came from dashboard, providing better navigation context.

Changes

Smart Breadcrumb Navigation

  • Breadcrumbs now dynamically reflect where the user navigated from using chrome.recentlyAccessed
  • When accessing an Explore view from a Dashboard, breadcrumb shows: [Dashboard Name] > [Explore Title]
  • When accessing from elsewhere, shows only: [Explore Title]
  • Clicking the Dashboard breadcrumb navigates back to that specific Dashboard

Implementation Details

  • Created getPreviousPageBreadcrumb() utility to detect previous page from chrome.recentlyAccessed
  • Automatically adds workspace ID to navigation URLs when needed
  • Uses application.navigateToUrl() for smooth SPA navigation (no page refresh)
  • Applied to all breadcrumb locations: use_page_initialization.ts, save_explore.ts, breadcrumbs.ts

Issues Resolved

Screenshot

Screen.Recording.2025-11-11.at.4.40.39.PM.mp4

Testing the changes

Changelog

  • feat: Add a dashboard breadcrumb when user naviagte from dashboard

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@github-actions
Copy link
Contributor

❌ Empty Changelog Section

The Changelog section in your PR description is empty. Please add a valid changelog entry or entries. If you did add a changelog entry, check to make sure that it was not accidentally included inside the comment block in the Changelog section.

@codecov
Copy link

codecov bot commented Nov 12, 2025

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 60.75%. Comparing base (42e9595) to head (359b1b9).
⚠️ Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/plugins/explore/public/helpers/save_explore.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10904      +/-   ##
==========================================
- Coverage   60.76%   60.75%   -0.01%     
==========================================
  Files        4533     4532       -1     
  Lines      122164   122206      +42     
  Branches    20471    20483      +12     
==========================================
+ Hits        74232    74250      +18     
- Misses      42695    42716      +21     
- Partials     5237     5240       +3     
Flag Coverage Δ
Linux_1 26.57% <ø> (-0.01%) ⬇️
Linux_2 38.92% <ø> (+<0.01%) ⬆️
Linux_3 39.44% <ø> (+<0.01%) ⬆️
Linux_4 33.74% <0.00%> (-0.01%) ⬇️
Windows_1 26.58% <ø> (-0.01%) ⬇️
Windows_2 38.90% <ø> (+<0.01%) ⬆️
Windows_3 39.45% <ø> (+0.01%) ⬆️
Windows_4 33.74% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

joshuali925
joshuali925 previously approved these changes Nov 12, 2025

// Check if the current URL has a workspace ID and the previous page link doesn't
const currentPathname = window.location.pathname;
const workspaceMatch = currentPathname.match(/\/w\/([^/]+)\//);
Copy link
Member

Choose a reason for hiding this comment

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

not sure how reliable this is in the future, does workspace have API to get id?

Copy link
Member

Choose a reason for hiding this comment

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

@joshuali925 yes, workspace has API to get the current workspace id

Signed-off-by: Joey Liu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants