From b22466f7762f06702a3822f715696bb5b2a8eb47 Mon Sep 17 00:00:00 2001
From: Jimmy Domagala-Tang
Date: Mon, 5 Feb 2024 10:24:01 -0500
Subject: [PATCH] Merge pull request #16874 from
overleaf/jdt-me-learn-links-new-tab
Learn wiki links should open in new tab
GitOrigin-RevId: 7e87feff971bc2c28d0e0bac85e0e20ef139e321
---
.../views/_mixins/reconfirm_affiliation-marketing.pug | 2 +-
.../members-table/offboard-managed-user-modal.tsx | 2 +-
.../groups/affiliation/reconfirm-affiliation.tsx | 5 ++++-
.../components/notifications/groups/common.tsx | 10 ++++++++--
.../components/notifications/groups/institution.tsx | 6 +++++-
.../welcome-message-new/welcome-message-link.tsx | 4 ++++
.../project-list/components/welcome-message.tsx | 1 +
.../js/features/settings/components/emails-section.tsx | 5 ++++-
.../reconfirmation-info/reconfirmation-info-prompt.tsx | 5 ++++-
.../js/features/settings/components/emails/row.tsx | 2 +-
.../settings/components/managed-account-alert.tsx | 6 +++++-
.../subscription/components/dashboard/free-plan.tsx | 2 +-
12 files changed, 39 insertions(+), 11 deletions(-)
diff --git a/services/web/app/views/_mixins/reconfirm_affiliation-marketing.pug b/services/web/app/views/_mixins/reconfirm_affiliation-marketing.pug
index 2795039b8c..c42a3b439a 100644
--- a/services/web/app/views/_mixins/reconfirm_affiliation-marketing.pug
+++ b/services/web/app/views/_mixins/reconfirm_affiliation-marketing.pug
@@ -39,7 +39,7 @@ mixin reconfirmAffiliationNotification-marketing(userEmail, location)
| !{translate("please_reconfirm_institutional_email", {}, [{name: 'a', attrs: {href: '/user/settings?remove=' + userEmail.email}}])}
|
- a(href="/learn/how-to/Institutional_Email_Reconfirmation") #{translate("learn_more")}
+ a(href="/learn/how-to/Institutional_Email_Reconfirmation" target="_blank") #{translate("learn_more")}
div(hidden data-ol-sent)
| !{translate("please_check_your_inbox_to_confirm", {institutionName: userEmail.affiliation.institution.name}, ['strong'])}
diff --git a/services/web/frontend/js/features/group-management/components/members-table/offboard-managed-user-modal.tsx b/services/web/frontend/js/features/group-management/components/members-table/offboard-managed-user-modal.tsx
index 2d881b9f79..1088912c8d 100644
--- a/services/web/frontend/js/features/group-management/components/members-table/offboard-managed-user-modal.tsx
+++ b/services/web/frontend/js/features/group-management/components/members-table/offboard-managed-user-modal.tsx
@@ -89,7 +89,7 @@ export default function OffboardManagedUserModal({
{t('this_action_cannot_be_reversed')}
-
+
{t('learn_more_about_managed_users')}
diff --git a/services/web/frontend/js/features/project-list/components/notifications/groups/affiliation/reconfirm-affiliation.tsx b/services/web/frontend/js/features/project-list/components/notifications/groups/affiliation/reconfirm-affiliation.tsx
index 65ffeb0f07..ea4a4c7f8d 100644
--- a/services/web/frontend/js/features/project-list/components/notifications/groups/affiliation/reconfirm-affiliation.tsx
+++ b/services/web/frontend/js/features/project-list/components/notifications/groups/affiliation/reconfirm-affiliation.tsx
@@ -129,7 +129,10 @@ function ReconfirmAffiliation({
components={[]}
/>
-
+
{t('learn_more')}
{isError && (
diff --git a/services/web/frontend/js/features/project-list/components/notifications/groups/common.tsx b/services/web/frontend/js/features/project-list/components/notifications/groups/common.tsx
index b00badea5b..7f46a0fbd6 100644
--- a/services/web/frontend/js/features/project-list/components/notifications/groups/common.tsx
+++ b/services/web/frontend/js/features/project-list/components/notifications/groups/common.tsx
@@ -262,7 +262,10 @@ function CommonNotification({ notification }: CommonNotificationProps) {
i18nKey="dropbox_duplicate_project_names_suggestion"
components={[]} // eslint-disable-line react/jsx-key
/>{' '}
-
+
{t('learn_more')}
.
@@ -290,7 +293,10 @@ function CommonNotification({ notification }: CommonNotificationProps) {
) : (
t('confirm_affiliation_to_relink_dropbox')
)}{' '}
-
+
{t('learn_more')}
>
diff --git a/services/web/frontend/js/features/project-list/components/notifications/groups/institution.tsx b/services/web/frontend/js/features/project-list/components/notifications/groups/institution.tsx
index 2bd02981ba..aae8cadb0f 100644
--- a/services/web/frontend/js/features/project-list/components/notifications/groups/institution.tsx
+++ b/services/web/frontend/js/features/project-list/components/notifications/groups/institution.tsx
@@ -67,7 +67,10 @@ function Institution() {
shouldUnescape
tOptions={{ interpolation: { escapeValue: true } }}
/>{' '}
-
+
{t('learn_more')}
@@ -152,6 +155,7 @@ function Institution() {
className={newNotificationStyle ? 'btn-secondary' : ''}
bsSize="sm"
href="/learn/how-to/Institutional_Login"
+ target="_blank"
>
{t('find_out_more')}
diff --git a/services/web/frontend/js/features/project-list/components/welcome-message-new/welcome-message-link.tsx b/services/web/frontend/js/features/project-list/components/welcome-message-new/welcome-message-link.tsx
index 17e0d29dd2..2a019185fe 100644
--- a/services/web/frontend/js/features/project-list/components/welcome-message-new/welcome-message-link.tsx
+++ b/services/web/frontend/js/features/project-list/components/welcome-message-new/welcome-message-link.tsx
@@ -2,6 +2,7 @@ type WelcomeMessageLinkProps = {
imgSrc: string
title: string
href: string
+ target?: string
onClick?: () => void
}
@@ -9,6 +10,7 @@ export default function WelcomeMessageLink({
imgSrc,
title,
href,
+ target,
onClick,
}: WelcomeMessageLinkProps) {
return (
@@ -16,6 +18,8 @@ export default function WelcomeMessageLink({
href={href}
onClick={onClick}
className="card welcome-message-card welcome-message-card-link"
+ target={target || undefined}
+ rel="noopener"
>
{title}
,
// eslint-disable-next-line jsx-a11y/anchor-has-content, react/jsx-key
- ,
+ ,
]}
/>
diff --git a/services/web/frontend/js/features/settings/components/emails/reconfirmation-info/reconfirmation-info-prompt.tsx b/services/web/frontend/js/features/settings/components/emails/reconfirmation-info/reconfirmation-info-prompt.tsx
index 08e376f90a..761bc4ae1b 100644
--- a/services/web/frontend/js/features/settings/components/emails/reconfirmation-info/reconfirmation-info-prompt.tsx
+++ b/services/web/frontend/js/features/settings/components/emails/reconfirmation-info/reconfirmation-info-prompt.tsx
@@ -171,7 +171,10 @@ function ReconfirmationInfoPromptText({
[]
}
/>{' '}
-
+
{t('learn_more')}
diff --git a/services/web/frontend/js/features/settings/components/emails/row.tsx b/services/web/frontend/js/features/settings/components/emails/row.tsx
index f7749c0345..42fd634bb0 100644
--- a/services/web/frontend/js/features/settings/components/emails/row.tsx
+++ b/services/web/frontend/js/features/settings/components/emails/row.tsx
@@ -138,7 +138,7 @@ function SSOAffiliationInfo({ userEmailData }: SSOAffiliationInfoProps) {
[]
}
/>{' '}
-
+
{t('find_out_more_about_institution_login')}
diff --git a/services/web/frontend/js/features/settings/components/managed-account-alert.tsx b/services/web/frontend/js/features/settings/components/managed-account-alert.tsx
index a29407caa6..c77018cee0 100644
--- a/services/web/frontend/js/features/settings/components/managed-account-alert.tsx
+++ b/services/web/frontend/js/features/settings/components/managed-account-alert.tsx
@@ -30,7 +30,11 @@ export default function ManagedAccountAlert() {
, // eslint-disable-line jsx-a11y/anchor-has-content, react/jsx-key
+ // eslint-disable-next-line jsx-a11y/anchor-has-content, react/jsx-key
+ ,
]}
/>
diff --git a/services/web/frontend/js/features/subscription/components/dashboard/free-plan.tsx b/services/web/frontend/js/features/subscription/components/dashboard/free-plan.tsx
index e5883ee100..4a784343d9 100644
--- a/services/web/frontend/js/features/subscription/components/dashboard/free-plan.tsx
+++ b/services/web/frontend/js/features/subscription/components/dashboard/free-plan.tsx
@@ -9,7 +9,7 @@ function FreePlan() {
i18nKey="on_free_plan_upgrade_to_access_features"
components={[
// eslint-disable-next-line react/jsx-key, jsx-a11y/anchor-has-content
- ,
+ ,
]}
/>
: