Repository navigation
Fixes 35890: Bulk edit grid text selection, tags copy/paste and search (2.0 backport #35974) - #36116
Conversation
#35974) * Fixes #35890: Bulk edit grid text selection, tags copy/paste, search and labels - Let keys and mouse gestures inside an open cell editor reach the editor (select-all, undo/redo, text selection) instead of the grid controller. - Map copy/paste/delete to the columns in the order the grid renders them (operation and frozen columns first) and paste from the system clipboard. - Search matches column.* fields; edits made while searching merge back into the full data so hidden rows are kept. - Label table bulk edit rows as columns (glossary rows as glossary terms). - Re-trigger the bulk edit export after a StrictMode remount in dev. * Map useGridEditController and the new bulk edit grid spec in the Playwright impact map * Paste outside text into one cell, share the filtered rows, report denied clipboard reads - Split clipboard text into cells only when it is the grid's own last copy; any other text (a description with commas or newlines) fills the selected cell instead of overwriting its neighbours and the rows below. - Show an error toast when the clipboard read is denied. - Pass the page's filtered rows to BulkEditEntity so the grid and the controller index the same rows. * Split outside text pasted onto a range, reset the range on search, map the import page - Outside clipboard text stays one value only for a single selected cell; a header or range paste splits it into rows and tab-separated columns. - Handle only a rejected clipboard read as a denied clipboard. - Clear the selected range when the search changes the visible rows. - Map pages/EntityImport to the bulk edit Playwright specs. * chore(playwright): auto-refresh impact-map.generated.json * Create the spec's table in beforeAll and cover the row labels with unit tests * Copy grid cells as TSV, keep header pastes split, reset the range when visible rows change - Write grid copies tab-separated, matching the paste parser, and compare clipboard text with Windows line endings normalised. - A header selection is never a single cell, even with one visible row. - Clear the selected range in the grid controller whenever the rendered row ids change (search or an edit), not only on a search change. - Fix the import order that failed UI Checkstyle. * Store the grid copy with normalised line endings so CRLF cells paste back cell for cell * Handle a rejected clipboard write and list setSelectedRange in hook dependencies * Move bulk edit grid test helpers to importUtils and drop the wide viewport * Pin bulk edit grid cells to the row's stable test id instead of its row index * Scroll the bulk edit grid back to the name column before finding a row * Move mergeGridRows to CSVPureUtils with its tests * Keep useGridEditController free of app imports so its browser test bundle loads gridEditors.spec.ts bundles the hook on its own; importing ToastUtils, LocalUtil and CSVPureUtils grew that bundle from 268 KB to 14.7 MB and the test page never rendered, failing plan-playwright in the merge queue. - Move mergeGridRows to the import-free utils/CSV/GridRowsUtils.ts. - Report clipboard failures through an onClipboardError option; the bulk import page passes the toast. * Show the clipboard error toast in the Add Domain table property grid too * lint fix --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> (cherry picked from commit aa1c0b7)
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
🔄 Playwright impact map auto-refreshedThis PR touched specs or UI source that changed the source→spec routing map. I regenerated What is this file? It is the auto-generated half of Playwright's PR planner. It routes "if source X changes, run specs Y" by walking spec imports and cross-referencing What if I want to regenerate locally instead? Run this before pushing your next change to skip the bot commit: python3 .github/scripts/generate_playwright_impact_map.py
git add .github/playwright/impact-map.generated.json
git commit --amend --no-edit # or a separate commit |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
2.0 has no playwright/support/fixtures/base, so test discovery failed.
BulkEditTableGridInteractions locates rows by their rdg-row-<id> test id, which main gets from LazyDataGrid's rowTestId (#0b80ff39b2). Backport that prop and set it on the bulk edit grid.
Code Review ✅ Approved🔴 High risk · Changing bulk-edit clipboard mapping and filtered-row merging could apply pasted or cleared values to unintended metadata fields before saving. Backports bulk edit grid fixes to 2.0: open cell editors keep their text input, copy/paste follows on-screen column order, search matches column rows while keeping hidden rows on edit, and table and glossary labels are distinguished. No issues found. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|



Describe your changes:
Backport of #35974 to
2.0. Fixes #35890.In the bulk edit grid (Preview & Edit), input meant for an open cell editor is handled by the editor rather than the grid. Copy/paste uses the rendered column order, and Ctrl/Cmd+V reads the system clipboard. Search matches
column.*rows and keeps hidden rows when you edit. Labels now say "columns" for tables and "glossary terms" for glossaries. The StrictMode export guard is reset on unmount. See #35974 for the full description.Conflict resolution
2.0is missing earlier main refactors of these files, so I ported this PR's hunks onto the 2.0 code instead of pulling those refactors in:useGridEditController.ts: 2.0 still has the inline keydown handler. I added only the new helpers (isEventInsideCellEditor,getGridKeyTarget,handleClipboardShortcuts). The inline delete, select-all and arrow logic now works ongridRows/setGridRows/pushFullUndo. The.ant-selectcustom-editor checks stay, because 2.0 still uses antd selects.BulkEditEntity.component.tsx: kept 2.0's inlinedataSourceWithOperations. The PR's changes are applied on top:visibleRows/searchText/onSearchTextChangeprops,getBulkEditRenderedColumns,isBulkEditNameColumn,mergeGridRowsinonRowsChange, the row label key, and the StrictMode guard reset.BulkEntityImportPage.tsx: removed 2.0's duplicateshouldRenderMetricImportEditor(it is now defined before the controller) and passedvisibleRows. The main-only render-helper refactor is not included..github/playwright/impact-map*.json: left unchanged. 2.0 has no bulk-edit cluster to extend.Type of change:
Tests:
src/components/BulkEditEntity,src/pages/EntityImport/BulkEntityImportPage,src/components/Domain/AddDomainForm,src/utils/CSV/GridRowsUtils: 189/189 passed.tsc: no errors in the changed files.BulkEditTableGridInteractions.spec.tsis included but was not run locally.🤖 Generated with Claude Code


Confidence Score: 5/5
The changes since the previous review appear safe to merge.Summary
This backport fixes bulk-edit keyboard input, clipboard use, and search.
No new actionable issues were established in the changes since the previous review. Tests and browser checks were not run during this review.
Reviews (4) · Last reviewed commit: "Add rowTestId to LazyDataGrid and bulk e..." · Reviewed by Greptile