Repository navigation
Add category visibility toggles to the schema visualizer - #124963
Conversation
|
Workflow [PR], commit [1c45cfa] Summary: ✅
AI ReviewSummaryThis PR makes the schema visualizer legend categories clickable, adds a Findings
Final Verdict |
Tables whose engine is classified as `other` (e.g. `Kafka`, `Memory`, `Log`) are rendered with their own `--header-other` palette, so they get their own legend entry and toggle instead of being folded into `MergeTree / Table`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units6 translation units recompiled, 4 s compile time in total, 6 of them have a recent master baseline. |
When a category toggle hides neighbours of the selected node but keeps the node itself visible, `render` recomputes the links of the filtered graph but left the highlight and the sidebar stale, still listing the hidden tables. Re-run `selectNode` after the redraw so both reflect the visible graph. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
🕵 @groeneai, investigate the failure: |
|
Not caused by this PR. The fix is #123121 (mine, open). This run fails in query 26 with the same |
Extract the post-render selection sync into `renderWithVisibleSelection` and use it for the `db-filter` handler too, so switching the database either clears a selection that became hidden or refreshes the highlight and the sidebar of a still-visible one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
`renderWithVisibleSelection` kept `state.selectedKey` when it pointed at a node missing from the freshly loaded graph, so toggling a category or changing the database filter dimmed every node and left the stale sidebar open. Treat a missing node the same as a hidden one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
| /// (a reload may have replaced the graph), and refresh the highlight and the sidebar of a still-visible | ||
| /// selected node, because the redraw recomputes the links of the filtered graph and they must not | ||
| /// refer to just-hidden neighbours. | ||
| function renderWithVisibleSelection() { |
There was a problem hiding this comment.
This helper now centralizes the post-render selection sync for visibility changes, but a fresh schema reload still bypasses it: loadAll() ends with a bare render() at programs/server/schema.html:1104. Repro: select a table, load a different server/schema where that key is absent (or now filtered out), and the graph redraws while the old details sidebar stays open until the user touches the database/category filters. Please route the final paint in loadAll() through renderWithVisibleSelection() (or clear/revalidate state.selectedKey when rebuilding state.nodes) so a reload immediately drops or refreshes the selection.
Make the schema visualizer's seven table-category labels (including a new "Other table" entry for engines such as
Kafka,Memory,Log) clickable to hide or show the corresponding nodes and their connecting lines. Add a Hide all / Show all control so users can focus on individual parts of a schema and reveal categories during a walkthrough. Hidden categories are dimmed, toggles support keyboard activation and expose their state witharia-pressed, and hiding a selected node closes its details panel.I thought of having it like this to make it easier to demo a database that has a bunch of these things setup. If we could introduce each category individually, I think it'd be easier to grasp what's going on
Screenshots using a representative demo schema:
All categories visible
Materialized View and Refreshable MV categories hidden
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
The schema visualizer supports hiding and showing table categories by clicking their legend labels, with a Hide all / Show all control.
Workflow [PR]
Sync PR [sync-upstream/pr/124963]
Version info
26.10.1.2149-master(included in26.10and later)