Skip to content
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

feat: website link component defaults target to _blank when the href is external #2038

Merged
merged 5 commits into from Oct 17, 2022

Conversation

gobengo
Copy link
Contributor

@gobengo gobengo commented Oct 17, 2022

Motivation:

How?

  • made it so the go-to website <Link /> component will enforce the logic @jchris requested

…is to an origin different than the current document
@gobengo gobengo linked an issue Oct 17, 2022 that may be closed by this pull request
3 tasks
@gobengo gobengo requested a review from alanshaw October 17, 2022 15:27
@github-actions
Copy link
Contributor

github-actions bot commented Oct 17, 2022

@gobengo gobengo self-assigned this Oct 17, 2022
@gobengo
Copy link
Contributor Author

gobengo commented Oct 17, 2022

I verified the desired behaviors on the preview link (i.e. ensuring that the footer links for 'Status' and 'Open an Issue' now open in a new tab for me because now they render with attr target=_blank)

@gobengo gobengo marked this pull request as ready for review October 17, 2022 15:30
Copy link
Contributor

@yusefnapora yusefnapora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me 👍

packages/website/components/link/link.js Outdated Show resolved Hide resolved
Co-authored-by: Yusef Napora <yusef@napora.org>
@gobengo gobengo merged commit 947e764 into main Oct 17, 2022
@gobengo gobengo deleted the 2006-off-site-links-should-open-in-new-tabs branch October 17, 2022 18:02
gobengo pushed a commit that referenced this pull request Oct 18, 2022
🤖 I have created a release *beep* *boop*
---


##
[2.28.0](website-v2.27.0...website-v2.28.0)
(2022-10-18)


### Features

* add css only logo carousel
([#2022](#2022))
([5d96ddc](5d96ddc))
* update testimonials
([#2032](#2032))
([c8d9299](c8d9299))
* website link component defaults target to _blank when the href is
external
([#2038](#2038))
([947e764](947e764))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

off-site links should open in new tabs
2 participants