-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Components: Allow ExternalLink without icon #73459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Components: Allow ExternalLink without icon #73459
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a withoutIcon prop to the ExternalLink component, allowing developers to render external links without the visual external link icon (↗ or ↖) when it's not desired or appropriate for the design context.
- Added optional
withoutIconboolean prop to control icon visibility - Updated Storybook stories to demonstrate both default and without-icon variants
- Enhanced story template to show inline usage with surrounding text
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/components/src/external-link/types.ts | Added withoutIcon optional boolean prop definition with documentation |
| packages/components/src/external-link/index.tsx | Implemented conditional rendering of the external link icon based on the new prop |
| packages/components/src/external-link/stories/index.story.tsx | Updated story template to show inline usage and added WithoutIcon story variant |
| packages/components/CHANGELOG.md | Documented the enhancement in the changelog |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Addressed the concern raised by Copilot Screen.Recording.2025-11-20.at.1.03.05.PM.mov |
|
Flaky tests detected in 865a4c3. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/19529217855
|
|
As mentioned in the linked issue, this one is more like a convenience than a feature. |
What?
Closes #73458
Why?
As mentioned in the linked issue, sometimes we want to render the link in places where we don't need/want the icon to be shown. That use-case is not possible with the current version of the component.
How?
withoutIconto theExternalLinkcomponent to allow rendering the link without the iconTesting Instructions
npm run storybook:devwithoutIconprop to see the behaviorTesting Instructions for Keyboard
Screenshots or screencast