Skip to content

feat: context menu improvements for header, FK cells, and empty space#563

Merged
datlechin merged 1 commit intomainfrom
feat/context-menu-improvements
Apr 3, 2026
Merged

feat: context menu improvements for header, FK cells, and empty space#563
datlechin merged 1 commit intomainfrom
feat/context-menu-improvements

Conversation

@datlechin
Copy link
Copy Markdown
Collaborator

Summary

Three context menu improvements identified from a full audit:

1. Column header menu — Sort + Show All Columns

  • Added Sort Ascending and Sort Descending at the top of the header right-click menu
  • Added Show All Columns (only visible when columns are hidden) after Hide Column
  • Uses existing onSort callback and new onShowAllColumns callback

2. Data grid row menu — FK Preview & Navigate

  • When right-clicking a FK column cell with a non-empty value, two new items appear:
    • Preview Referenced Row — opens the FK preview popover (same as Cmd+Enter)
    • Open {table} — navigates directly to the referenced table
  • Items only appear for FK columns with non-null values

3. Empty space — Add Row

  • Right-clicking empty space below data grid rows shows Add Row (editable tables only)
  • Uses the existing emptySpaceMenu infrastructure from the Structure tab PR
  • Reuses StructureMenuTarget for action lifecycle management

Test plan

  • Right-click column header → Sort Ascending/Descending → verify sorting works
  • Hide a column → right-click another header → verify "Show All Columns" appears
  • Click "Show All Columns" → verify all hidden columns reappear
  • Right-click a FK cell with value → verify "Preview Referenced Row" and "Open {table}"
  • Click "Preview Referenced Row" → verify popover appears
  • Click "Open {table}" → verify navigation to referenced table
  • Right-click a non-FK cell → verify no FK items in menu
  • Right-click a FK cell with NULL value → verify no FK items
  • Right-click empty space in editable table → verify "Add Row"
  • Right-click empty space in query results → verify no menu

@datlechin datlechin merged commit 8849592 into main Apr 3, 2026
2 checks passed
@datlechin datlechin deleted the feat/context-menu-improvements branch April 3, 2026 03:51
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.

1 participant