Skip to content

DataTable primitive (decide: standalone or TreeTable-with-depth-0) #140

Description

@JDonaghy

Part of the cross-platform UI crate (see docs/UI_CRATE_DESIGN.md).

What

A flat grid primitive: rows × columns, sortable columns, resizable columns, cell selection, cell editing. No hierarchy.

Use cases:

  • SQL client: query result grids (thousands of rows, paging)
  • k8s dashboard: resource list views
  • vimcode: quickfix list as a table (file, line, severity, message), find/replace preview

Decision needed

DataTable may be redundant with TreeTable (see sibling issue): a TreeTable with max_depth = 0 is a flat data table. Options:

  1. Ship TreeTable only — apps pass rows with no children. Simpler API surface.
  2. Ship TreeTable + DataTable as distinct primitivesDataTable is more optimized for large flat data (virtual scrolling, column freezing, bulk selection), with no indent/expand overhead.
  3. Ship all threeTreeView, DataTable, TreeTable — each tuned for its scenario.

Recommendation: start with option 1 (TreeTable only) and fork to a dedicated DataTable if profiling shows the tree-generalization costs too much for large flat datasets.

Acceptance

A decision documented in the design doc, plus implementation if option 2 or 3 is chosen.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions