Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit 6e5130f

Browse files
Gondragoshlomzik
andauthored
fix: LSDV-3009: Fix draft saving stuck (#1193)
Co-authored-by: hlomzik <hlomzik@gmail.com>
1 parent 4ad8edb commit 6e5130f

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

src/stores/Annotation/Annotation.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,16 @@ import Types from '../../core/Types';
1111
import Area from '../../regions/Area';
1212
import Result from '../../regions/Result';
1313
import Utils from '../../utils';
14-
import { FF_DEV_1284, FF_DEV_1598, FF_DEV_2100, FF_DEV_2100_A, FF_DEV_2432, FF_DEV_3391, isFF } from '../../utils/feature-flags';
14+
import {
15+
FF_DEV_1284,
16+
FF_DEV_1598,
17+
FF_DEV_2100,
18+
FF_DEV_2100_A,
19+
FF_DEV_2432,
20+
FF_DEV_3391,
21+
FF_LSDV_3009,
22+
isFF
23+
} from '../../utils/feature-flags';
1524
import { delay, isDefined } from '../../utils/utilities';
1625
import { CommentStore } from '../Comment/CommentStore';
1726
import RegionStore from '../RegionStore';
@@ -646,7 +655,7 @@ export const Annotation = types
646655
const result = self.serializeAnnotation({ fast: true });
647656
// if this is new annotation and no regions added yet
648657

649-
if (!self.pk && !result.length) return;
658+
if (!isFF(FF_LSDV_3009) && !self.pk && !result.length) return;
650659

651660
self.setDraftSelected();
652661
self.versions.draft = result;

src/utils/feature-flags.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,14 @@ export const FF_LSDV_1148 = 'fflag_fix_font_lsdv_1148_hotkeys_namespaces_0102202
166166
*/
167167
export const FF_LSDV_3028 = 'fflag_feat_front_lsdv_3028_audio_v3_multichannel_default_17022023_short';
168168

169+
/**
170+
* Removing interrupting from the draft saving
171+
*
172+
* Without this flag we have a situation when changes in history leading to the empty results break functionality of adding comments and make the draft saving process indicator stay forever.
173+
* @link https://app.launchdarkly.com/default/production/features/fflag_fix_font_lsdv_1148_hotkeys_namespaces_01022023_short
174+
*/
175+
export const FF_LSDV_3009 = 'fflag_fix_font_lsdv_3009_draft_saving_stuck_130223_short';
176+
169177
function getFeatureFlags() {
170178
return {
171179
...(window.APP_SETTINGS?.feature_flags ?? {}),

0 commit comments

Comments
 (0)