Repository navigation
Feature / add link target support - #49
Merged
Merged
Conversation
- Introduced a new boolean attribute `targetBlank` to control link opening behavior. - Updated the Edit component to manage the new `targetBlank` attribute. - Enhanced the link URL popover with a toggle for opening links in a new tab.
- Implemented tests to verify that the `targetBlank` attribute correctly adds `target` and `rel` attributes to links. - Added tests to ensure links without `targetBlank` do not include these attributes and that no link is produced when no URL is provided.
asadowski10
approved these changes
Sep 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
targetBlankblock attribute (defaultfalse) and an "Open in a new tab" toggle in the link URL popover.target="_blank"withrel="noopener noreferrer"on the front end when enabled.targetBlankon remove.targetBlankbehavior with PHPUnit cases inBlockRendererTest.Test plan
target="_blank"andrel="noopener noreferrer"targetnorreltargetBlank<a>is rendered even iftargetBlankis truecomposer test/ PHPUnit and confirm the newBlockRendererTestcases passNote
Low Risk
Scoped to icon link rendering and editor UX; uses standard
rel="noopener noreferrer"for external targets with existing URL escaping unchanged.Overview
Adds optional open in a new tab for icon block links via a new
targetBlankattribute (defaultfalse).Editors get an Open in a new tab toggle in the link URL popover; when enabled, front-end markup includes
target="_blank"andrel="noopener noreferrer". Link toolbar behavior changes when a URL is set: separate Edit link and Remove link actions, and removing a link clears bothurlandtargetBlank. The popover layout is restyled so the URL row and toggle stack cleanly.PHPUnit coverage asserts when
target/relappear or stay absent, including the case wheretargetBlankis true without a URL (no anchor rendered).Reviewed by Cursor Bugbot for commit 5daa80b. Bugbot is set up for automated code reviews on this repo. Configure here.