Repository navigation
fix(ui): open BlockEditor mention links with noopener - #38086
Conversation
❌ 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 |
Code Review ✅ Approved 🟡 Medium riskAdding noopener,noreferrer removes opener access for BlockEditor mention-link tabs, which may affect flows relying on that reference. Adds 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 |
|
🤖 Backport to |
|
🤖 Backport to |
(cherry picked from commit 5fd9b6c) Co-authored-by: Harsh Vador <[email protected]>
Describe your changes:
Fixes #38085
Clicking a mention or hashtag link in the BlockEditor opened it with
window.open(href, target), so the new tab kept awindow.openerreference to OpenMetadata. It now passes'noopener,noreferrer', the same as every otherwindow.opencall in the UI that opens a new tab.EditorSlots.tsx:openMentionLinkpasses'noopener,noreferrer'as the third argument towindow.open. The settings-modal case (getSettingsHashForHref) is unchanged.Type of change:
High-level design:
N/A, one-line change.
Tests:
Use cases covered
Unit tests
EditorSlots mention linkstoEditorSlots.test.tsx: a click on adata-type="mention"anchor callswindow.open(href, '_blank', 'noopener,noreferrer').jest src/components/BlockEditor/EditorSlots.test.tsx: 6 tests pass.EditorSlots.tsxreverted tomain, the new test fails.Backend integration tests
Playwright (UI) tests
Not run locally.
make playwright_affectedselects 21 specs and reports impact-map gaps forEditorSlots.tsx. They run in this PR's CI.🤖 Generated with Claude Code


Confidence Score: 5/5
This PR appears safe to merge.Summary
This PR isolates tabs opened from BlockEditor mentions and hashtags while preserving settings-modal links.
No actionable issues found. Tests were not run during this review.
Reviews (1) · Last reviewed commit: "fix(ui): open BlockEditor mention links ..." · Reviewed by Greptile