Skip to content

Commit fe7acb9

Browse files
authored
fix: Revert "feat: BROS-87: Bitmask (#7766)" (#7796)
1 parent 4a1582d commit fe7acb9

File tree

30 files changed

+90
-2026
lines changed

30 files changed

+90
-2026
lines changed

docs/source/includes/tags/bitmask.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/source/includes/tags/bitmasklabels.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

web/libs/core/src/lib/utils/feature-flags/ff.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { FF_BITMASK, FF_SAMPLE_DATASETS } from "./flags";
1+
import { FF_SAMPLE_DATASETS } from "./flags";
22

33
const FEATURE_FLAGS = window.APP_SETTINGS?.feature_flags || {};
44

@@ -12,16 +12,14 @@ const FLAGS_OVERRIDE: Record<string, boolean> = {
1212
// Add your flags overrides as following:
1313
// [FF_FLAG_NAME]: boolean
1414
[FF_SAMPLE_DATASETS]: true,
15-
[FF_BITMASK]: true,
1615
};
1716

1817
/**
1918
* Checks if the Feature Flag is active or not.
2019
*/
2120
export const isActive = (id: string) => {
2221
const defaultValue = window.APP_SETTINGS?.feature_flags_default_value === true;
23-
const isSentryOSS =
24-
window?.APP_SETTINGS?.sentry_environment === "opensource" || process.env.NODE_ENV === "development";
22+
const isSentryOSS = window?.APP_SETTINGS?.sentry_environment === "opensource";
2523

2624
if (isSentryOSS && id in FLAGS_OVERRIDE) return FLAGS_OVERRIDE[id];
2725
if (id in FEATURE_FLAGS) return FEATURE_FLAGS[id] ?? defaultValue;

web/libs/core/src/lib/utils/feature-flags/flags.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,3 @@ export const FF_MULTICHANNEL_TS = "fflag_feat_front_bros58_timeseries_multichann
9797
* Enables enterprise email notifications
9898
*/
9999
export const FF_ENTERPRISE_EMAIL_NOTIFICATIONS = "fflag_feat_front_fit_183_email_notifications_short";
100-
101-
/**
102-
* Bitmask is a new image segmentation tool for masking that allows pixel-perfect editing
103-
*
104-
* @link https://app.launchdarkly.com/projects/default/flags/fflag_front_feat_bros_87_pixel_wise_16062025_short
105-
*/
106-
export const FF_BITMASK = "fflag_front_feat_bros_87_pixel_wise_16062025_short";

web/libs/editor/src/components/ImageView/Image.jsx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ import { FF_LSDV_4711, isFF } from "../../utils/feature-flags";
55
import messages from "../../utils/messages";
66
import { ErrorMessage } from "../ErrorMessage/ErrorMessage";
77
import "./Image.scss";
8-
import { ff } from "@humansignal/core";
9-
import { FF_BITMASK } from "@humansignal/core/lib/utils/feature-flags";
108

119
/**
1210
* Coordinates in relative mode belong to a data domain consisting of percentages in the range from 0 to 100
@@ -86,16 +84,7 @@ if (isFF(FF_LSDV_4711)) imgDefaultProps.crossOrigin = "anonymous";
8684
const ImageRenderer = observer(
8785
forwardRef(({ src, onLoad, imageTransform, isLoaded }, ref) => {
8886
const imageStyles = useMemo(() => {
89-
// We can't just skip rendering the image because we need its dimensions to be set
90-
// so we just hide it with 0x0 dimensions.
91-
//
92-
// Real dimension will still be available via `naturalWidth` and `naturalHeight`
93-
const style = ff.isActive(FF_BITMASK)
94-
? {
95-
width: 0,
96-
height: 0,
97-
}
98-
: imageTransform;
87+
const style = imageTransform ?? {};
9988

10089
return { ...style, maxWidth: "unset", visibility: isLoaded ? "visible" : "hidden" };
10190
}, [imageTransform, isLoaded]);

0 commit comments

Comments
 (0)