feat(sidebar): show schemas as collapsible sections in the Tables sidebar#1300
feat(sidebar): show schemas as collapsible sections in the Tables sidebar#1300luizvergennes wants to merge 6 commits into
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA. |
Signed-off-by: Luiz Vergennes <luizvergennes@lgvm.dev>
|
I do feel it could still be expanded a bit, to allow the tabs to also work across, schemas. I did not test, on my build. But on the production app, the tabs close as soon as I switch to another schema. |
|
Thank you. The PR looks good, but it needs some improvement. I’ll continue to improve it. |
…p, schema serialisation, comment cleanup
…onnection context
|
Found one more bug while testing the branch: clicking a table in a non-current schema (e.g. `auth.audit_log_entries` while connected to `public`) errored with `relation "audit_log_entries" does not exist` because the SELECT was unqualified. Root cause: `onDoubleClick` → `openTableTab(tableName)` only passed the table name, never the schema. `tableContext.schemaName` was being set to the connection's current schema, and the SELECT was built without the schema prefix. The PR's earlier attempt to fix this by calling `switchSchema` before opening was brittle (mutates connection-wide state, races with other tabs, fails silently for drivers without `SchemaSwitchable`). Deeply correct fix in 12b20b8 on `pr-1300-review-fixes`:
Result: SELECT is built as `SELECT * FROM "auth"."audit_log_entries" LIMIT 1000` regardless of which schema the connection is currently pointed at. No connection-state mutation, no schema thrashing across windows. |
# Conflicts: # TablePro/TableProApp.swift
|
Merged your fix into mine! Thank you so much for your help/work! 🙌 |
solves #1296
Adds a Sidebar group in the settings, with a "Display schemas on the sidebar" option:

Enabling this option, shows all schemas on the sidebar, and they can be expanded:



✨ Used AI to help me create this PR.