Skip to content

Commit

Permalink
feat: CQDG-703 rechange again savedSets savedFilters wording (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
atoulous authored Apr 29, 2024
1 parent 694c733 commit 802d75b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 47 deletions.
11 changes: 4 additions & 7 deletions src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1024,20 +1024,17 @@ const en = {
popoverTitle: 'Managing Saved Filters',
noSaved:
'A filter is a collection of queries applied to all harmonized CQDG data. The results of a filter may change over time as CQDG data is updated.',
noSaved2:
'Save and modify your filters using the buttons displayed above the query section at the top of the ',
howToCreate: 'How to create a filter',
},
savedSets: {
title: 'My Sets',
popoverTitle: 'Managing Saved Sets',
noSaved:
'A set is a collection of entity IDs (participants, biospecimens, files or variants). Saved sets do not change over time, unlike the results of filters which may change as data is updated in the CQDG.',
noSaved2:
'Save and modify your filters using the buttons displayed above the query section at the top of the ',
'A set is a fixed collection of entities (participants, biospecimens, files, or variants) which does not change even if CQDG data is updated.',
howToCreate: 'How to create a set',
},
lastSaved: 'Last saved: {date} ago',
and: ' and ',
pages: ' pages. ',
learnMore: 'Learn more',
},
},
variants: {
Expand Down
13 changes: 5 additions & 8 deletions src/locales/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1028,21 +1028,18 @@ const fr = {
title: 'Mes filtres',
popoverTitle: 'Gestions des filtres sauvegardés',
noSaved:
'Un filtre est un ensemble de requêtes appliquées sur toutes les données harmonisées du CQDG. Les résultats d’un filtre peuvent changer après une mise à jour des données du CQDG.',
noSaved2:
'Sauvegardez et modifiez vos filtres à l’aide des boutons affichés au-dessus de la section des requêtes en haut des pages ',
"Un filtre est un ensemble de requêtes appliquées sur les données harmonisées du CQDG. Les résultats d'un filtre peuvent changer lors d'une mise à jour des données.",
howToCreate: 'Comment créer un filtre',
},
savedSets: {
title: 'Mes ensembles',
popoverTitle: 'Gestion des ensembles sauvegardés',
noSaved:
'Un ensemble est une collection d’identifiants d’entités (participants, biospécimens, fichiers ou variants). Les ensembles sauvegardés ne changent pas avec le temps, contrairement aux résultats des filtres qui peuvent changer avec les mises à jour des données du CQDG.',
noSaved2:
'Sauvegardez et modifiez vos ensembles à l’aide du bouton « Sauvegarder la sélection » situé au-dessus des tableaux des résultats dans les pages ',
"Un ensemble est une collection fixe d'entités (participants, biospécimens, fichiers ou variants) qui demeure inchangé malgré la mise à jour des données.",
howToCreate: 'Comment créer un ensemble',
},
lastSaved: 'Dernier enregistrement : il y a {date}',
and: ' et ',
pages: '. ',
learnMore: 'En savoir plus',
},
},
variants: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import intl from 'react-intl-universal';
import { Link } from 'react-router-dom';
import { FileSearchOutlined } from '@ant-design/icons';
import Empty from '@ferlab/ui/core/components/Empty';
import ExternalLink from '@ferlab/ui/core/components/ExternalLink';
Expand All @@ -15,32 +14,24 @@ import LineStyleIcon from 'components/Icons/LineStyleIcon';
import { SavedFilterTag, TUserSavedFilter } from 'services/api/savedFilter/models';
import { SUPPORT_EMAIL } from 'store/report/thunks';
import { useSavedFilter } from 'store/savedFilter';
import { STATIC_ROUTES } from 'utils/routes';

import ListItem from './ListItem';

import styles from './index.module.scss';

const { Text } = Typography;

