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

Commit 9dfc73a

Browse files
authored
fix: DEV-1555: move setSuggestions fix under FF (#451)
it may not help, but can break UX because it unselects region/label also change CRLF to LF in feature-flags.js
1 parent d5258cd commit 9dfc73a

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

src/stores/AnnotationStore.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import Area from "../regions/Area";
1717
import throttle from "lodash.throttle";
1818
import { ViewModel } from "../tags/visual";
1919
import { UserExtended } from "./UserStore";
20+
import { FF_DEV_1555, isFF } from "../utils/feature-flags";
2021

2122
const hotkeys = Hotkey("Annotations", "Annotations");
2223

@@ -840,7 +841,11 @@ const Annotation = types
840841
});
841842
}
842843

843-
self.updateObjects();
844+
if (isFF(FF_DEV_1555)) {
845+
self.updateObjects();
846+
} else {
847+
self.objects.forEach(obj => obj.needsUpdate?.());
848+
}
844849
},
845850

846851
/**

src/utils/feature-flags.js

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
const FEATURE_FLAGS = window.APP_SETTINGS?.feature_flags || {};
2-
3-
// Fix crosshair working with zoom & rotation
4-
export const FF_DEV_1285 = "ff_front_dev_1285_crosshair_wrong_zoom_140122_short";
5-
6-
export function isFF(id) {
7-
return FEATURE_FLAGS[id] === true;
8-
}
1+
const FEATURE_FLAGS = window.APP_SETTINGS?.feature_flags || {};
2+
3+
// Fix crosshair working with zoom & rotation
4+
export const FF_DEV_1285 = "ff_front_dev_1285_crosshair_wrong_zoom_140122_short";
5+
6+
// Auto-annotation regions are not visible until refresh
7+
export const FF_DEV_1555 = "ff_front_dev_1555_auto_annotations_not_visible";
8+
9+
export function isFF(id) {
10+
return FEATURE_FLAGS[id] === true;
11+
}

0 commit comments

Comments
 (0)