This repository was archived by the owner on Apr 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathfeature-flags.js
83 lines (64 loc) · 3.04 KB
/
feature-flags.js
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
// Outliner + Details
export const FF_DEV_1170 = "ff_front_1170_outliner_030222_short";
// Switch to page navigation
export const FF_DEV_1470 = "ff_front_dev_1470_dm_pagination_010422_short";
/**
* 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";
/**
* Support for loading media files only a single time. Part of the Audio v3 epic.
* @link https://app.launchdarkly.com/default/production/features/ff_front_dev_2715_audio_3_280722_short
*/
export const FF_DEV_2715 = 'ff_front_dev_2715_audio_3_280722_short';
// Comments for annotation editor
export const FF_DEV_2887 = "fflag-feat-dev-2887-comments-ui-editor-short";
// toggles the ability to drag columns on the datamanager table
export const FF_DEV_2984 = "fflag_feat_front_dev_2984_dm_draggable_columns_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';
/**
* Hide task counter because it's mostly irrelevant
* @link https://app.launchdarkly.com/default/production/features/fflag_fix_front_dev_3734_hide_task_counter_131222_short
*/
export const FF_DEV_3734 = 'fflag_fix_front_dev_3734_hide_task_counter_131222_short';
/**
* When navigating through tasks using shift+up/down hotkeys, select task automatically
* @link https://app.launchdarkly.com/default/production/features/feat_front_dev_4008_quick_task_open_short
*/
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.
*/
export const FF_LOPS_E_3 = "fflag_feat_all_lops_e_3_datasets_short";
/**
* Fixes how presigned urls are generated and accessed to remove possibility of CORS errors.
*/
export const FF_LSDV_4711 = 'fflag_fix_all_lsdv_4711_cors_errors_accessing_task_data_short';
/**
* Add forced draft saving on switching between different tasks in Quick View.
*/
export const FF_LSDV_5177 = 'fflag_fix_front_lsdv_5177_save_draft_on_task_switch_250523_short';
// Customize flags
const flags = {};
function getFeatureFlags() {
return Object.assign(window.APP_SETTINGS?.feature_flags || {}, flags);
}
export function isFF(id) {
const featureFlags = getFeatureFlags();
if (id in featureFlags) {
return featureFlags[id] === true;
}
else {
return window.APP_SETTINGS?.feature_flags_default_value === true;
}
}