diff --git a/src/components/DataManager/DataManager.js b/src/components/DataManager/DataManager.js index 71899ab3..732818c5 100644 --- a/src/components/DataManager/DataManager.js +++ b/src/components/DataManager/DataManager.js @@ -2,7 +2,6 @@ import { inject, observer } from "mobx-react"; import React from "react"; import { LSPlus } from "../../assets/icons"; import { Block, Elem } from "../../utils/bem"; -import { FF_LOPS_12, isFF } from "../../utils/feature-flags"; import { Interface } from "../Common/Interface"; import { Space } from "../Common/Space/Space"; import { Spinner } from "../Common/Spinner"; @@ -21,27 +20,15 @@ const injector = inject(({ store }) => { }); const summaryInjector = inject(({ store }) => { - const { project, taskStore, SDK } = store; - - if (isFF(FF_LOPS_12) && SDK?.type === 'labelops') { - return { - total: taskStore?.total ?? 0, - coverage: taskStore?.coverage ?? 'N/A', - precision: taskStore?.precision ?? 'N/A', - confidence: taskStore?.confidence ?? 'N/A', - cloudSync: project.target_syncing ?? project.source_syncing ?? false, - SDK, - }; - } else { - return { - totalTasks: project?.task_count ?? project?.task_number ?? 0, - totalFoundTasks: taskStore?.total ?? 0, - totalAnnotations: taskStore?.totalAnnotations ?? 0, - totalPredictions: taskStore?.totalPredictions ?? 0, - cloudSync: project.target_syncing ?? project.source_syncing ?? false, - }; - } + const { project, taskStore } = store; + return { + totalTasks: project?.task_count ?? project?.task_number ?? 0, + totalFoundTasks: taskStore?.total ?? 0, + totalAnnotations: taskStore?.totalAnnotations ?? 0, + totalPredictions: taskStore?.totalPredictions ?? 0, + cloudSync: project.target_syncing ?? project.source_syncing ?? false, + }; }); const switchInjector = inject(({ store }) => { @@ -65,28 +52,15 @@ const ProjectSummary = summaryInjector((props) => { )} - {isFF(FF_LOPS_12) && props.SDK?.type === 'labelops' ? ( - - - - Total: {props.total} - - GT coverage: {props.coverage} - Precision: {props.precision} - Confidence: {props.confidence} - - - ) : ( - - - - Tasks: {props.totalFoundTasks} / {props.totalTasks} - - Annotations: {props.totalAnnotations} - Predictions: {props.totalPredictions} - - - )} + + + + Tasks: {props.totalFoundTasks} / {props.totalTasks} + + Annotations: {props.totalAnnotations} + Predictions: {props.totalPredictions} + + ); }); diff --git a/src/stores/Tabs/tab.js b/src/stores/Tabs/tab.js index 55ecbca6..b1ab032d 100644 --- a/src/stores/Tabs/tab.js +++ b/src/stores/Tabs/tab.js @@ -14,7 +14,6 @@ import { TabFilter } from "./tab_filter"; import { TabHiddenColumns } from "./tab_hidden_columns"; import { TabSelectedItems } from "./tab_selected_items"; import { History } from '../../utils/history'; -import { FF_LOPS_12, isFF } from "../../utils/feature-flags"; import { CustomJSON, StringOrNumberID, ThresholdType } from "../types"; import { clamp } from "../../utils/helpers"; @@ -396,8 +395,6 @@ export const Tab = types } if (self.virtual) { yield self.dataStore.reload({ query: self.query, interaction }); - } else if (isFF(FF_LOPS_12) && self.root.SDK?.type === 'labelops') { - yield self.dataStore.reload({ query: self.query, interaction }); } getRoot(self).SDK?.invoke?.("tabReloaded", self); @@ -437,20 +434,6 @@ export const Tab = types localStorage.setItem(`virtual-tab-${projectId}`, JSON.stringify(snapshot)); } - History.navigate({ tab: self.key }, true); - self.reload({ interaction }); - } else if (isFF(FF_LOPS_12) && self.root.SDK?.type === 'labelops') { - const snapshot = self.serialize(); - - self.key = self.parent.snapshotToUrl(snapshot); - - const projectId = self.root.SDK.projectId; - - // Save the virtual tab of the project to local storage to persist between page navigations - if (projectId) { - localStorage.setItem(`virtual-tab-${projectId}`, JSON.stringify(snapshot)); - } - History.navigate({ tab: self.key }, true); self.reload({ interaction }); } else { diff --git a/src/utils/feature-flags.js b/src/utils/feature-flags.js index 8d9314eb..7e5b539e 100644 --- a/src/utils/feature-flags.js +++ b/src/utils/feature-flags.js @@ -40,12 +40,6 @@ export const FF_DEV_3734 = 'fflag_fix_front_dev_3734_hide_task_counter_131222_sh */ export const FF_DEV_4008 = "feat_front_dev_4008_quick_task_open_short"; -/** - * Support for LabelOps functionality. - * @link https://app.launchdarkly.com/default/branch/features/fflag_feat_front_lops_12_label_ops_ui_short - */ -export const FF_LOPS_12 = "fflag_feat_front_lops_12_label_ops_ui_short"; - /** * Support for Datasets functionality. */