Skip to content

Commit

Permalink
fix(variants): SKFP-836 shared filter
Browse files Browse the repository at this point in the history
  • Loading branch information
GaelleA committed Nov 1, 2023
1 parent afbba82 commit df47b76
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 18 deletions.
5 changes: 3 additions & 2 deletions src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,8 @@ const en = {
lastSaved: 'Last saved: {date} ago',
infoPopover: {
content:
'A saved filter is a virtual query created by applying one or more filters to a search query. They can be saved and revisited for later use without having to manually reselect filters in the sidebar. You can create saved filters using the Query Management tool above the table of results in the',
'A saved filter is a virtual query created by applying one or more filters to a data set. They can be saved and revisited for later use. You can create and manage saved filters from the query builder at the top of the <a href="{dataExploHref}" style="text-decoration: underline;">Data Exploration</a> and <a href="{variantsHref}" style="text-decoration: underline;">Variants</a> pages.',

title: 'Managing Saved Filters',
},
},
Expand All @@ -630,7 +631,7 @@ const en = {
lastSaved: 'Last saved: {date} ago',
infoPopover: {
content:
'A saved set is a set of one or more entity IDs that can be saved and revisited for later use without having to manually reselect entity IDs. You can create Participant, Biospecimen, and File saved sets at the top of the table of results in the',
'A saved set is a collection of one or more entity IDs which can be saved and revisited for later use. You can create saved sets at the top of the table of results in the <a href="{dataExploHref}" style="text-decoration: underline;">Data Exploration</a> and <a href="{variantsHref}" style="text-decoration: underline;">Variants</a> pages.',
title: 'Managing Saved Sets',
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import CardHeader from 'views/Dashboard/components/CardHeader';
import { DashboardCardProps } from 'views/Dashboard/components/DashboardCards';

import LineStyleIcon from 'components/Icons/LineStyleIcon';
import PopoverContentLink from 'components/uiKit/PopoverContentLink';
import { SavedFilterTag, TUserSavedFilter } from 'services/api/savedFilter/models';
import { SUPPORT_EMAIL } from 'store/report/thunks';
import { useSavedFilter } from 'store/savedFilter';
Expand Down Expand Up @@ -84,12 +83,10 @@ const SavedFilters = ({ id, key, className = '' }: DashboardCardProps) => {
title: intl.get('screen.dashboard.cards.savedFilters.infoPopover.title'),
content: (
<Text>
{intl.get('screen.dashboard.cards.savedFilters.infoPopover.content')}{' '}
<PopoverContentLink
to={STATIC_ROUTES.DATA_EXPLORATION_PARTICIPANTS}
title="Data Exploration page"
/>
{'.'}
{intl.getHTML('screen.dashboard.cards.savedFilters.infoPopover.content', {
dataExploHref: STATIC_ROUTES.DATA_EXPLORATION,
variantsHref: STATIC_ROUTES.VARIANTS,
})}
</Text>
),
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ import CardErrorPlaceholder from 'views/Dashboard/components/CardErrorPlaceHolde
import CardHeader from 'views/Dashboard/components/CardHeader';
import { DashboardCardProps } from 'views/Dashboard/components/DashboardCards';
import { DATA_EXPLORATION_QB_ID } from 'views/DataExploration/utils/constant';
import { VARIANT_REPO_QB_ID } from '../../../../Variants/utils/constants';

import LineStyleIcon from 'components/Icons/LineStyleIcon';
import PopoverContentLink from 'components/uiKit/PopoverContentLink';
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 { VARIANT_REPO_QB_ID } from '../../../../Variants/utils/constants';

import ListItem from './ListItem';

import styles from './index.module.scss';
Expand Down Expand Up @@ -81,12 +81,10 @@ const SavedSets = ({ id, key, className = '' }: DashboardCardProps) => {
title: intl.get('screen.dashboard.cards.savedSets.infoPopover.title'),
content: (
<Text>
{intl.get('screen.dashboard.cards.savedSets.infoPopover.content')}{' '}
<PopoverContentLink
to={STATIC_ROUTES.DATA_EXPLORATION_PARTICIPANTS}
title="Data Exploration page"
/>
.
{intl.getHTML('screen.dashboard.cards.savedSets.infoPopover.content', {
dataExploHref: STATIC_ROUTES.DATA_EXPLORATION,
variantsHref: STATIC_ROUTES.VARIANTS,
})}
</Text>
),
}}
Expand Down
4 changes: 3 additions & 1 deletion src/views/Variants/utils/constants.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { SortDirection } from '@ferlab/ui/core/graphql/constants';
import { IQueryConfig, ISort } from '@ferlab/ui/core/graphql/types';

import { SavedFilterTag } from 'services/api/savedFilter/models';

export const VARIANT_SAVED_SETS_FIELD = 'locus';

export const SCROLL_WRAPPER_ID = 'variants-scroll-wrapper';

export const VARIANT_REPO_QB_ID = 'variant-repo-key';

export const VARIANT_FILTER_TAG = 'variants';
export const VARIANT_FILTER_TAG = SavedFilterTag.VariantsExplorationPage;

export const DEFAULT_OFFSET = 0;
export const DEFAULT_PAGE_INDEX = 1;
Expand Down

0 comments on commit df47b76

Please sign in to comment.