Skip to content

Commit db0b399

Browse files
chore: cleanup feature flags and dependency updates (#1979)
* cleanup deposition feature flag * cleanup expand depositions feature flag * cleanup postMlChallenge feature flag * fix type errors * more code cleanup * cleanup idenitifiedObjects feature flag * fix pre commit * address feedback * fix deposition page variant refactor issue
1 parent add693e commit db0b399

File tree

70 files changed

+338
-2383
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+338
-2383
lines changed

.github/workflows/helm-dep-update.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ on:
88
jobs:
99
helm_dependency_update:
1010
uses: chanzuckerberg/github-actions/.github/workflows/argus-helm-chart-update.yaml@v6
11-
secrets: inherit
11+
secrets: inherit

frontend/packages/data-portal/app/components/AnnotationFilter/AnnotationFilter.tsx

Lines changed: 17 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { useSearchParams } from '@remix-run/react'
22

33
import { NameOrIdFilterSection } from 'app/components/DepositionFilter'
44
import {
5-
AnnotatedObjectNameFilter,
65
AnnotatedObjectShapeTypeFilter,
76
AuthorFilter,
87
FilterPanel,
@@ -11,17 +10,14 @@ import {
1110
import { QueryParams } from 'app/constants/query'
1211
import { useI18n } from 'app/hooks/useI18n'
1312
import { useRunById } from 'app/hooks/useRunById'
14-
import { useFeatureFlag } from 'app/utils/featureFlags'
1513

1614
import { ObjectNameIdFilter } from '../Filters/ObjectNameIdFilter/ObjectNameIdFilter'
1715
import { AnnotationSoftwareFilter } from './AnnotationSoftwareFilter'
1816
import { MethodTypeFilter } from './MethodTypeFilter'
19-
import { ObjectIdFilter } from './ObjectIdFilter/ObjectIdFilter'
2017

2118
export function AnnotationFilter() {
2219
const { t } = useI18n()
2320
const [searchParams] = useSearchParams()
24-
const showObjectNameIdFilter = useFeatureFlag('identifiedObjects')
2521
const {
2622
objectNames,
2723
objectShapeTypes,
@@ -43,57 +39,27 @@ export function AnnotationFilter() {
4339
new Set([...objectNames, ...identifiedObjectNames]),
4440
)
4541

46-
const annotationMetadataFilters = (
47-
<>
48-
<AuthorFilter label={t('annotationAuthor')} />
49-
<AnnotatedObjectNameFilter
50-
label={t('objectName')}
51-
allObjectNames={allObjectNames}
52-
/>
53-
<ObjectIdFilter />
54-
<AnnotatedObjectShapeTypeFilter allObjectShapeTypes={objectShapeTypes} />
55-
<MethodTypeFilter />
56-
<AnnotationSoftwareFilter allAnnotationSoftwares={annotationSoftwares} />
57-
</>
58-
)
59-
60-
const objectMetadataFilters = (
61-
<>
62-
<ObjectNameIdFilter
63-
label={t('objectNameOrId')}
64-
objectNames={allObjectNames}
65-
showAnnotatedObjectsOnly={showAnnotatedObjectsOnly}
66-
/>
67-
<AnnotatedObjectShapeTypeFilter allObjectShapeTypes={objectShapeTypes} />
68-
</>
69-
)
70-
71-
const otherAnnotationMetadataFilters = (
72-
<>
73-
<AuthorFilter label={t('annotationAuthor')} />
74-
<MethodTypeFilter />
75-
<AnnotationSoftwareFilter allAnnotationSoftwares={annotationSoftwares} />
76-
</>
77-
)
78-
7942
return (
8043
<FilterPanel>
8144
<>
8245
<NameOrIdFilterSection />
83-
{showObjectNameIdFilter ? (
84-
<>
85-
<FilterSection title={t('objectMetadata')}>
86-
{objectMetadataFilters}
87-
</FilterSection>
88-
<FilterSection title={t('annotationMetadata')}>
89-
{otherAnnotationMetadataFilters}
90-
</FilterSection>
91-
</>
92-
) : (
93-
<FilterSection title={t('annotationMetadata')}>
94-
{annotationMetadataFilters}
95-
</FilterSection>
96-
)}
46+
<FilterSection title={t('objectMetadata')}>
47+
<ObjectNameIdFilter
48+
label={t('objectNameOrId')}
49+
objectNames={allObjectNames}
50+
showAnnotatedObjectsOnly={showAnnotatedObjectsOnly}
51+
/>
52+
<AnnotatedObjectShapeTypeFilter
53+
allObjectShapeTypes={objectShapeTypes}
54+
/>
55+
</FilterSection>
56+
<FilterSection title={t('annotationMetadata')}>
57+
<AuthorFilter label={t('annotationAuthor')} />
58+
<MethodTypeFilter />
59+
<AnnotationSoftwareFilter
60+
allAnnotationSoftwares={annotationSoftwares}
61+
/>
62+
</FilterSection>
9763
</>
9864
</FilterPanel>
9965
)

frontend/packages/data-portal/app/components/AnnotationFilter/ObjectIdFilter/ObjectIdFilter.tsx

Lines changed: 0 additions & 96 deletions
This file was deleted.

frontend/packages/data-portal/app/components/BrowseData/DatasetTable.tsx

Lines changed: 27 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import { useIsLoading } from 'app/hooks/useIsLoading'
3030
import { Dataset } from 'app/types/gql/datasetsPageTypes'
3131
import { LogLevel } from 'app/types/logging'
3232
import { cnsNoMerge } from 'app/utils/cns'
33-
import { useFeatureFlag } from 'app/utils/featureFlags'
3433
import { sendLogs } from 'app/utils/logging'
3534
import { setObjectNameAndGroundTruthStatus } from 'app/utils/setObjectNameAndGroundTruthStatus'
3635
import { getErrorMessage } from 'app/utils/string'
@@ -47,7 +46,6 @@ const LOADING_DATASETS: Dataset[] = range(0, MAX_PER_PAGE).map(() => ({
4746
export function DatasetTable() {
4847
const { t } = useI18n()
4948
const { datasets } = useDatasets()
50-
const isIdentifiedObjectsEnabled = useFeatureFlag('identifiedObjects')
5149

5250
const [searchParams, setSearchParams] = useSearchParams()
5351
const datasetSort = (searchParams.get(QueryParams.Sort) ?? undefined) as
@@ -271,53 +269,33 @@ export function DatasetTable() {
271269
(dataset) => {
272270
const objectsMap = new Map<string, boolean>()
273271

274-
// When feature flag is enabled, use separate queries backward compatibility
275-
if (isIdentifiedObjectsEnabled) {
276-
// Handle annotations separately
277-
dataset.annotationsObjectNames?.aggregate?.forEach(
278-
(aggregate) => {
279-
const annotationObjectName =
280-
aggregate?.groupBy?.annotations?.objectName
281-
const groundTruthStatus =
282-
!!aggregate?.groupBy?.annotations?.groundTruthStatus
283-
if (annotationObjectName) {
284-
setObjectNameAndGroundTruthStatus(
285-
annotationObjectName,
286-
groundTruthStatus,
287-
objectsMap,
288-
)
289-
}
290-
},
291-
)
292-
293-
// Handle identifiedObjects separately
294-
dataset.identifiedObjectNames?.aggregate?.forEach((aggregate) => {
295-
const identifiedObjectName =
296-
aggregate?.groupBy?.identifiedObjects?.objectName
297-
if (identifiedObjectName) {
298-
setObjectNameAndGroundTruthStatus(
299-
identifiedObjectName,
300-
false, // identifiedObjects don't have groundTruthStatus, default to false
301-
objectsMap,
302-
)
303-
}
304-
})
305-
} else {
306-
// Fall back to original query structure when feature flag is off
307-
dataset.distinctObjectNames?.aggregate?.forEach((aggregate) => {
308-
const annotationObjectName =
309-
aggregate?.groupBy?.annotations?.objectName
310-
const groundTruthStatus =
311-
!!aggregate?.groupBy?.annotations?.groundTruthStatus
312-
if (annotationObjectName) {
313-
setObjectNameAndGroundTruthStatus(
314-
annotationObjectName,
315-
groundTruthStatus,
316-
objectsMap,
317-
)
318-
}
319-
})
320-
}
272+
// Handle annotations
273+
dataset.annotationsObjectNames?.aggregate?.forEach((aggregate) => {
274+
const annotationObjectName =
275+
aggregate?.groupBy?.annotations?.objectName
276+
const groundTruthStatus =
277+
!!aggregate?.groupBy?.annotations?.groundTruthStatus
278+
if (annotationObjectName) {
279+
setObjectNameAndGroundTruthStatus(
280+
annotationObjectName,
281+
groundTruthStatus,
282+
objectsMap,
283+
)
284+
}
285+
})
286+
287+
// Handle identifiedObjects
288+
dataset.identifiedObjectNames?.aggregate?.forEach((aggregate) => {
289+
const identifiedObjectName =
290+
aggregate?.groupBy?.identifiedObjects?.objectName
291+
if (identifiedObjectName) {
292+
setObjectNameAndGroundTruthStatus(
293+
identifiedObjectName,
294+
false, // identifiedObjects don't have groundTruthStatus, default to false
295+
objectsMap,
296+
)
297+
}
298+
})
321299

322300
return objectsMap
323301
},
@@ -376,7 +354,6 @@ export function DatasetTable() {
376354
t,
377355
searchParams,
378356
setSearchParams,
379-
isIdentifiedObjectsEnabled,
380357
])
381358

382359
return (

0 commit comments

Comments
 (0)