Skip to content

feat: add table copy/paste + preview before save 🚀#1830

Open
paustint wants to merge 1 commit into
mainfrom
feat/table-copy-paste-editing
Open

feat: add table copy/paste + preview before save 🚀#1830
paustint wants to merge 1 commit into
mainfrom
feat/table-copy-paste-editing

Conversation

@paustint

Copy link
Copy Markdown
Contributor

Supercharged table editing experience!

Allow copying and pasting ranges of cells

Allow undo

Preview changes before saving

Inline cell warning and error messages

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 upgrades the inline-edit experience for the Salesforce records data table by adding spreadsheet-like paste/clear, undo/redo, per-cell validation feedback, and a “preview changes before save” workflow (including change/results downloads).

Changes:

  • Add range paste/clear support (keyboard + context menu), plus selection-based revert of modified cells.
  • Add undo/redo history for inline edits and pastes, with analytics hooks for edit actions.
  • Add client-side validation + structured save error mapping (field vs record), surfaced inline and in a new Preview Changes modal with downloads.

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
libs/ui/src/lib/data-table/SalesforceRecordDataTable.tsx Wires paste/undo/redo/revert + preview modal into the Salesforce record table; adds validation and error aggregation.
libs/ui/src/lib/data-table/PreviewChangesModal.tsx New modal to review pending edits, show per-record status, and download changes/results.
libs/ui/src/lib/data-table/grid/validate-cell-value.ts New pure validation + save error mapping helpers for per-cell/row error state.
libs/ui/src/lib/data-table/grid/renderers/CellRenderers.tsx Enhances row error popover rendering and adds a wrapper to show per-cell validation icons.
libs/ui/src/lib/data-table/grid/keyboard/useGridKeyboardNavigation.ts Adds keyboard shortcuts for undo/redo and selection clear (Delete/Backspace).
libs/ui/src/lib/data-table/grid/grid-types.ts Extends row model to include field errors/warnings and adds paste/revert event types.
libs/ui/src/lib/data-table/grid/grid-paste.ts New generic clipboard parsing + paste target resolution + flash feedback utilities.
libs/ui/src/lib/data-table/grid/grid-column-utils.tsx Updates dirty/error styling logic and wraps editable cells with validation icon rendering.
libs/ui/src/lib/data-table/grid/DataTableV2.tsx Plumbs new paste/undo/redo/revert props through the v2 grid wrapper.
libs/ui/src/lib/data-table/grid/data-table-grid.css Adds visual rings for errors/warnings and a “pasted” flash style.
libs/ui/src/lib/data-table/grid/components/GridContainer.tsx Implements paste (DOM + context menu), clear selection, and revert selection context actions.
libs/ui/src/lib/data-table/grid/tests/validate-cell-value.spec.ts Adds unit tests for validation and save error mapping helpers.
libs/ui/src/lib/data-table/grid/tests/grid-paste.spec.ts Adds unit tests for clipboard parsing and paste target computation.
libs/ui/src/lib/data-table/DataTable.tsx Extends public DataTable props to expose paste/undo/redo/revert plumbing.
libs/ui/src/lib/data-table/data-table-paste-utils.ts New Salesforce-aware paste coercion + apply/revert helpers with validation re-run.
libs/ui/src/lib/data-table/tests/PreviewChangesModal.spec.ts Adds unit tests for preview list construction logic.
libs/ui/src/lib/data-table/tests/data-table-paste-utils.spec.ts Adds unit tests for paste coercion, apply, and revert behavior.
libs/ui/src/index.ts Exports the new PreviewChangesModal entry point and updates export ordering.
libs/shared/constants/src/lib/shared-constants.ts Adds new analytics keys for inline edit actions (paste/undo/redo/revert/preview/download).
libs/features/query/src/QueryResults/QueryResults.tsx Passes host trackEvent through to the table so inline edit actions are tracked.

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

Comment thread libs/ui/src/lib/data-table/SalesforceRecordDataTable.tsx
Comment thread libs/ui/src/lib/data-table/grid/components/GridContainer.tsx
@paustint paustint force-pushed the feat/table-copy-paste-editing branch from b24841c to 2d49a4a Compare June 26, 2026 13:47
@paustint paustint requested a review from Copilot June 26, 2026 13:47
@paustint paustint force-pushed the feat/table-copy-paste-editing branch from 2d49a4a to 1fd7308 Compare June 26, 2026 13:47

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 20 out of 20 changed files in this pull request and generated 2 comments.

Comment thread libs/ui/src/lib/data-table/SalesforceRecordDataTable.tsx
Comment thread libs/ui/src/lib/data-table/SalesforceRecordDataTable.tsx
@paustint paustint force-pushed the feat/table-copy-paste-editing branch from 1fd7308 to b2c60f0 Compare June 26, 2026 20:55
@paustint paustint requested a review from Copilot June 26, 2026 21:10

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 20 out of 20 changed files in this pull request and generated no new comments.

@paustint paustint marked this pull request as ready for review June 28, 2026 15:43
@paustint paustint force-pushed the feat/table-copy-paste-editing branch from b2c60f0 to 24ff5ad Compare June 28, 2026 23:56
@paustint paustint requested a review from Copilot June 29, 2026 00:39

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 20 out of 20 changed files in this pull request and generated 1 comment.

Comment thread libs/ui/src/lib/data-table/grid/components/GridContainer.tsx Outdated
@paustint paustint force-pushed the feat/table-copy-paste-editing branch from 24ff5ad to e754f86 Compare June 29, 2026 02:10
@paustint paustint requested a review from Copilot June 29, 2026 02:11

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 20 out of 20 changed files in this pull request and generated no new comments.

@paustint paustint force-pushed the feat/table-copy-paste-editing branch from e754f86 to 5ca1f34 Compare June 29, 2026 02:41
Copilot AI review requested due to automatic review settings June 30, 2026 02:53
@paustint paustint force-pushed the feat/table-copy-paste-editing branch from 5ca1f34 to 3b303d3 Compare June 30, 2026 02:53

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 20 out of 20 changed files in this pull request and generated 2 comments.

Comment thread libs/ui/src/lib/data-table/PreviewChangesModal.tsx
Comment thread libs/ui/src/lib/data-table/PreviewChangesModal.tsx Outdated
@paustint paustint force-pushed the feat/table-copy-paste-editing branch from 3b303d3 to 1692ee3 Compare June 30, 2026 14:24
Copilot AI review requested due to automatic review settings June 30, 2026 14:39
@paustint paustint force-pushed the feat/table-copy-paste-editing branch from 1692ee3 to bfd515c Compare June 30, 2026 14:39

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 22 out of 22 changed files in this pull request and generated 1 comment.

Comment thread libs/ui/src/lib/data-table/grid/components/GridContainer.tsx
@paustint paustint force-pushed the feat/table-copy-paste-editing branch from bfd515c to 549f5c4 Compare July 1, 2026 14:55
@paustint paustint requested a review from Copilot July 1, 2026 14:55

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 22 out of 22 changed files in this pull request and generated 2 comments.

Comment thread libs/ui/src/lib/data-table/grid/components/GridContainer.tsx Outdated
Comment thread libs/ui/src/lib/data-table/grid/validate-cell-value.ts Outdated
Supercharged table editing experience!

Allow copying and pasting ranges of cells

Allow undo

Preview changes before saving

Inline cell warning and error messages
@paustint paustint force-pushed the feat/table-copy-paste-editing branch from 549f5c4 to 2495d7b Compare July 1, 2026 22:58
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