Repository navigation
feat(erd): open diagram tables in the table browser, Open in SQL and Show relations (#1155) - #1202
Merged
Merged
Conversation
…Show relations (#1155) A double click or Open data on a card in the SQL workspace's Diagram tab opened a SELECT in a new SQL tab, not the table browser, and quoted a table of another schema as one identifier ("sales.orders"), so the query failed. It now opens the table browser through the Quick Switcher path; without the app shell the SELECT tab stays, with the name qualified per dialect ("sales"."orders"). The card menu gains Open in SQL and Show relations; Show relations opens the table browser in its Relations view. A double click on a neighbour in the Relations view did nothing, because no table browser passed a handler; it now opens the neighbour, in the Relations view again, so the graph can be walked.
On the default test platform (Android) shadcn opens a context menu as a sheet, which needs the app's drawer overlay; the desktop app shows a popover.
Grid scroll benchmark
Informational only (threshold 5%). Shared CI runners are noisy; re-run before trusting a single result. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1155
What was wrong
SELECT * … LIMIT 100in a new SQL tab.sales.orderswas quoted as one identifier,"sales.orders".onOpenNeighbour, so a double click on a neighbour was a no-op.Changes
ErdTableNames: a diagram name to aQueryaSchemaObjectand toSELECTSQL, qualified and quoted per dialect. Only PostgreSQL names are split on the dot.QueryaCommandHost.onOpenSchemaObject(the Quick Switcher path). Without the app shell (tests) the rows open in a SQL tab as before, with correct quoting.TableViewCommandBridge.requestViewForNextTable: the next table browser that opens starts in the requested view. The request expires after a few seconds.Not in this PR
public, as the Quick Switcher does; a server with anothersearch_pathwould need the session's current schema.