Skip to content

Commit

Permalink
refactor: LEAP-1291: Remove Stale Feature Flag - fflag_fix_front_lsdv…
Browse files Browse the repository at this point in the history
…_4988_dynamic_no_label_120523_short
  • Loading branch information
luarmr committed Dec 3, 2024
1 parent c43b703 commit 10bc854
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 31 deletions.
1 change: 0 additions & 1 deletion label_studio/core/feature_flags/stale_feature_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
'fflag_feat_front_lsdv_4620_outliner_optimization_310723_short': True,
'fflag_fix_front_lsdv_4600_lead_time_27072023_short': False,
'fflag_feat_front_lops_e_10_updated_ux_short': False,
'fflag_fix_front_lsdv_4988_dynamic_no_label_120523_short': True,
'fflag_fix_back_lsdv_4648_annotator_filter_29052023_short': True,
'fflag_feat_back_lsdv_5035_use_created_at_from_draft_for_annotation_256052023_short': True,
'fflag_feat_front_lsdv_3025_outliner_filter_short': False,
Expand Down
27 changes: 0 additions & 27 deletions web/libs/editor/src/stores/Annotation/Annotation.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
FF_LLM_EPIC,
FF_LSDV_3009,
FF_LSDV_4583,
FF_LSDV_4988,
FF_REVIEWER_FLOW,
isFF,
} from "../../utils/feature-flags";
Expand Down Expand Up @@ -1038,32 +1037,6 @@ const _Annotation = types

for (let key of keys) {
if (key.endsWith("labels")) {
const hasControlTag = tagNames.has(obj.from_name) || tagNames.has("labels");

// remove non-existent labels, it actually breaks dynamic labels
// and makes no reason overall — labels from predictions can be out of config
if (!isFF(FF_LSDV_4988) && hasControlTag) {
const labelsContainer = tagNames.get(obj.from_name) ?? tagNames.get("labels");
const value = obj.value[key];

if (value && value.length && labelsContainer.type.endsWith("labels")) {
const filteredValue = value.filter((labelName) => !!labelsContainer.findLabel(labelName));
const oldKey = key;

key = key === labelsContainer.type ? key : labelsContainer.type;

if (oldKey !== key) {
obj.type = key;
obj.value[key] = obj.value[oldKey];
delete obj.value[oldKey];
}

if (filteredValue.length !== value.length) {
obj.value[key] = filteredValue;
}
}
}

// detect most relevant label tags if that one from from_name is missing
// can be useful for predictions in old format with config in new format:
// Rectangle + Labels -> RectangleLabels
Expand Down
3 changes: 0 additions & 3 deletions web/libs/editor/src/utils/feature-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,6 @@ export const FF_LSDV_4712 = "fflag_feat_front_lsdv_4712_skipduplicates_editing_1
*/
export const FF_LSDV_4881 = "fflag_fix_front_lsdv_4881_timeseries_points_missing_140423_short";

/** Fix "No Label" for Dynamic Labels by switching off missing labels removal */
export const FF_LSDV_4988 = "fflag_fix_front_lsdv_4988_dynamic_no_label_120523_short";

/**
* Fixing issues related to selection tool functional (selecting hidden regions, onClick in Konva, interaction with regions inside selection area)
*
Expand Down

0 comments on commit 10bc854

Please sign in to comment.