Skip to content

feat: improve text/JSON column display with preview modal #66

@EVWorth

Description

@EVWorth

Problem

Text and JSON columns currently overflow and make the grid unreadable. Large content crashes the layout and makes adjacent columns inaccessible.

Solution

Implement cell preview + detail modal similar to SQLyog:

  1. Cell Preview (inline)

    • Truncate text to 50-100 chars with ellipsis
    • Show type indicator (JSON, TEXT, BLOB, etc.)
    • Visual affordance: cursor change on hover
  2. Detail Modal (on click)

    • Full content display in dedicated modal/drawer
    • Syntax highlighting for JSON, SQL, Markdown
    • Copy/Download buttons
    • Searchable for large text
    • Read-only OR editable toggle
  3. Column Width

    • Auto-fit content OR fixed preview width
    • Resizable per column

Implementation Notes

  • React component: CellDetailModal
  • Integrate with ResultsGrid
  • State management via Zustand (resultStore)
  • Consider lazy loading for very large values (>1MB)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions