Skip to content
This repository has been archived by the owner on Oct 4, 2022. It is now read-only.

Let makeOutboundLink handle rel attribute automatically #9

Merged
merged 4 commits into from
Apr 24, 2019

Conversation

afercia
Copy link
Contributor

@afercia afercia commented Mar 8, 2019

Supersedes Yoast/yoast-components#829

Summary

This PR can be summarized in the following changelog entry:

  • [components, algolia-searchbox, configuration-wizard, helpers, yoast-components] Improve handling of the rel attribute for links that open in a new browser's tab

Relevant technical choices:

  • tests for links that point to Yoast to handle the rel attribute automatically
  • removes the explicitly passed props rel={ null } as they're no longer necessary
  • uses makeOutboundLink instead of hardcoded links where necessary
  • fixes a prop type

As per Yoast/wordpress-seo#4605 (comment), the desired behavior is:

  • use noopener for all the non-yoast.com external links
  • omit it for the yoast.com links (including shortened links)

Test instructions

This PR can be tested by following these steps:

  • go in the standalone app > "Components" tab
  • in the section "Outbound links" there are a few link examples
  • check the output is the expected one
  • optionally: check links in components that use makeOutboundLink e.g.:
    • the links in the Dashboard Widget
    • the change language link in content analysis
    • the link in the Checkbox (standalone app "UI controls" tab)

UI changes

  • This PR changes the UI in the plugin. I have added the 'UI change' label to this PR.

Fixes Yoast/yoast-components#828

diedexx pushed a commit that referenced this pull request Mar 11, 2019
@johannadevos
Copy link
Contributor

@afercia Unfortunately this one has lots of merge conflicts also... Could you please resolve them before we move on to code review?

@afercia
Copy link
Contributor Author

afercia commented Apr 18, 2019

Solved merge conflicts. This was a bit complicated 😄

@hwinne
Copy link
Contributor

hwinne commented Apr 19, 2019

CR done 👍

@igorschoester
Copy link
Member

Acceptance ✅

@igorschoester igorschoester merged commit c810c56 into develop Apr 24, 2019
@igorschoester igorschoester deleted the 828-automate-make-outbound-link-rel-attribute branch April 24, 2019 12:46
@igorschoester igorschoester added this to the 11.2/yoastseo milestone Apr 24, 2019
@afercia afercia mentioned this pull request Apr 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automate makeOutboundLink rel attribute handling
5 participants