Skip to content

feat(sidebar): add database filter to the tree sidebar#1681

Open
desperadoxhy wants to merge 1 commit into
TableProApp:mainfrom
desperadoxhy:feat/add-treeview-datebase-filter
Open

feat(sidebar): add database filter to the tree sidebar#1681
desperadoxhy wants to merge 1 commit into
TableProApp:mainfrom
desperadoxhy:feat/add-treeview-datebase-filter

Conversation

@desperadoxhy

Copy link
Copy Markdown

What

The tree sidebar can now show only a chosen set of databases. With tree layout on, a funnel button appears at the bottom of the sidebar. Click it, toggle "Only show selected databases", and check the databases you want to see. Toggle off shows all.

Why

Servers often hold dozens of databases. The tree gets noisy when most are ones you never open. This hides them per connection.

How

  • DatabaseTreeFilterStorage (UserDefaults, per connection, device-local) stores the enable toggle and the selected database set.
  • DatabaseTreeView.visibleDatabases filters by the set when the toggle is on.
  • SidebarView bottom bar gets a funnel button plus a popover with a toggle, a checkbox list, and Select All / Clear.
  • Deleting a connection clears its filter (single and batch).

Tests

Unit tests for the storage cover defaults, persistence, round-trip, per-connection isolation, and single/batch cleanup.

Verification

This machine only has Command Line Tools (no full Xcode), so I could not run xcodebuild. I verified API signatures and call sites by static review. Please build and run TableProTests/DatabaseTreeFilterStorageTests on a machine with Xcode.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Before we can merge this PR, you need to sign our Contributor License Agreement.

To sign, please comment below with:

I have read the CLA Document and I hereby sign the CLA.


I have read the CLA Document and I hereby sign the CLA.


xuhengyu seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@desperadoxhy

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA.

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