Skip to content

Commit

Permalink
ui: updated contact link
Browse files Browse the repository at this point in the history
  • Loading branch information
karolina-siemieniuk-morawska committed Sep 1, 2023
1 parent fd957b6 commit 9a510eb
Show file tree
Hide file tree
Showing 11 changed files with 69 additions and 41 deletions.
2 changes: 1 addition & 1 deletion e2e/cypress/e2e/claiming.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]'
'This paper cannot be claimed automatically. Please contact us'
);
});
});
Expand Down
10 changes: 8 additions & 2 deletions ui/src/authors/components/AssignNoProfileAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ import UserAction from '../../common/components/UserAction';

export const CLAIMING_DISABLED_INFO = (
<p>
There is no profile associated to your account. Please contact us at{' '}
<a href="mailto:[email protected]">[email protected]</a>
There is no profile associated to your account. Please{' '}
<a
href="https://help.inspirehep.net/knowledge-base/contact-us"
target="_blank"
rel="noreferrer"
>
contact us
</a>
</p>
);

Expand Down
16 changes: 9 additions & 7 deletions ui/src/authors/components/EditAuthorRecordAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -15,18 +13,22 @@ type EditAuthorRecordActionProps = {

const CAN_NOT_EDIT_AUTHOR_MESSAGE = (
<span>
Login to edit your profile. For any changes in other profiles, contact us at{' '}
<LinkWithTargetBlank href="mailto:[email protected]">
[email protected]
</LinkWithTargetBlank>
Login to edit your profile. For any changes in other profiles{' '}
<a
href="https://help.inspirehep.net/knowledge-base/contact-us"
target="_blank"
rel="noreferrer"
>
contact us
</a>
</span>
);

export default function EditAuthorRecordAction({
isCatalogerLoggedIn,
canEdit,
pidValue,
page
page,
}: EditAuthorRecordActionProps) {
return canEdit ? (
<EditRecordAction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ exports[`AssignNoProfileAction renders 1`] = `
<Tooltip
title={
<p>
There is no profile associated to your account. Please contact us at
There is no profile associated to your account. Please
<a
href="mailto:[email protected]"
href="https://help.inspirehep.net/knowledge-base/contact-us"
rel="noreferrer"
target="_blank"
>
[email protected]
contact us
</a>
</p>
}
Expand Down
33 changes: 21 additions & 12 deletions ui/src/common/components/UserFeedback/UserFeedback.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -24,7 +24,10 @@ class UserFeedback extends Component {
<div>Thank you for your response.</div>
<div>
For further feedback, please{' '}
<LinkWithTargetBlank href={SURVEY_LINK}>take our survey</LinkWithTargetBlank>.
<LinkWithTargetBlank href={SURVEY_LINK}>
take our survey
</LinkWithTargetBlank>
.
</div>
<div>It takes around 5 minutes to complete.</div>
</ModalSuccessResult>
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -110,10 +118,14 @@ class UserFeedback extends Component {
<LinkWithTargetBlank href={SURVEY_LINK}>
feedback form
</LinkWithTargetBlank>{' '}
or by email at{' '}
<LinkWithTargetBlank href={`mailto:${FEEDBACK_EMAIL}`}>
{FEEDBACK_EMAIL}
</LinkWithTargetBlank>
or
<a
href="https://help.inspirehep.net/knowledge-base/contact-us"
target="_blank"
rel="noreferrer"
>
contact us
</a>
.
</p>
</>
Expand Down Expand Up @@ -151,11 +163,8 @@ class UserFeedback extends Component {
}

render() {
const {
isModalVisible,
isFeedbackButtonVisible,
feedbackSubmitted,
} = this.state;
const { isModalVisible, isFeedbackButtonVisible, feedbackSubmitted } =
this.state;
const isTrackerBlocked = checkIsTrackerBlocked();
return (
<div className="__UserFeedback__">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,14 @@ exports[`UserFeedback renders when tracker is blocked 1`] = `
feedback form
</LinkWithTargetBlank>
or by email at
<LinkWithTargetBlank
as="a"
href="mailto:[email protected]"
or
<a
href="https://help.inspirehep.net/knowledge-base/contact-us"
rel="noreferrer"
target="_blank"
>
[email protected]
</LinkWithTargetBlank>
contact us
</a>
.
</p>
</React.Fragment>
Expand Down
1 change: 1 addition & 0 deletions ui/src/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)',
Expand Down
4 changes: 2 additions & 2 deletions ui/src/common/layouts/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { Row, Col } from 'antd';

import './Footer.less';
import {
FEEDBACK_EMAIL,
INSPIRE_TWITTER_ACCOUNT,
ABOUT_INSPIRE_URL,
CONTENT_POLICY_URL,
Expand All @@ -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';
Expand Down Expand Up @@ -117,7 +117,7 @@ const COLUMNS = [
},
{
title: 'Contact',
url: `mailto:${FEEDBACK_EMAIL}`,
url: CONTACT_URL,
openExternal: true,
},
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ exports[`Footer renders when cataloger 1`] = `
Object {
"openExternal": true,
"title": "Contact",
"url": "mailto:feedback@inspirehep.net",
"url": "https://help.inspirehep.net/knowledge-base/contact-us",
},
],
"title": "Community",
Expand Down Expand Up @@ -234,7 +234,7 @@ exports[`Footer renders when not cataloger 1`] = `
Object {
"openExternal": true,
"title": "Contact",
"url": "mailto:feedback@inspirehep.net",
"url": "https://help.inspirehep.net/knowledge-base/contact-us",
},
],
"title": "Community",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,14 @@ exports[`HeaderMenu renders when logged in 1`] = `
<Tooltip
title={
<p>
There is no profile associated to your account. Please contact us at
There is no profile associated to your account. Please
<a
href="mailto:[email protected]"
href="https://help.inspirehep.net/knowledge-base/contact-us"
rel="noreferrer"
target="_blank"
>
[email protected]
contact us
</a>
</p>
}
Expand Down
10 changes: 8 additions & 2 deletions ui/src/literature/assignNotification.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,14 @@ export function assignLiteratureItemError(key) {
message: 'Assignment Error!',
description: (
<span>
This paper cannot be claimed automatically. Please contact us at{' '}
<a href="mailto:[email protected]">[email protected]</a>
This paper cannot be claimed automatically. Please{' '}
<a
href="https://help.inspirehep.net/knowledge-base/contact-us"
target="_blank"
rel="noreferrer"
>
contact us
</a>
</span>
),
});
Expand Down

0 comments on commit 9a510eb

Please sign in to comment.