Skip to content

fix(datagrid): restore persisted column widths - #3214

Open
LarryHu0217 wants to merge 1 commit into
perspective-dev:masterfrom
LarryHu0217:codex/fix-column-width-restore-3163
Open

fix(datagrid): restore persisted column widths#3214
LarryHu0217 wants to merge 1 commit into
perspective-dev:masterfrom
LarryHu0217:codex/fix-column-width-restore-3163

Conversation

@LarryHu0217

Copy link
Copy Markdown

Description

On the first Datagrid restore, saved column widths could be discarded in two places: the viewer schema filtered out the plugin-owned columns key, and the width restore could run before the plugin and regular-table had finished their initial draw.

This change:

  • declares columns as passthrough plugin config so it survives schema filtering
  • caches width overrides received before Datagrid initialization
  • reapplies saved widths after the initial regular-table draw completes
  • adds a regression test that verifies both the rendered width override and the subsequently saved config

Fixes #3163.

Validation

  • PACKAGE=viewer-datagrid pnpm run lint
  • pnpm --filter @perspective-dev/metadata run build
  • pnpm --filter @perspective-dev/server run build
  • pnpm --filter @perspective-dev/client run build
  • pnpm --filter @perspective-dev/viewer run build
  • pnpm --filter @perspective-dev/viewer-datagrid run build
  • PACKAGE=viewer-datagrid pnpm exec playwright test --config=tools/test/playwright.config.ts packages/viewer-datagrid/test/js/column_settings.spec.ts --grep=First (1 passed)
  • git diff --check

Documentation is not applicable because this fixes existing persistence behavior and does not add a public API.

AI assistance

I used OpenAI Codex to inspect the codebase, assist with the implementation and regression test, and run and review the validation steps. I reviewed the final diff and test results myself.

Signed-off-by: Liang Hu <lh3057@columbia.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Column widths are not retained and not persisted

1 participant