Skip to content

Datatype-aware editor: expanded long-text cell editor #67

Description

@dasunNimantha

Summary

Long text values (text, varchar(max), nvarchar(max), clob, blobs rendered as text, multi-line strings) are difficult to edit in a single-line ag-grid cell. The cell either truncates the content or scrolls horizontally inside a tiny input. Users want an expanded editor with proper wrapping and multi-line input.

Current behavior

Column definitions at src/components/DataGrid/DataGrid.tsx:548-612 do not set a cellEditor for text columns — ag-grid uses its default single-line text editor.

There is no mechanism to detect "long text" and switch to a larger editor.

Proposed approach

  1. Build a LongTextCellEditor ag-grid editor:
    • Renders a small popup textarea (or a side / bottom-docked panel) sized for multi-line input.
    • Word-wrap on by default; preserves newlines and tabs.
    • Has Save and Cancel buttons; Esc cancels; Ctrl+Enter (or Cmd+Enter) saves.
    • Shows character / line count for very large values.
  2. Wire into column defs at src/components/DataGrid/DataGrid.tsx:548-612 for text-class types and any value whose length exceeds a threshold (e.g. > 200 chars or contains newlines), so short string columns continue to use the default inline editor.
  3. Support null entry.

Acceptance criteria

  • Text columns over a configurable length threshold open the expanded editor
  • Multi-line content (with newlines and tabs) is preserved on save
  • Esc cancels and Ctrl+Enter saves
  • No regression on short text columns (still inline editor)
  • Null entry supported
  • Component test covers open / type / save / cancel paths

Out of scope

  • Rich-text or markdown rendering inside cells.
  • Diff view for before / after edit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions