Skip to content

Commit

Permalink
feat: Add alignment ID row + tooltip (#1153)
Browse files Browse the repository at this point in the history
  • Loading branch information
bchu1 authored Sep 18, 2024
1 parent 75ebe8b commit 1227fbb
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Icon } from '@czi-sds/components'
import { useMemo } from 'react'

import { AccordionMetadataTable } from 'app/components/AccordionMetadataTable'
Expand All @@ -12,10 +13,14 @@ import { useI18n } from 'app/hooks/useI18n'
import { useAnnotation } from 'app/state/annotation'
import { useFeatureFlag } from 'app/utils/featureFlags'

import { I18n } from '../I18n'
import { Tooltip } from '../Tooltip'

export function AnnotationOverviewTable() {
const { activeAnnotation: annotation } = useAnnotation()
const { t } = useI18n()
const isDepositionsEnabled = useFeatureFlag('depositions')
const multipleTomogramsEnabled = useFeatureFlag('multipleTomograms')

const methodLinks = useMemo(
() =>
Expand Down Expand Up @@ -88,6 +93,27 @@ export function AnnotationOverviewTable() {
label: t('lastModifiedDate'),
values: [annotation.last_modified_date ?? '--'],
},
...(multipleTomogramsEnabled
? [
{
label: t('alignmentId'),
labelExtra: (
<Tooltip
tooltip={<I18n i18nKey="alignmentIdTooltip" />}
placement="top"
>
<Icon
sdsIcon="infoCircle"
sdsSize="s"
className="!fill-sds-color-primitive-gray-500"
sdsType="button"
/>
</Tooltip>
),
values: [],
},
]
: []),
{
label: t('methodType'),
values: [annotation.method_type ?? '--'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"alignment": "Alignment",
"alignmentFile": "Alignment File",
"alignmentId": "Alignment ID",
"alignmentIdTooltip": "<semibold>Alignment ID:</semibold> ID of the alignment used to generate the tilt series for a given tomogram.",
"alignmentType": "AlignmentType",
"all": "All",
"allDatasets": "All Datasets",
Expand Down

0 comments on commit 1227fbb

Please sign in to comment.