Bin
2025-12-16 9e0b2ba2c317b1a86212f24cbae3195ad1f3dbfa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/**
 * Support for notification links in the Label Steam and the Review Stream.
 * @link https://app.launchdarkly.com/default/branch/features/feat_front_dev_1752_notification_links_in_label_and_review_streams
 */
export const FF_DEV_1752 = "feat_front_dev_1752_notification_links_in_label_and_review_streams";
 
// Ask for comment during update in label stream
export const FF_DEV_2186 = "ff_front_dev_2186_comments_for_update";
 
export const FF_DEV_2536 = "fflag_feat_front_dev-2536_comment_notifications_short";
 
// Comments for annotation editor
export const FF_DEV_2887 = "fflag-feat-dev-2887-comments-ui-editor-short";
 
export const FF_DEV_3034 = "fflag-feat-dev-3034-comments-with-drafts-short";
 
export const FF_DEV_3873 = "fflag_feat_front_dev_3873_labeling_ui_improvements_short";
 
/**
 * Support for Datasets functionality.
 */
export const FF_LOPS_E_3 = "fflag_feat_all_lops_e_3_datasets_short";
 
/**
 * Fixes memory leaks in label studio frontend relative to mobx-state-tree and react usage
 *
 * @link https://app.launchdarkly.com/default/production/features/fflag_fix_front_lsdv_4620_memory_leaks_100723_short
 */
export const FF_LSDV_4620_3_ML = "fflag_fix_front_lsdv_4620_memory_leaks_100723_short";
 
/**
 * Self Serve
 * @link https://app.launchdarkly.com/default/test/features/fflag_feat_front_leap_482_self_serve_short/
 */
export const FF_SELF_SERVE = "fflag_feat_front_leap_482_self_serve_short";
 
/** Add ability to preview image tasks in Data Manager Grid View */
export const FF_GRID_PREVIEW = "fflag_feat_front_leap_1424_grid_preview_short";
 
/**
 * Add ability to show specific region from URL params (by hiding all other regions).
 */
export const FF_REGION_VISIBILITY_FROM_URL = "fflag_feat_front_optic_1553_url_based_region_visibility_short";
 
/**
 * Add ability to show average agreement score popover in Agreement cell.
 */
export const FF_AVERAGE_AGREEMENT_SCORE_POPOVER = "fflag_feat_all_leap_2042_average_agreement_score_popover";
 
/**
 * Allow to filter tasks in Data Manager by control tag labels used in annotation results
 * @link https://app.launchdarkly.com/projects/default/flags/fflag_root_13_annotation_results_filtering
 */
export const FF_ANNOTATION_RESULTS_FILTERING = "fflag_root_13_annotation_results_filtering";
 
/**
 * Allow to filter tasks in Data Manager by annotation results and user annotated on the same annotation
 * @link https://app.launchdarkly.com/projects/default/flags/fflag_root_45_better_user_filter
 */
export const FF_BETTER_USER_FILTER = "fflag_root_45_better_user_filter";
 
/**
 * Disable global user fetching for large-scale deployments
 * @link https://app.launchdarkly.com/projects/default/flags/fflag_all_feat_utc_204_users_performance_improvements_in_dm_for_large_orgs
 */
export const FF_DISABLE_GLOBAL_USER_FETCHING =
  "fflag_all_feat_utc_204_users_performance_improvements_in_dm_for_large_orgs";
 
// Customize flags
const flags = {};
 
function getFeatureFlags() {
  return Object.assign(window.APP_SETTINGS?.feature_flags || {}, flags);
}
 
export function isFF(id) {
  const featureFlags = getFeatureFlags();
  // TODO: remove the override + if statement once LSE and LSO start building react the same way and fflag_fix_front_lsdv_4620_memory_leaks_100723_short is removed
  const override = {
    fflag_fix_front_lsdv_4620_memory_leaks_100723_short: false,
  };
  if (window?.APP_SETTINGS?.sentry_environment === "opensource" && id in override) {
    return override[id];
  }
 
  if (id in featureFlags) {
    return featureFlags[id] === true;
  }
  return window.APP_SETTINGS?.feature_flags_default_value === true;
}