diff --git a/CHANGELOG-minor-group-updates.md b/CHANGELOG-minor-group-updates.md new file mode 100644 index 0000000000..ca38790939 --- /dev/null +++ b/CHANGELOG-minor-group-updates.md @@ -0,0 +1,3 @@ +- Label centrally processed dataset groups as HIVE in the helper panel. +- Fix typo in publication collections summary. +- Add group name to raw dataset summary section. \ No newline at end of file diff --git a/context/app/static/js/components/detailPage/ProcessedData/HelperPanel/HelperPanel.tsx b/context/app/static/js/components/detailPage/ProcessedData/HelperPanel/HelperPanel.tsx index 437e3fc044..df446dc301 100644 --- a/context/app/static/js/components/detailPage/ProcessedData/HelperPanel/HelperPanel.tsx +++ b/context/app/static/js/components/detailPage/ProcessedData/HelperPanel/HelperPanel.tsx @@ -14,6 +14,7 @@ import { LineClampWithTooltip } from 'js/shared-styles/text'; import { SecondaryBackgroundTooltip } from 'js/shared-styles/tooltips'; import { formatDate } from 'date-fns/format'; +import ProcessedDataGroup from 'js/components/detailPage/ProcessedData/ProcessedDatasetGroup'; import { HelperPanelPortal } from '../../DetailLayout/DetailLayout'; import StatusIcon from '../../StatusIcon'; import { getDateLabelAndValue, useCurrentDataset } from '../../utils'; @@ -68,22 +69,24 @@ function HelperPanelBody() { return null; } const [dateLabel, date] = getDateLabelAndValue(currentDataset); + + const { title, description, pipeline, assay_display_name, creation_action, group_name } = currentDataset; return ( <> - {currentDataset.title && ( + {title && ( - {currentDataset.title} + {title} )} - {currentDataset.description && ( + {description && ( - {currentDataset.description} + {description} )} - - {currentDataset.pipeline ?? currentDataset.assay_display_name[0]} + {pipeline ?? assay_display_name[0]} + + - {currentDataset.group_name} {date && formatDate(date, 'yyyy-MM-dd')} ); diff --git a/context/app/static/js/components/detailPage/ProcessedData/ProcessedDataset/ProcessedDataset.tsx b/context/app/static/js/components/detailPage/ProcessedData/ProcessedDataset/ProcessedDataset.tsx index e324ed13b4..80fa75a380 100644 --- a/context/app/static/js/components/detailPage/ProcessedData/ProcessedDataset/ProcessedDataset.tsx +++ b/context/app/static/js/components/detailPage/ProcessedData/ProcessedDataset/ProcessedDataset.tsx @@ -26,7 +26,7 @@ import { getDateLabelAndValue } from 'js/components/detailPage/utils'; import { useSelectedVersionStore } from 'js/components/detailPage/VersionSelect/SelectedVersionStore'; import { useVersions } from 'js/components/detailPage/VersionSelect/hooks'; import { useTrackEntityPageEvent } from 'js/components/detailPage/useTrackEntityPageEvent'; -import InfoTextTooltip from 'js/shared-styles/tooltips/InfoTextTooltip'; +import ProcessedDataGroup from 'js/components/detailPage/ProcessedData/ProcessedDatasetGroup'; import { DatasetTitle } from './DatasetTitle'; import { ProcessedDatasetAccordion } from './ProcessedDatasetAccordion'; @@ -74,18 +74,12 @@ function SummaryAccordion() { const { group_name, mapped_consortium, creation_action } = dataset; const [dateLabel, dateValue] = getDateLabelAndValue(dataset); - const isHiveProcessed = creation_action === 'Central Process'; - return ( }> - {isHiveProcessed ? ( - HIVE - ) : ( - group_name - )} + {mapped_consortium} diff --git a/context/app/static/js/components/detailPage/ProcessedData/ProcessedDatasetGroup.tsx b/context/app/static/js/components/detailPage/ProcessedData/ProcessedDatasetGroup.tsx new file mode 100644 index 0000000000..379b0210c6 --- /dev/null +++ b/context/app/static/js/components/detailPage/ProcessedData/ProcessedDatasetGroup.tsx @@ -0,0 +1,18 @@ +import React from 'react'; +import InfoTextTooltip from 'js/shared-styles/tooltips/InfoTextTooltip'; +import { ProcessedDatasetDetails } from 'js/components/detailPage/ProcessedData/ProcessedDataset/hooks'; + +function ProcessedDataGroup({ + creation_action, + group_name, +}: Pick) { + const isHiveProcessed = creation_action === 'Central Process'; + + return isHiveProcessed ? ( + HIVE + ) : ( + group_name + ); +} + +export default ProcessedDataGroup; diff --git a/context/app/static/js/components/detailPage/summary/SummaryBody/SummaryBody.tsx b/context/app/static/js/components/detailPage/summary/SummaryBody/SummaryBody.tsx index a56bbf0b4e..143ff67b7a 100644 --- a/context/app/static/js/components/detailPage/summary/SummaryBody/SummaryBody.tsx +++ b/context/app/static/js/components/detailPage/summary/SummaryBody/SummaryBody.tsx @@ -70,6 +70,22 @@ function DatasetConsortium() { return {mapped_consortium}; } +function DatasetGroup() { + const { entity } = useFlaskDataContext(); + + if (!isDataset(entity)) { + return null; + } + + const { group_name } = entity; + + if (!group_name) { + return null; + } + + return {group_name}; +} + function CollectionCitation() { const { entity } = useFlaskDataContext(); @@ -122,6 +138,7 @@ function SummaryBodyContent({ + diff --git a/context/app/static/js/components/publications/PublicationCollections/PublicationCollections.tsx b/context/app/static/js/components/publications/PublicationCollections/PublicationCollections.tsx index 4133a5747b..7a31dcadb0 100644 --- a/context/app/static/js/components/publications/PublicationCollections/PublicationCollections.tsx +++ b/context/app/static/js/components/publications/PublicationCollections/PublicationCollections.tsx @@ -19,7 +19,7 @@ function PublicationCollections({ collectionsData = [], isCollectionPublication - Datasets associated with this publication are included in the Collections listed below. + Datasets associated with this publication are included in the collections listed below.