From aaa70fd3123b8bbfe28f03eff7ab3732bb95ae95 Mon Sep 17 00:00:00 2001
From: karolina-siemieniuk-morawska
Date: Thu, 24 Aug 2023 09:30:41 +0200
Subject: [PATCH] ui: updated contact link
* ref: cern-sis/issues-inspire#362
---
e2e/cypress/e2e/claiming.test.js | 2 +-
.../components/AssignNoProfileAction.tsx | 6 ++--
.../components/EditAuthorRecordAction.tsx | 12 ++++----
.../AssignNoProfileAction.test.jsx.snap | 6 ++--
.../components/UserFeedback/UserFeedback.jsx | 29 +++++++++++--------
.../__snapshots__/UserFeedback.test.jsx.snap | 12 ++++----
ui/src/common/constants.ts | 1 +
ui/src/common/layouts/Footer/Footer.tsx | 4 +--
.../__snapshots__/Footer.test.jsx.snap | 4 +--
.../__snapshots__/HeaderMenu.test.jsx.snap | 6 ++--
ui/src/literature/assignNotification.jsx | 6 ++--
11 files changed, 47 insertions(+), 41 deletions(-)
diff --git a/e2e/cypress/e2e/claiming.test.js b/e2e/cypress/e2e/claiming.test.js
index 7d25883696..301583df16 100644
--- a/e2e/cypress/e2e/claiming.test.js
+++ b/e2e/cypress/e2e/claiming.test.js
@@ -518,7 +518,7 @@ describe('Literature collection', () => {
);
cy.get('.ant-notification-notice-description').should(
'have.text',
- 'This paper cannot be claimed automatically. Please contact us at authors@inspirehep.net'
+ 'This paper cannot be claimed automatically. Please contact us'
);
});
});
diff --git a/ui/src/authors/components/AssignNoProfileAction.tsx b/ui/src/authors/components/AssignNoProfileAction.tsx
index 760a476bd9..e94d85c490 100644
--- a/ui/src/authors/components/AssignNoProfileAction.tsx
+++ b/ui/src/authors/components/AssignNoProfileAction.tsx
@@ -8,8 +8,10 @@ import UserAction from '../../common/components/UserAction';
export const CLAIMING_DISABLED_INFO = (
- There is no profile associated to your account. Please contact us at{' '}
- authors@inspirehep.net
+ There is no profile associated to your account. Please{' '}
+
+ contact us
+
);
diff --git a/ui/src/authors/components/EditAuthorRecordAction.tsx b/ui/src/authors/components/EditAuthorRecordAction.tsx
index 733a2c2027..17282bb5b4 100644
--- a/ui/src/authors/components/EditAuthorRecordAction.tsx
+++ b/ui/src/authors/components/EditAuthorRecordAction.tsx
@@ -2,10 +2,8 @@ import React from 'react';
import DisabledEditRecordAction from '../../common/components/DisabledEditRecordAction';
import EditRecordAction from '../../common/components/EditRecordAction';
-import LinkWithTargetBlank from '../../common/components/LinkWithTargetBlank';
import { PidValue } from '../../types';
-
type EditAuthorRecordActionProps = {
isCatalogerLoggedIn: boolean;
canEdit: boolean;
@@ -15,10 +13,10 @@ type EditAuthorRecordActionProps = {
const CAN_NOT_EDIT_AUTHOR_MESSAGE = (
- Login to edit your profile. For any changes in other profiles, contact us at{' '}
-
- authors@inspirehep.net
-
+ Login to edit your profile. For any changes in other profiles{' '}
+
+ contact us
+
);
@@ -26,7 +24,7 @@ export default function EditAuthorRecordAction({
isCatalogerLoggedIn,
canEdit,
pidValue,
- page
+ page,
}: EditAuthorRecordActionProps) {
return canEdit ? (
- There is no profile associated to your account. Please contact us at
+ There is no profile associated to your account. Please
- authors@inspirehep.net
+ contact us
}
diff --git a/ui/src/common/components/UserFeedback/UserFeedback.jsx b/ui/src/common/components/UserFeedback/UserFeedback.jsx
index 95c011592e..ff42368b73 100644
--- a/ui/src/common/components/UserFeedback/UserFeedback.jsx
+++ b/ui/src/common/components/UserFeedback/UserFeedback.jsx
@@ -7,7 +7,7 @@ import { trackEvent, checkIsTrackerBlocked } from '../../../tracker';
import LinkWithTargetBlank from '../LinkWithTargetBlank';
import ResponsiveView from '../ResponsiveView';
import ModalSuccessResult from '../ModalSuccessResult';
-import { SURVEY_LINK, FEEDBACK_EMAIL } from '../../constants';
+import { SURVEY_LINK } from '../../constants';
const RATE_DESCRIPTIONS = [
'poor',
@@ -24,7 +24,10 @@ class UserFeedback extends Component {
Thank you for your response.
For further feedback, please{' '}
- take our survey.
+
+ take our survey
+
+ .
It takes around 5 minutes to complete.
@@ -65,7 +68,12 @@ class UserFeedback extends Component {
onFeedbackSubmit() {
const { rateValue, commentValue } = this.state;
- trackEvent('Feedback modal', 'Feedback submission', `Feedback comment: ${commentValue}`, rateValue);
+ trackEvent(
+ 'Feedback modal',
+ 'Feedback submission',
+ `Feedback comment: ${commentValue}`,
+ rateValue
+ );
this.setState({
rateValue: 0,
commentValue: null,
@@ -110,10 +118,10 @@ class UserFeedback extends Component {
feedback form
{' '}
- or by email at{' '}
-
- {FEEDBACK_EMAIL}
-
+ or
+
+ contact us
+
.
>
@@ -151,11 +159,8 @@ class UserFeedback extends Component {
}
render() {
- const {
- isModalVisible,
- isFeedbackButtonVisible,
- feedbackSubmitted,
- } = this.state;
+ const { isModalVisible, isFeedbackButtonVisible, feedbackSubmitted } =
+ this.state;
const isTrackerBlocked = checkIsTrackerBlocked();
return (
diff --git a/ui/src/common/components/UserFeedback/__tests__/__snapshots__/UserFeedback.test.jsx.snap b/ui/src/common/components/UserFeedback/__tests__/__snapshots__/UserFeedback.test.jsx.snap
index 09b302bca2..14462c0d01 100644
--- a/ui/src/common/components/UserFeedback/__tests__/__snapshots__/UserFeedback.test.jsx.snap
+++ b/ui/src/common/components/UserFeedback/__tests__/__snapshots__/UserFeedback.test.jsx.snap
@@ -169,14 +169,12 @@ exports[`UserFeedback renders when tracker is blocked 1`] = `
feedback form
- or by email at
-
-
- feedback@inspirehep.net
-
+ contact us
+
.
diff --git a/ui/src/common/constants.ts b/ui/src/common/constants.ts
index c306a65553..fdf5e8a93f 100644
--- a/ui/src/common/constants.ts
+++ b/ui/src/common/constants.ts
@@ -4,6 +4,7 @@ export const PUBLISHED_BAR_TYPE = 'published';
export const CITEABLE_BAR_TYPE = 'citeable';
export const POST_DOC_RANK_VALUE = 'POSTDOC';
+export const CONTACT_URL = "https://help.inspirehep.net/knowledge-base/contact-us"
export const RANK_VALUE_TO_DISPLAY = {
SENIOR: 'Senior (permanent)',
JUNIOR: 'Junior (leads to Senior)',
diff --git a/ui/src/common/layouts/Footer/Footer.tsx b/ui/src/common/layouts/Footer/Footer.tsx
index b007b90a9e..54104630e9 100644
--- a/ui/src/common/layouts/Footer/Footer.tsx
+++ b/ui/src/common/layouts/Footer/Footer.tsx
@@ -5,7 +5,6 @@ import { Row, Col } from 'antd';
import './Footer.less';
import {
- FEEDBACK_EMAIL,
INSPIRE_TWITTER_ACCOUNT,
ABOUT_INSPIRE_URL,
CONTENT_POLICY_URL,
@@ -18,6 +17,7 @@ import {
AUTHORLIST_TOOL_URL,
INVENIO_URL,
REPORT_METADATA_URL,
+ CONTACT_URL
} from '../../constants';
import LinkWithTargetBlank from '../../components/LinkWithTargetBlank';
import { BIBLIOGRAPHY_GENERATOR } from '../../routes';
@@ -117,7 +117,7 @@ const COLUMNS = [
},
{
title: 'Contact',
- url: `mailto:${FEEDBACK_EMAIL}`,
+ url: CONTACT_URL,
openExternal: true,
},
],
diff --git a/ui/src/common/layouts/Footer/__tests__/__snapshots__/Footer.test.jsx.snap b/ui/src/common/layouts/Footer/__tests__/__snapshots__/Footer.test.jsx.snap
index e026ff8e58..e3bf7d484d 100644
--- a/ui/src/common/layouts/Footer/__tests__/__snapshots__/Footer.test.jsx.snap
+++ b/ui/src/common/layouts/Footer/__tests__/__snapshots__/Footer.test.jsx.snap
@@ -118,7 +118,7 @@ exports[`Footer renders when cataloger 1`] = `
Object {
"openExternal": true,
"title": "Contact",
- "url": "mailto:feedback@inspirehep.net",
+ "url": undefined,
},
],
"title": "Community",
@@ -234,7 +234,7 @@ exports[`Footer renders when not cataloger 1`] = `
Object {
"openExternal": true,
"title": "Contact",
- "url": "mailto:feedback@inspirehep.net",
+ "url": undefined,
},
],
"title": "Community",
diff --git a/ui/src/common/layouts/Header/__tests__/__snapshots__/HeaderMenu.test.jsx.snap b/ui/src/common/layouts/Header/__tests__/__snapshots__/HeaderMenu.test.jsx.snap
index fc945e1871..0b88266c62 100644
--- a/ui/src/common/layouts/Header/__tests__/__snapshots__/HeaderMenu.test.jsx.snap
+++ b/ui/src/common/layouts/Header/__tests__/__snapshots__/HeaderMenu.test.jsx.snap
@@ -125,12 +125,12 @@ exports[`HeaderMenu renders when logged in 1`] = `
- There is no profile associated to your account. Please contact us at
+ There is no profile associated to your account. Please
- authors@inspirehep.net
+ contact us
}
diff --git a/ui/src/literature/assignNotification.jsx b/ui/src/literature/assignNotification.jsx
index e1a6e931a5..a697f1db2f 100644
--- a/ui/src/literature/assignNotification.jsx
+++ b/ui/src/literature/assignNotification.jsx
@@ -81,8 +81,10 @@ export function assignLiteratureItemError(key) {
message: 'Assignment Error!',
description: (
- This paper cannot be claimed automatically. Please contact us at{' '}
- authors@inspirehep.net
+ This paper cannot be claimed automatically. Please{' '}
+
+ contact us
+
),
});