Skip to content

feat(datagrid): toggle filter with Cmd+F when grid is focused#1339

Merged
datlechin merged 1 commit into
mainfrom
feat/cmd-f-toggle-filter
May 19, 2026
Merged

feat(datagrid): toggle filter with Cmd+F when grid is focused#1339
datlechin merged 1 commit into
mainfrom
feat/cmd-f-toggle-filter

Conversation

@datlechin
Copy link
Copy Markdown
Member

Summary

Cmd+F is now context-aware:

  • Data grid focused (table tab): toggles the filter panel
  • SQL editor focused: opens the standard Find panel
  • Inspector window focused: toggles the inspector filter (existing behavior)

Cmd+Shift+F is removed as the default shortcut for "Toggle Filters". The Edit menu "Toggle Filters" item stays accessible without a default binding; users can rebind in Settings → Keyboard Shortcuts if they want their old habit back.

Why

The previous Cmd+Shift+F for filters added a modifier where most users expect a Filter shortcut to match the native Find-style Cmd+F. Inspector windows already routed Cmd+F to filter; this PR extends the same logic to the main data grid.

Changes

  • TableProApp.swift "Find..." menu button: adds a branch for firstResponder is KeyHandlingTableView && actions?.isTableTab == truetoggleFilterPanel(). Editor branch unchanged.
  • KeyboardShortcutModels.swift: removes the .toggleFilters default keymap entry. The action stays in the enum so users keep their saved customizations; only the factory default is gone.
  • Docs updated: docs/features/filtering.mdx, docs/features/keyboard-shortcuts.mdx.
  • CHANGELOG entry under Changed.

Test plan

  • xcodebuild -project TablePro.xcodeproj -scheme TablePro test -skipPackagePluginValidation
  • Open a table → click the data grid → press Cmd+F → filter panel toggles
  • Open a query tab → click the SQL editor → press Cmd+F → editor Find panel opens
  • Open the Inspector → press Cmd+F → inspector filter toggles
  • On a non-table tab (welcome, ER diagram) → press Cmd+F → editor Find panel fallback (or no-op if no editor)
  • Settings → Keyboard Shortcuts: .toggleFilters shows up with no default and can be assigned to any combo by the user

@datlechin datlechin merged commit 3a27325 into main May 19, 2026
2 checks passed
@datlechin datlechin deleted the feat/cmd-f-toggle-filter branch May 19, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant