feat: add table copy/paste + preview before save 🚀#1830
Open
paustint wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
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.
b24841c to
2d49a4a
Compare
2d49a4a to
1fd7308
Compare
1fd7308 to
b2c60f0
Compare
b2c60f0 to
24ff5ad
Compare
24ff5ad to
e754f86
Compare
e754f86 to
5ca1f34
Compare
5ca1f34 to
3b303d3
Compare
3b303d3 to
1692ee3
Compare
1692ee3 to
bfd515c
Compare
bfd515c to
549f5c4
Compare
Supercharged table editing experience! Allow copying and pasting ranges of cells Allow undo Preview changes before saving Inline cell warning and error messages
549f5c4 to
2495d7b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supercharged table editing experience!
Allow copying and pasting ranges of cells
Allow undo
Preview changes before saving
Inline cell warning and error messages