Skip to content

fix: Spacebar acting as backspace in description editor#27303

Merged
anuj-kumary merged 4 commits intomainfrom
issue-#26927
Apr 13, 2026
Merged

fix: Spacebar acting as backspace in description editor#27303
anuj-kumary merged 4 commits intomainfrom
issue-#26927

Conversation

@anuj-kumary
Copy link
Copy Markdown
Member

Describe your changes:

Fixes #26927
When editing a description for a single column in Column Bulk Operations, typing a space in the rich text editor caused unexpected behavior the spacebar acted as a backspace, making it impossible to type multi-word descriptions.

Additional Cleanup
Replaced two duplicate switch blocks with shared lookup maps and helper functions. Replaced the brittle string manipulation for editedDisplayName/editedDescription/editedTags key generation with a typed EDIT_FIELD_TO_ROW_KEY constant map.

Screen.Recording.2026-04-13.at.10.00.27.AM.mov

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

@anuj-kumary anuj-kumary self-assigned this Apr 13, 2026
@anuj-kumary anuj-kumary added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs labels Apr 13, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 13, 2026

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 63%
63.92% (59758/93481) 43.62% (31232/71590) 46.73% (9395/20103)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 13, 2026

🟡 Playwright Results — all passed (30 flaky)

✅ 3595 passed · ❌ 0 failed · 🟡 30 flaky · ⏭️ 207 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 456 0 1 2
🟡 Shard 2 640 0 4 32
🟡 Shard 3 635 0 14 26
🟡 Shard 4 624 0 3 47
✅ Shard 5 609 0 0 67
🟡 Shard 6 631 0 8 33
🟡 30 flaky test(s) (passed on retry)
  • Pages/UserCreationWithPersona.spec.ts › Create user with persona and verify on profile (shard 1, 1 retry)
  • Features/BulkEditEntity.spec.ts › Glossary (shard 2, 1 retry)
  • Features/ChangeSummaryBadge.spec.ts › Automated badge should appear on entity description with Automated source (shard 2, 1 retry)
  • Features/Glossary/GlossaryWorkflow.spec.ts › should display correct status badge color and icon (shard 2, 1 retry)
  • Features/Glossary/GlossaryWorkflow.spec.ts › should inherit reviewers from glossary when term is created (shard 2, 1 retry)
  • Features/Permissions/DataProductPermissions.spec.ts › Data Product deny operations (shard 3, 1 retry)
  • Features/Permissions/GlossaryPermissions.spec.ts › Team-based permissions work correctly (shard 3, 1 retry)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 1 retry)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 1 retry)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 1 retry)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 1 retry)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 1 retry)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 3, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Features/SettingsNavigationPage.spec.ts › should save changes and navigate when "Save changes" is clicked in blocker (shard 3, 1 retry)
  • Features/TeamSubscriptions.spec.ts › data steward cannot edit team subscriptions (shard 3, 1 retry)
  • Features/Topic.spec.ts › Copy nested field link should include full hierarchical path (shard 3, 1 retry)
  • Flow/CustomizeWidgets.spec.ts › Activity Feed Widget (shard 3, 1 retry)
  • Flow/PersonaFlow.spec.ts › Set default persona for team should work properly (shard 3, 1 retry)
  • Pages/Customproperties-part2.spec.ts › entityReferenceList shows item count, scrollable list, no expand toggle (shard 4, 1 retry)
  • Pages/DataContracts.spec.ts › Create Data Contract and validate for Spreadsheet (shard 4, 1 retry)
  • Pages/Entity.spec.ts › Tier Add, Update and Remove (shard 4, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › verify create lineage for entity - Data Model (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: searchIndex (shard 6, 1 retry)
  • Pages/Login.spec.ts › Refresh should work (shard 6, 1 retry)
  • Pages/ODCSImportExport.spec.ts › Multi-object ODCS contract - object selector shows all schema objects (shard 6, 1 retry)
  • Pages/ServiceEntity.spec.ts › Delete Pipeline Service (shard 6, 1 retry)
  • Pages/ServiceEntity.spec.ts › Tier Add, Update and Remove (shard 6, 1 retry)
  • Pages/Users.spec.ts › Permissions for table details page for Data Consumer (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@anuj-kumary anuj-kumary changed the title fix: fix spacebar acting as backspace in description editor fix: Spacebar acting as backspace in description editor Apr 13, 2026
@anuj-kumary anuj-kumary requested a review from a team as a code owner April 13, 2026 09:44
@gitar-bot
Copy link
Copy Markdown

gitar-bot bot commented Apr 13, 2026

Code Review ✅ Approved 2 resolved / 2 findings

Fixes spacebar being treated as backspace in the description editor and syncs pending changes counter for description-only edits and display name updates. Both issues resolved.

✅ 2 resolved
Bug: Pending changes counter ignores description-only edits

📄 openmetadata-ui/src/main/resources/ui/src/pages/ColumnBulkOperations/ColumnGrid/ColumnGrid.component.tsx:1481-1486 📄 openmetadata-ui/src/main/resources/ui/src/pages/ColumnBulkOperations/ColumnGrid/ColumnGrid.component.tsx:242-243 📄 openmetadata-ui/src/main/resources/ui/src/pages/ColumnBulkOperations/ColumnGrid/ColumnGrid.component.tsx:327-328 📄 openmetadata-ui/src/main/resources/ui/src/pages/ColumnBulkOperations/ColumnGrid/ColumnGrid.component.tsx:419-422
The editedNonGroupCount (used for the pending changes indicator) is computed via hasEditedValues() which checks whether editedDescription is defined on the row. After the refactor, description edits are tracked only inside the ColumnEditForm ref (hasDescriptionEditedRef) and are never synced back to editedDescription on the row state. This means if a user only edits the description (without changing display name or tags), the pending changes counter will show 0/N and the UI won't reflect that there are unsaved changes.

Additionally, if a user edits a description, changes their row selection, then re-selects the original row, the description edit is lost — the form remounts (due to key={drawerKey}) and hasDescriptionEditedRef resets to false. The old code persisted editedDescription to the row on every keystroke via onTextChange, so edits survived re-selection.

Bug: Display name not synced if user clicks Update without blurring

📄 openmetadata-ui/src/main/resources/ui/src/pages/ColumnBulkOperations/ColumnGrid/ColumnGrid.component.tsx:399-401 📄 openmetadata-ui/src/main/resources/ui/src/pages/ColumnBulkOperations/ColumnGrid/ColumnGrid.component.tsx:1498-1502 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/ColumnBulkOperations.spec.ts:546
The display name is only synced to the row state on onBlur (line 400). If the user types a display name and directly clicks the 'Update' button without first tabbing/clicking away from the input, the onBlur may not fire before handleBulkUpdate reads from columnEditFormRef. The code does read pendingDisplayName from the form ref (line 1491), so the value IS captured for the submit — but the row state won't reflect the edit for the pending changes counter check at line 1506 (row.editedDisplayName). If pendingDisplayName matches the original row.displayName, the row could be skipped.

The test at line 546 (await displayNameInput.blur()) suggests this was a known issue, but only the test was fixed, not the UX.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud
Copy link
Copy Markdown

@anuj-kumary anuj-kumary merged commit a15abd3 into main Apr 13, 2026
44 checks passed
@anuj-kumary anuj-kumary deleted the issue-#26927 branch April 13, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI: Column Bulk Operations > discrepancy when updating description for single column

2 participants