Skip to content

Conversation

gzh2003
Copy link
Contributor

@gzh2003 gzh2003 commented Jul 9, 2025

For DH-19722. This PR adds a popper for searching and filtering through dashboards. It supports keyboard navigation and includes a global shortcut (Ctrl+Shift+D / Cmd+Shift+D) to toggle the quick filter popper.

Changes:

  • Dashboard search: Filter dashboards by typing in the search input
  • Global shortcut: Ctrl+Shift+D/Cmd+Shift+D opens the dashboard search popper (only when 2+ dashboards exist)
  • Keyboard interactions: arrow keys navigate between dashboard items; enter sets the active dashboard to the currently focused item in the list (if no dashboard in the list is focused it will default to the first dashboard in the search)
  • Adds 'endPlaceholder' to SearchInput to display the associated shortcut

@gzh2003 gzh2003 self-assigned this Jul 9, 2025
Copy link

codecov bot commented Jul 9, 2025

Codecov Report

Attention: Patch coverage is 0% with 78 lines in your changes missing coverage. Please review.

Project coverage is 44.59%. Comparing base (e32b68f) to head (4608893).
Report is 16 commits behind head on main.

Files with missing lines Patch % Lines
...ckages/components/src/navigation/DashboardList.tsx 0.00% 62 Missing ⚠️
packages/components/src/navigation/NavTabList.tsx 0.00% 13 Missing ⚠️
packages/components/src/SearchInput.tsx 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2481      +/-   ##
==========================================
- Coverage   44.62%   44.59%   -0.04%     
==========================================
  Files         759      763       +4     
  Lines       42548    42692     +144     
  Branches    10693    10734      +41     
==========================================
+ Hits        18988    19038      +50     
- Misses      23549    23643      +94     
  Partials       11       11              
Flag Coverage Δ
unit 44.59% <0.00%> (-0.04%) ⬇️

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.

@gzh2003 gzh2003 force-pushed the DH-19722-better-handling-for-large-numbers-of-open-dashboards branch from f7ce2f5 to c9e8783 Compare July 15, 2025 18:38
@gzh2003 gzh2003 marked this pull request as ready for review July 16, 2025 15:11
@gzh2003 gzh2003 requested a review from mofojed July 16, 2025 15:27
);

const handleMouseDown = useCallback((event: React.MouseEvent) => {
// Prevent mousedown from taking focus away from the search input
Copy link
Contributor Author

@gzh2003 gzh2003 Jul 16, 2025

Choose a reason for hiding this comment

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

I'm not a fan of mousedown on the dashboard list stealing focus from the search input. The list items already have CSS styling for this, so I think retaining focus on the search input keeps things cleaner.

Copy link
Member

Choose a reason for hiding this comment

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

Yea, I generally try to avoid capturing just a mouse down or a mouse up, as that could potentially cause issues for any other libraries or cause issues with accessibility... seems okay for this case.
In another scenario, eating just an mouseup event could screw up anything that had started listening for mousedown and then expected a mouseup... Capturing down is a little less dangerous though.

@gzh2003 gzh2003 requested a review from mofojed July 16, 2025 20:33
Copy link
Member

@mofojed mofojed left a comment

Choose a reason for hiding this comment

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

Couple minor things, looks good

@gzh2003 gzh2003 force-pushed the DH-19722-better-handling-for-large-numbers-of-open-dashboards branch from 4608893 to 148590a Compare July 22, 2025 17:56
@gzh2003 gzh2003 requested a review from mofojed July 22, 2025 18:14
@mofojed mofojed merged commit 1d3ddff into deephaven:main Jul 25, 2025
11 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 25, 2025
@gzh2003 gzh2003 deleted the DH-19722-better-handling-for-large-numbers-of-open-dashboards branch July 25, 2025 13:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants