Skip to content

feat: DH-21344: Dropdown for input table enums#2704

Draft
dgodinez-dh wants to merge 39 commits into
deephaven:mainfrom
dgodinez-dh:dag_EnumDropdownContext
Draft

feat: DH-21344: Dropdown for input table enums#2704
dgodinez-dh wants to merge 39 commits into
deephaven:mainfrom
dgodinez-dh:dag_EnumDropdownContext

Conversation

@dgodinez-dh

Copy link
Copy Markdown
Contributor

Consumes the new Column Restriction JS API to add an dropdown cell renderer for input tables. The renderer is pass to Grid via a function in a registry in a context around IrisGrid. This will allow Enterprise to register more input table cell renderers.

@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 32.20339% with 80 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.76%. Comparing base (ab2439a) to head (3449614).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
packages/iris-grid/src/CellDropdownField.tsx 0.00% 50 Missing ⚠️
...-grid/src/key-handlers/RestrictedEditKeyHandler.ts 43.47% 13 Missing ⚠️
packages/iris-grid/src/IrisGridContextProvider.tsx 25.00% 6 Missing ⚠️
packages/iris-grid/src/IrisGridModel.ts 16.66% 5 Missing ⚠️
packages/grid/src/key-handlers/EditKeyHandler.ts 0.00% 3 Missing ⚠️
...ackages/iris-grid/src/CellInputRendererContext.tsx 57.14% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2704      +/-   ##
==========================================
+ Coverage   50.72%   50.76%   +0.03%     
==========================================
  Files         788      792       +4     
  Lines       44923    45069     +146     
  Branches    11447    11684     +237     
==========================================
+ Hits        22789    22878      +89     
- Misses      22115    22145      +30     
- Partials       19       46      +27     
Flag Coverage Δ
unit 50.76% <32.20%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces column-restriction–driven cell editors for input tables by adding a registry-based mechanism to @deephaven/grid, wiring that registry through @deephaven/iris-grid via context, and providing a default dropdown editor for string-list (enum-like) restrictions.

Changes:

  • Add ColumnRestriction support and a cellInputRendererRegistry to @deephaven/grid to render custom cell editors based on restriction type.
  • Add IrisGridContextProvider + default registry plumbing in @deephaven/iris-grid, including a dropdown editor (CellDropdownField) for string-list restrictions.
  • Add an IrisGrid key handler to preserve existing values for restriction-backed editors when editing is initiated by typing.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/iris-grid/src/key-handlers/RestrictedEditKeyHandler.ts Intercepts printable-key edits to open restriction-backed editors without overwriting existing values.
packages/iris-grid/src/key-handlers/index.ts Exports the new key handler.
packages/iris-grid/src/IrisGridModel.ts Adds getColumnRestriction and defines string-list restriction type helpers.
packages/iris-grid/src/IrisGridContextProvider.tsx Combines theme + renderer registry into a single context IrisGrid can consume.
packages/iris-grid/src/IrisGrid.tsx Switches IrisGrid to the combined context and passes the registry down to Grid.
packages/iris-grid/src/IrisGrid.scss Adds styling so dropdown editors get a visible focus/outline treatment.
packages/iris-grid/src/index.ts Exposes new context/provider and dropdown/editor context exports.
packages/iris-grid/src/CellInputRendererContext.tsx Defines default renderer registry and maps string-list restrictions to the dropdown editor.
packages/iris-grid/src/CellDropdownField.tsx Implements the dropdown cell editor using Spectrum Picker wrapper.
packages/iris-grid/src/CellDropdownField.scss Styles dropdown editor to fit within grid cell geometry and visuals.
packages/grid/src/key-handlers/EditKeyHandler.ts Adds Enter-to-start-editing behavior for editable cells.
packages/grid/src/index.ts Re-exports CellInputField, renderer types, and GridModel types.
packages/grid/src/GridRendererTypes.ts Adds CellInputRendererFn and CellInputRendererRegistry types.
packages/grid/src/GridModel.ts Adds ColumnRestriction type and getColumnRestriction hook on models.
packages/grid/src/Grid.tsx Uses cellInputRendererRegistry to render custom editors and sets CSS vars for editor styling.
packages/app-utils/src/components/AppBootstrap.tsx Wraps app tree with IrisGridContextProvider to supply the combined context.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/iris-grid/src/key-handlers/RestrictedEditKeyHandler.ts Outdated
Comment thread packages/grid/src/Grid.tsx
Comment thread packages/iris-grid/src/IrisGridContextProvider.tsx

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.

Comment thread packages/iris-grid/src/key-handlers/RestrictedEditKeyHandler.ts
Comment thread packages/iris-grid/src/IrisGridModel.ts Outdated
Comment thread packages/iris-grid/src/IrisGridContextProvider.tsx
Comment thread packages/grid/src/Grid.tsx
dgodinez-dh and others added 5 commits June 22, 2026 09:20
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.

2 participants