feat(sidebar): add database filter to the tree sidebar#1681
feat(sidebar): add database filter to the tree sidebar#1681desperadoxhy wants to merge 1 commit into
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
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. 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. |
|
I have read the CLA Document and I hereby sign the CLA. |
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.visibleDatabasesfilters by the set when the toggle is on.SidebarViewbottom bar gets a funnel button plus a popover with a toggle, a checkbox list, and Select All / Clear.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 runTableProTests/DatabaseTreeFilterStorageTestson a machine with Xcode.