Fixes #26424: prevent table text selection turn white & anchor table actions to active cell#27225
Conversation
Signed-off-by: hassaansaleem28 <[email protected]>
|
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! |
|
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! |
There was a problem hiding this comment.
Pull request overview
This PR addresses two UX regressions in the Block Editor’s table experience: selected text in table descriptions becoming unreadable during selection, and table row/column actions being difficult to access when working in the middle of large tables.
Changes:
- Adjusts table menu positioning logic to anchor actions to the active cell (or selected-cell bounding area) instead of the full table wrapper.
- Adds unit tests to validate the new anchoring behavior and its fallbacks.
- Updates table selection styling to keep selected text readable inside table content.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/TableMenu/TableMenu.tsx |
Anchors the table actions popup to the clicked cell / selected cells area via a dynamic getReferenceClientRect. |
openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/TableMenu/TableMenu.test.tsx |
Adds regression tests verifying anchoring to cell, selected-cells bounding rect, and wrapper fallback. |
openmetadata-ui/src/main/resources/ui/src/components/BlockEditor/block-editor.less |
Ensures table text selection color stays readable within .tableWrapper. |
|
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! |
Signed-off-by: hassaansaleem28 <[email protected]>
Signed-off-by: hassaansaleem28 <[email protected]>
Code Review ✅ Approved 4 resolved / 4 findingsPrevents text selection issues and anchors table actions to the active cell. Redundant DOM traversal, merge conflicts, CSP nonce removal, and unsafe innerHTML injection have been resolved. ✅ 4 resolved✅ Quality: Redundant
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Gitar
|
|
Hi @ShaileshParmar11, I have now updated the PR. All changes addressed and all tests are passing. Let me know if further changes are required! |



Describe your changes:
Fixes #26424
I worked on issue #26424 that reported two UX problems:
What and Why I changed :
block-editor.lessso selected text remains readable.TableMenu.tsxso actions are accessible where the user is working.TableMenu.test.tsxfor testing.BEFORE :
Screencast from 2026-04-09 22-46-23.webm (Desc text turns white on selecting & menu for row/col doesn't appear in mid of table)
AFTER :
Screencast from 2026-04-17 06-06-02.webm(Text doesn't turn white & menu for row/col appears in middle of table also as expected)
Type of change:
Checklist:
Fixes #26424: prevent table text selection turn white & anchor table actions to active cellI have added a test that covers the exact scenario we are fixing. For complex issues, comment the issue number in the test for future reference.
I have added tests around the new logic.