Skip to content

Commit d2ee3a2

Browse files
authored
refactor: OPTIC-1557: Remove Stale Feature Flag - fflag_fix_front_lsd… (#6997)
1 parent 06a2b29 commit d2ee3a2

6 files changed

Lines changed: 30 additions & 56 deletions

File tree

label_studio/core/feature_flags/stale_feature_flags.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
'fflag_fix_front_lsdv_4988_dynamic_no_label_120523_short': True,
1010
'fflag_fix_back_lsdv_4648_annotator_filter_29052023_short': True,
1111
'fflag_feat_back_lsdv_5035_use_created_at_from_draft_for_annotation_256052023_short': True,
12-
'fflag_fix_front_lsdv_4992_hide_all_regions_04052023_short': True,
1312
'ff_back_dev_4664_remove_storage_file_on_export_delete_29032023_short': False,
1413
'fflag_feat_front_lops_86_datasets_storage_edit_short': False,
1514
'fflag_fix_back_lsdv_4929_limit_exports_10042023_short': True,

web/libs/editor/src/components/SidePanels/OutlinerPanel/OutlinerPanel.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { OutlinerTree } from "./OutlinerTree";
66
import { ViewControls } from "./ViewControls";
77
import "./OutlinerPanel.scss";
88
import { IconInfo } from "../../../assets/icons/outliner";
9-
import { FF_LSDV_4992, FF_OUTLINER_OPTIM, isFF } from "../../../utils/feature-flags";
9+
import { FF_OUTLINER_OPTIM, isFF } from "../../../utils/feature-flags";
1010

1111
interface OutlinerPanelProps extends PanelProps {
1212
regions: any;
@@ -18,9 +18,8 @@ interface OutlinerTreeComponentProps {
1818

1919
const OutlinerFFClasses: string[] = [];
2020

21-
if (isFF(FF_LSDV_4992)) {
22-
OutlinerFFClasses.push("ff_hide_all_regions");
23-
}
21+
OutlinerFFClasses.push("ff_hide_all_regions");
22+
2423
if (isFF(FF_OUTLINER_OPTIM)) {
2524
OutlinerFFClasses.push("ff_outliner_optim");
2625
}

web/libs/editor/src/components/SidePanels/OutlinerPanel/ViewControls.scss

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
align-items: center;
99
grid-auto-flow: column;
1010
grid-auto-columns: min-content;
11-
grid-column-gap: 8px;
11+
grid-column-gap: 4px;
1212
background-color: var(--sand_0);
1313
box-shadow: 0 1px 0 rgb(0 0 0 / 10%);
1414

15+
1516
&__sort {
1617
display: flex;
1718
align-items: center;
@@ -36,11 +37,13 @@
3637
}
3738

3839
.button {
39-
height: 40px;
40-
font-size: 14px;
40+
height: 24px;
41+
font-size: 11px;
4142
font-weight: 400;
4243
padding: 0;
4344
justify-content: flex-start;
45+
white-space: nowrap;
46+
box-shadow: none;
4447

4548
&_newUI {
4649
font-size: 12px;
@@ -60,34 +63,23 @@
6063
&:focus {
6164
box-shadow: none;
6265
}
63-
}
64-
65-
&_FF_LSDV_4992 {
66-
grid-column-gap: 4px;
6766

68-
.button {
69-
height: 24px;
70-
font-size: 11px;
71-
white-space: nowrap;
72-
box-shadow: none;
73-
74-
&:hover {
75-
background: var(--sand_200);
76-
border-radius: 4px;
77-
}
67+
&:hover {
68+
background: var(--sand_200);
69+
border-radius: 4px;
70+
}
7871

79-
&[disabled] {
80-
background-color: var(--sand_0);
81-
color: var(--sand_400);
82-
}
72+
&[disabled] {
73+
background-color: var(--sand_0);
74+
color: var(--sand_400);
75+
}
8376

84-
&_type_text {
85-
padding: 0 2px !important;
86-
}
77+
&_type_text {
78+
padding: 0 2px !important;
79+
}
8780

88-
&.dropdown__trigger {
89-
padding: 0 6px 0 2px;
90-
}
81+
&.dropdown__trigger {
82+
padding: 0 6px 0 2px;
9183
}
9284
}
93-
}
85+
}

web/libs/editor/src/components/SidePanels/OutlinerPanel/ViewControls.tsx

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { Menu } from "../../../common/Menu/Menu";
2020
import { BemWithSpecifiContext } from "../../../utils/bem";
2121
import { SidePanelsContext } from "../SidePanelsContext";
2222
import "./ViewControls.scss";
23-
import { FF_DEV_3873, FF_LSDV_4992, isFF } from "../../../utils/feature-flags";
23+
import { FF_DEV_3873, isFF } from "../../../utils/feature-flags";
2424
import { observer } from "mobx-react";
2525

2626
const { Block, Elem } = BemWithSpecifiContext();
@@ -56,14 +56,14 @@ export const ViewControls: FC<ViewControlsProps> = observer(
5656
case "label":
5757
return {
5858
label: "Group by Label",
59-
selectedLabel: isFF(FF_DEV_3873) ? (isFF(FF_LSDV_4992) ? "By Label" : "Label") : "Grouped by Label",
59+
selectedLabel: isFF(FF_DEV_3873) ? "By Label" : "Grouped by Label",
6060
icon: <IconTagAlt />,
6161
tooltip: "Grouped by Label",
6262
};
6363
case "type":
6464
return {
6565
label: "Group by Tool",
66-
selectedLabel: isFF(FF_DEV_3873) ? (isFF(FF_LSDV_4992) ? "By Tool" : "Tool") : "Grouped by Tool",
66+
selectedLabel: isFF(FF_DEV_3873) ? "By Tool" : "Grouped by Tool",
6767
icon: <IconCursor />,
6868
tooltip: "Grouped by Tool",
6969
};
@@ -95,7 +95,7 @@ export const ViewControls: FC<ViewControlsProps> = observer(
9595
);
9696

9797
return (
98-
<Block name="view-controls" mod={{ collapsed: context.locked, FF_LSDV_4992: isFF(FF_LSDV_4992) }}>
98+
<Block name="view-controls" mod={{ collapsed: context.locked }}>
9999
<Grouping
100100
value={grouping}
101101
options={["manual", "type", "label"]}
@@ -115,7 +115,7 @@ export const ViewControls: FC<ViewControlsProps> = observer(
115115
/>
116116
</Elem>
117117
)}
118-
{isFF(FF_LSDV_4992) ? <ToggleRegionsVisibilityButton regions={regions} /> : null}
118+
<ToggleRegionsVisibilityButton regions={regions} />
119119
</Block>
120120
);
121121
},
@@ -183,16 +183,7 @@ const Grouping = <T extends string>({
183183

184184
// mods are already set in the button from type, so use it only in new UI
185185
const extraStyles = isFF(FF_DEV_3873) ? { mod: { newUI: true } } : undefined;
186-
const style = isFF(FF_LSDV_4992)
187-
? {}
188-
: {
189-
padding: "0",
190-
whiteSpace: "nowrap",
191-
};
192-
193-
if (isFF(FF_DEV_3873)) {
194-
style.padding = "0 12px 0 2px";
195-
}
186+
const style = isFF(FF_DEV_3873) ? { padding: "0 12px 0 2px" } : {};
196187

197188
return (
198189
<Dropdown.Trigger content={dropdownContent} style={{ width: 200 }}>
@@ -209,7 +200,7 @@ const Grouping = <T extends string>({
209200
<DirectionIndicator direction={direction} name={value} value={value} wrap={false} />
210201
)
211202
}
212-
tooltip={(isFF(FF_LSDV_4992) && readableValue.tooltip) || undefined}
203+
tooltip={readableValue.tooltip || undefined}
213204
tooltipTheme="dark"
214205
>
215206
{readableValue.selectedLabel}

web/libs/editor/src/utils/feature-flags.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,6 @@ export const FF_LSDV_4988 = "fflag_fix_front_lsdv_4988_dynamic_no_label_120523_s
139139
*/
140140
export const FF_LSDV_4930 = "fflag_fix_front_lsdv_4930_selection_tool_fixes_240423_short";
141141

142-
/**
143-
* Restore "hide all regions" button functionality in the outliner
144-
* @link https://app.launchdarkly.com/default/production/features/fflag_fix_front_lsdv_4992_hide_all_regions_04052023_short
145-
*/
146-
export const FF_LSDV_4992 = "fflag_fix_front_lsdv_4992_hide_all_regions_04052023_short";
147-
148142
/**
149143
* Resetting shared stores on task change to correctly generate dynamic children
150144
* @see: fflag_fix_front_dev_3617_taxonomy_memory_leaks_fix: To enable shared store

web/libs/editor/tests/integration/feature-flags.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import * as FLAGS from "../../src/utils/feature-flags";
33
export const CURRENT_FLAGS = {
44
[FLAGS.FF_DEV_1170]: true,
55
[FLAGS.FF_LSDV_4930]: true,
6-
[FLAGS.FF_LSDV_4992]: true,
76
[FLAGS.FF_DEV_2715]: true,
87
[FLAGS.FF_LSDV_4620_3]: true,
98
[FLAGS.FF_LSDV_4620_3_ML]: true,

0 commit comments

Comments
 (0)