const Content = () => (
const Content = ({ linkText = '' }) => (
<Text>
{intl.get('screen.dashboard.cards.savedFilters.noSaved')}
<br />
<br />
{intl.get('screen.dashboard.cards.savedFilters.noSaved2')}
<Link to={`${STATIC_ROUTES.DATA_EXPLORATION}`}>{intl.get('screen.dataExploration.title')}</Link>
{intl.get('screen.dashboard.cards.and')}
<Link to={`${STATIC_ROUTES.VARIANTS}`}>{intl.get('screen.variants.title')}</Link>
{intl.get('screen.dashboard.cards.pages')}
<ExternalLink
className={styles.docExternalLink}
hasIcon
href={`${EnvVariables.configFor(
'CQDG_DOCUMENTATION',
)}/docs/fonctionnalités-générales-du-portail`}
href={`${EnvVariables.configFor('CQDG_DOCUMENTATION')}/docs/filtres`}
>
{intl.get('layout.main.menu.documentation')}
{linkText}
</ExternalLink>
</Text>
);
Expand Down Expand Up @@ -69,10 +60,11 @@ const getItemList = (
/>
) : (
<Empty
imageType="grid"
size="mini"
showImage={false}
// @ts-ignore cuz the type description is a string
description={<Content />}
description={
<Content linkText={intl.get('screen.dashboard.cards.savedFilters.howToCreate')} />
}
/>
),
}}
Expand Down Expand Up @@ -127,7 +119,7 @@ const SavedFilters = ({ id, key, className = '' }: DashboardCardProps) => {
withHandle
infoPopover={{
title: intl.get('screen.dashboard.cards.savedFilters.popoverTitle'),
content: <Content />,
content: <Content linkText={intl.get('screen.dashboard.cards.learnMore')} />,
}}
/>
}
Expand Down
24 changes: 8 additions & 16 deletions src/views/Dashboard/components/DashboardCards/SavedSets/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { ReactElement } from 'react';
import intl from 'react-intl-universal';
import { Link } from 'react-router-dom';
import { ExperimentOutlined, FileTextOutlined, UserOutlined } from '@ant-design/icons';
import Empty from '@ferlab/ui/core/components/Empty';
import ExternalLink from '@ferlab/ui/core/components/ExternalLink';
Expand All @@ -16,32 +15,24 @@ import LineStyleIcon from 'components/Icons/LineStyleIcon';
import { IUserSetOutput, SetType } from 'services/api/savedSet/models';
import { SUPPORT_EMAIL } from 'store/report/thunks';
import { useSavedSet } from 'store/savedSet';
import { STATIC_ROUTES } from 'utils/routes';

import ListItem from './ListItem';

import styles from './index.module.scss';

const { Text } = Typography;

const Content = () => (
const Content = ({ linkText = '' }) => (
<Text>
{intl.get('screen.dashboard.cards.savedSets.noSaved')}
<br />
<br />
{intl.get('screen.dashboard.cards.savedSets.noSaved2')}
<Link to={`${STATIC_ROUTES.DATA_EXPLORATION}`}>{intl.get('screen.dataExploration.title')}</Link>
{intl.get('screen.dashboard.cards.and')}
<Link to={`${STATIC_ROUTES.VARIANTS}`}>{intl.get('screen.variants.title')}</Link>
{intl.get('screen.dashboard.cards.pages')}
<ExternalLink
className={styles.docExternalLink}
hasIcon
href={`${EnvVariables.configFor(
'CQDG_DOCUMENTATION',
)}/docs/fonctionnalités-générales-du-portail`}
href={`${EnvVariables.configFor('CQDG_DOCUMENTATION')}/docs/filtres`}
>
{intl.get('layout.main.menu.documentation')}
{linkText}
</ExternalLink>
</Text>
);
Expand Down Expand Up @@ -72,10 +63,11 @@ const getItemList = (
/>
) : (
<Empty
imageType="grid"
size="mini"
showImage={false}
// @ts-ignore cuz the type description is a string
description={<Content />}
description={
<Content linkText={intl.get('screen.dashboard.cards.savedSets.howToCreate')} />
}
/>
),
}}
Expand Down Expand Up @@ -170,7 +162,7 @@ const SavedSets = ({ id, key, className = '' }: DashboardCardProps) => {
withHandle
infoPopover={{
title: intl.get('screen.dashboard.cards.savedSets.popoverTitle'),
content: <Content />,
content: <Content linkText={intl.get('screen.dashboard.cards.learnMore')} />,
}}
/>
}
Expand Down

0 comments on commit 802d75b

Please sign in to comment.