diff --git a/label_studio/core/feature_flags/stale_feature_flags.py b/label_studio/core/feature_flags/stale_feature_flags.py index 023450e7b146..e2397dda87c3 100644 --- a/label_studio/core/feature_flags/stale_feature_flags.py +++ b/label_studio/core/feature_flags/stale_feature_flags.py @@ -36,7 +36,6 @@ 'ff_front_dev_2432_auto_save_polygon_draft_210622_short': True, 'ff_front_dev_2575_projects_list_performance_280622_short': True, 'ff_front_dev_2431_delete_polygon_points_080622_short': True, - 'ff_front_dev_2290_draft_in_annotation_history_short': True, 'ff_dev_2128_html_in_labels_150422_short': True, 'ff_front_dev_1495_avatar_mess_210122_short': True, 'ff_front_1170_outliner_030222_short': True, diff --git a/web/libs/editor/src/components/CurrentEntity/AnnotationHistory.tsx b/web/libs/editor/src/components/CurrentEntity/AnnotationHistory.tsx index 0ada44674ae1..33d206a5b0b1 100644 --- a/web/libs/editor/src/components/CurrentEntity/AnnotationHistory.tsx +++ b/web/libs/editor/src/components/CurrentEntity/AnnotationHistory.tsx @@ -104,7 +104,6 @@ const AnnotationHistoryComponent: FC = ({ selectedHistory, history, enabled = true, - showDraft = false, inline = false, }) => { const annotation = annotationStore.selected; @@ -119,7 +118,7 @@ const AnnotationHistoryComponent: FC = ({ return ( - {showDraft && } + {enabled && history.length > 0 && @@ -127,7 +126,7 @@ const AnnotationHistoryComponent: FC = ({ const { id, user, createdDate } = item; const isLastItem = lastItem?.id === item.id; const isSelected = - isLastItem && !selectedHistory && showDraft ? !isDraftSelected : selectedHistory?.id === item.id; + isLastItem && !selectedHistory ? !isDraftSelected : selectedHistory?.id === item.id; const hiddenUser = infoIsHidden ? { email: currentUser?.id === user.id ? "Me" : "User" } : null; return ( @@ -142,10 +141,6 @@ const AnnotationHistoryComponent: FC = ({ disabled={item.results.length === 0} hideInfo={infoIsHidden} onClick={async () => { - if (!showDraft) { - annotationStore.selectHistory(isSelected ? null : item); - return; - } if (hasChanges) { annotation.saveDraftImmediately(); // wait for draft to be saved before switching to history diff --git a/web/libs/editor/src/components/CurrentEntity/CurrentEntity.jsx b/web/libs/editor/src/components/CurrentEntity/CurrentEntity.jsx index d5b0b7e60075..887cf48a544d 100644 --- a/web/libs/editor/src/components/CurrentEntity/CurrentEntity.jsx +++ b/web/libs/editor/src/components/CurrentEntity/CurrentEntity.jsx @@ -1,7 +1,6 @@ import { inject, observer } from "mobx-react"; import { Space } from "../../common/Space/Space"; import { Block, Elem } from "../../utils/bem"; -import { FF_DEV_2290, isFF } from "../../utils/feature-flags"; import { DraftPanel } from "../DraftPanel/DraftPanel"; import { AnnotationHistory } from "./AnnotationHistory.tsx"; import { useRegionsCopyPaste } from "../../hooks/useRegionsCopyPaste"; @@ -11,8 +10,6 @@ const injector = inject("store"); export const CurrentEntity = injector( observer(({ entity, showHistory = true }) => { - const showDraftInHistory = isFF(FF_DEV_2290); - useRegionsCopyPaste(entity); return entity ? ( @@ -48,7 +45,7 @@ export const CurrentEntity = injector( {/* */} - {!showDraftInHistory && } + {/* {showHistory && !entity.userGenerate && ( */} {showHistory && ( @@ -57,7 +54,7 @@ export const CurrentEntity = injector( #{entity.pk ?? entity.id} )} - + ) : null; }), diff --git a/web/libs/editor/src/components/SidePanels/DetailsPanel/DetailsPanel.tsx b/web/libs/editor/src/components/SidePanels/DetailsPanel/DetailsPanel.tsx index dcc15418b2ec..022df1c9c154 100644 --- a/web/libs/editor/src/components/SidePanels/DetailsPanel/DetailsPanel.tsx +++ b/web/libs/editor/src/components/SidePanels/DetailsPanel/DetailsPanel.tsx @@ -1,7 +1,6 @@ import { inject, observer } from "mobx-react"; import type { FC } from "react"; import { Block, Elem } from "../../../utils/bem"; -import { FF_DEV_2290, isFF } from "../../../utils/feature-flags"; import { Comments as CommentsComponent } from "../../Comments/Comments"; import { AnnotationHistory } from "../../CurrentEntity/AnnotationHistory"; import { PanelBase, type PanelProps } from "../PanelBase"; @@ -90,24 +89,19 @@ const RelationsTab: FC = inject("store")( const HistoryTab: FC = inject("store")( observer(({ store, currentEntity }) => { const showAnnotationHistory = store.hasInterface("annotations:history"); - const showDraftInHistory = isFF(FF_DEV_2290); return ( <> - {!showDraftInHistory ? ( - - ) : ( - - - Annotation History - #{currentEntity.pk ?? currentEntity.id} - - - - + + + Annotation History + #{currentEntity.pk ?? currentEntity.id} + + + - )} + ); @@ -133,8 +127,6 @@ const GeneralPanel: FC = inject("store")( observer(({ store, currentEntity }) => { const { relationStore } = currentEntity; const showAnnotationHistory = store.hasInterface("annotations:history"); - const showDraftInHistory = isFF(FF_DEV_2290); - return ( <> {!showDraftInHistory ? ( @@ -146,7 +138,7 @@ const GeneralPanel: FC = inject("store")( #{currentEntity.pk ?? currentEntity.id} - + )} diff --git a/web/libs/editor/src/utils/feature-flags.ts b/web/libs/editor/src/utils/feature-flags.ts index 67ef0b6ff907..9206b5214d48 100644 --- a/web/libs/editor/src/utils/feature-flags.ts +++ b/web/libs/editor/src/utils/feature-flags.ts @@ -18,9 +18,6 @@ export const FF_DEV_1713 = "ff_front_DEV_1713_audio_ui_150222_short"; // Allow to use html inside