Skip to content

feat(datagrid): show column type in header hover tooltip (#435)#436

Merged
debba merged 7 commits into
TabularisDB:mainfrom
benedettoraviotta:feat/column-type-header-tooltip
Jul 13, 2026
Merged

feat(datagrid): show column type in header hover tooltip (#435)#436
debba merged 7 commits into
TabularisDB:mainfrom
benedettoraviotta:feat/column-type-header-tooltip

Conversation

@benedettoraviotta

Copy link
Copy Markdown
Contributor

What

Adds a DataGrip-style tooltip on data-grid column headers: hovering a header shows <name>: <type> (e.g. id: uuid).

Closes #435

How

  • The column data type is read from the already-available columnMetadata (data_type) via the existing columnTypeMap in DataGrid.tsxno backend changes.
  • The tooltip reuses the existing floating-surface look through the reserved-but-previously-unused --bg-tooltip theme token (bg-tooltip border border-strong rounded-lg shadow-xl), with the same group-hover fade used elsewhere.
  • Positioned with absolute (not fixed) because the sticky <thead> carries a translateY transform, which would break fixed anchoring.
  • pointer-events-none so it never intercepts header clicks/sort.
  • The native sort-hint title is suppressed only while the type tooltip is shown, to avoid two overlapping tooltips on hover.

Scope

Shows whenever column metadata is present (table browse). Arbitrary query results carry no per-column type in QueryResult, so no tooltip is shown there — sort-hint title behavior is unchanged for those columns.

Verification

  • pnpm typecheck — pass
  • pnpm exec eslint src/components/ui/DataGrid.tsx — pass
  • Verified visually via pnpm tauri dev (Postgres table browse).

Add a DataGrip-style tooltip that appears on column header hover showing
"<name>: <type>" (e.g. "id: uuid"). The type is read from the already
available columnMetadata (column data_type), so no backend changes are
needed; it shows whenever column metadata is present (table browse) and
is absent for arbitrary query results, which carry no per-column type.

Reuses the existing floating-surface look via the reserved --bg-tooltip
token. The native sort-hint title is suppressed while the type tooltip is
shown to avoid two overlapping tooltips; query-result columns (no type)
keep their sort hint.

Closes TabularisDB#435
@kilo-code-bot

kilo-code-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 file)
  • src/components/ui/DataGrid.tsx — adds a DataGrip-style column type tooltip on header hover using the existing columnTypeMap. Tooltip is properly positioned with absolute inside the sticky header, uses the reserved --bg-tooltip theme token, and suppresses the native title sort hint to avoid overlap. The columnTypeMap dependency is correctly added to the useMemo array. No bugs, security issues, or breaking changes detected.

Reviewed by kimi-k2.6-20260420 · Input: 87.1K · Output: 9.4K · Cached: 138.3K

@debba

debba commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Looks good!
Thanks for it :)

@debba debba merged commit d1c13b0 into TabularisDB:main Jul 13, 2026
1 check passed
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.

[Feat]: Show column type in a tooltip on header hover (DataGrip-style)

2 participants