Repository navigation
Fixes 35890: Bulk edit grid text selection, tags copy/paste and search - #35974
Conversation
…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.
…wright impact map
…ied 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.
…p 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.
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
|
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 |
|
| Count | Rule |
|---|---|
| 15 | react-hooks/exhaustive-deps |
| 1 | openmetadata-imports/no-lower-layer-page-imports |
| 1 | openmetadata-imports/no-cross-page-imports |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/components/BulkEditEntity/BulkEditEntity.component.tsx:260:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'newRowConfig?.defaults'. Either include it or remove the dependency array. |
| 🟡 | src/components/BulkEditEntity/BulkEditEntity.interface.ts:17:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/Domain/AddDomainForm/AddDomainFormExtensionFields.tsx:857:17 |
react-hooks/exhaustive-deps |
The ref value 'requestId.current' will likely have changed by the time this effect cleanup function runs. If this ref points to a node rendered by React, copy ' |
| 🟡 | src/hooks/useGridEditController.ts:166:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has an unnecessary dependency: 'selectedRange'. Either exclude it or remove the dependency array. |
| 🟡 | src/hooks/useGridEditController.ts:742:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'gridContainer'. Either include it or remove the dependency array. |
| 🟡 | src/hooks/useGridEditController.ts:776:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'getCellsInRange' and 'gridContainer'. Either include them or remove the dependency array. |
| 🟡 | src/hooks/useGridEditController.ts:795:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'gridContainer'. Either include it or remove the dependency array. |
| 🟡 | src/hooks/useGridEditController.ts:910:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has missing dependencies: 'focusCell', 'getCellIndices', and 'setSelectedRange'. Either include them or remove the dependency array. |
| 🟡 | src/hooks/useGridEditController.ts:1007:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has missing dependencies: 'getCellIndices' and 'setSelectedRange'. Either include them or remove the dependency array. |
| 🟡 | src/hooks/useGridEditController.ts:1089:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'setSelectedRange'. Either include it or remove the dependency array. |
| 🟡 | src/hooks/useGridEditController.ts:1143:6 |
react-hooks/exhaustive-deps |
React Hook useCallback has a missing dependency: 'setSelectedRange'. Either include it or remove the dependency array. |
| 🟡 | src/hooks/useGridEditController.ts:1170:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has a missing dependency: 'dataSource'. Either include it or remove the dependency array. |
| 🟡 | src/hooks/useGridEditController.ts:1170:7 |
react-hooks/exhaustive-deps |
React Hook useEffect has a complex expression in the dependency array. Extract it to a separate variable so it can be statically checked. |
| 🟡 | src/pages/EntityImport/BulkEntityImportPage/BulkEntityImportPage.tsx:141:1 |
openmetadata-imports/no-cross-page-imports |
Page features must not import another page feature. Move shared code to components, hooks, interfaces, or pure utilities. |
| 🟡 | src/pages/EntityImport/BulkEntityImportPage/BulkEntityImportPage.tsx:871:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has an unnecessary dependency: 'entityType'. Either exclude it or remove the dependency array. |
| 🟡 | src/pages/EntityImport/BulkEntityImportPage/BulkEntityImportPage.tsx:1371:6 |
react-hooks/exhaustive-deps |
React Hook useEffect has missing dependencies: 'handleImportWebsocketResponse' and 'handleResetImportJob'. Either include them or remove the dependency array. |
| 🟡 | src/pages/EntityImport/BulkEntityImportPage/BulkEntityImportPage.tsx:1462:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 'filterColumns'. Either include it or remove the dependency array. |
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changed…n 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.
🚦 Removed from the merge queue —
|
…ndle 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.
Code Review ✅ Approved 4 closed / 4 findings🔴 High risk · Changing bulk-edit paste and filtered-row merging could route clipboard values to unintended fields or omit hidden rows from saved entity updates. Fixes bulk edit grid text selection, tag copy/paste column mapping, and search across table column rows while keeping hidden rows intact on edit. Resolved the grid copy/paste round-trip for comma-joined and CRLF text, stable cell locators across search, and the clipboard denial toast in the Add Domain form. No open issues found. ✅ 4 closed✅ Bug: Grid copies comma-joined text but paste splits outside text on tabs
✅ Edge Case: CRLF inside a copied cell breaks the grid's own copy/paste round-trip
✅ Bug: getBulkEditGridCell freezes aria-rowindex, so locators break across search
✅ Edge Case: Domain form grid no longer toasts on clipboard denial
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 |
|
…h (2.0 backport #35974) (#36116) * Fixes 35890: Bulk edit grid text selection, tags copy/paste and search (#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) * chore(playwright): auto-refresh impact-map.generated.json * Use @playwright/test in BulkEditTableGridInteractions spec for 2.0 2.0 has no playwright/support/fixtures/base, so test discovery failed. * Add rowTestId to LazyDataGrid and bulk edit grid for 2.0 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. --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>



Describe your changes:
Fixes #35890
In the bulk edit grid (Preview & Edit), keyboard and mouse input meant for an open cell editor was handled by the grid instead, and copy/paste used the wrong column. While testing I also found that the search box never matched a table's rows, and that editing with a search active dropped every row the search was hiding.
useGridEditController) now ignores keys and mouse gestures inside an open cell editor. Before, it blocked Ctrl/Cmd+A, ran the grid's undo/redo on Ctrl+Z/Y, and cleared the selection on arrow keys. Delete/Backspace keep their existing handling.name/displayName/descriptionkeys, so it found nothing in a table'scolumn.*rows. It now matches both forms. The page owns the search text and passes the filtered rows down. The grid controller works on the rows the grid shows and merges every edit back into the full data (mergeGridRows), so hidden rows are kept. The selected range is cleared when the search changes.yarn start. React StrictMode's test unmount cancelled the export, and the remount never re-sent it. The cleanup now resets that guard.Type of change:
High-level design:
BulkEditEntity.utils.ts(new) holds the pure helpers:getBulkEditRenderedColumns: the column order react-data-grid renders (operation column, then frozen, then the rest). Used by both the grid and the page, so cell indices line up.filterBulkEditRows: the search filter.getBulkEditRowsLabelKey: the row label.useGridEditControllertakes an optionalrows(the visible subset). Cell positions index those rows, and writes go throughmergeGridRowsinto the full data. Undo always snapshots the full data.BulkEntityImportPageownsbulkEditSearchTextand passesvisibleRowstoBulkEditEntity, so one array drives both the grid and the controller..github/playwright/impact-map.json:useGridEditController.tsandpages/EntityImport/**now map to the bulk-edit specs, including the new spec.Tests:
Use cases covered
Unit tests
BulkEditEntity.utils.test.ts(new, 7 tests): column order, row labels,filterBulkEditRows,mergeGridRows.BulkEditEntity.test.tsx: two new tests check that a table's bulk edit title says "columns" and a glossary's says "glossary terms". This file andBulkEntityImportPage.test.tsxare also updated for the new props.src/components/BulkEditEntity,src/pages/EntityImport/BulkEntityImportPage,src/components/Domain/AddDomainForm(the other user of the hook): 189/189 passed.BulkEditEntity.utils.ts100% lines,BulkEditEntity.component.tsx76%,BulkEntityImportPage.tsx78%.useGridEditController.tsis 3%: it has no unit tests onmain, and the page tests mock it. Its changed behavior is covered by the Playwright spec below.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
playwright/e2e/Features/BulkEditTableGridInteractions.spec.ts(new, 6 tests).Latest run: commit
4892a60(Chromium,--no-deps,--retries=0, 3 workers, default viewport). UI served by Vite from this branch, against a local OpenMetadata backend.Features/BulkEditTableGridInteractions.spec.ts(new)The run before that, on
fbc2c39, had 2 Tags tests time out. The test helper looked up a row by its name after the grid had scrolled the name column out of view.4892a60fixes the helper; the app code didn't change.Earlier run: commit
3c4b8db. That version of the spec had 7 tests, including the label test that has since moved to Jest.Features/BulkEditTableGridInteractions.spec.tsFeatures/BulkEditOperationBadges.spec.tsFeatures/BulkEditImportPermissions.spec.tsCustomer id).main'ssrc/, the select-all, tags paste and label tests fail.BulkImport,MetricBulkImportExportEdit,CsvJobsTray,ClassificationImportExport,CustomMetricand the smoke set). Running them against the local stack overloaded the shared Docker backend. They run in the merge queue.BulkEditEntity.spec.tsis@quarantine.Manual testing performed
yarn start(Vite) against a local OpenMetadata server and opened Table → Bulk Edit.UI screen recording:
Not applicable: these are bug fixes to existing bulk-edit interactions, not a new UI feature. The behavior is covered by the Playwright spec above.
Checklist:
I have read the CONTRIBUTING document.
My PR title is
Fixes <issue-number>: <short explanation>My PR is linked to a GitHub issue via
Fixes #<issue-number>above.I have commented on my code, particularly in hard-to-understand areas.
For JSON Schema changes: not applicable, no schema changes.
For a UI feature or feature task: not applicable, bug fix (see above).
I have added tests (unit / integration / Playwright as applicable) and listed them above.
Self-review: I reviewed the final diff against
REVIEW.md(thepr-checklistskill runs it) and fixed every 🔴 finding, or answered it on the line below.769d821, 🔴 fixed inb9bbcbb: outside clipboard text was split across cells and rows. Also fixed: a denied clipboard read failed silently, and the page and grid filtered rows separately.b9bbcbb, 🔴 fixed in3c4b8db: multi-line text pasted onto a header went into one cell. Also fixed: the selected range was not reset on search, the paste test didn't check hidden rows, the error handler covered more than the clipboard read, the import page was missing from the impact map, and a comment was outdated.Decision check: no durable decision. The column-order and row-merge rules are internal to the bulk edit grid and are documented in code comments.
I have added a test that covers the exact scenario we are fixing.
🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no new actionable issues were found.Summary
Fixes bulk-edit text selection, clipboard column mapping, search, and edits made while rows are hidden.
Since the previous review, only import order changed. No new issues were found. All four supplied prior threads are unnumbered and resolved; their fixes remain present.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR A[Full row list] --> B[Filter by search] B --> C[Visible grid rows] C --> D[Edit or paste] D --> E[Merge changed rows] E --> AReviews (11) · Last reviewed commit: "lint fix" · Reviewed by Greptile