Skip to content

Commit 503f918

Browse files
committed
Hide content mode and component under feature flag
1 parent 0ae15f0 commit 503f918

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

apps/builder/app/builder/features/components/components.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useStore } from "@nanostores/react";
33
import { CrossIcon } from "@webstudio-is/icons";
44
import {
55
type WsComponentMeta,
6+
blockComponent,
67
collectionComponent,
78
componentCategories,
89
} from "@webstudio-is/react-sdk";
@@ -123,6 +124,13 @@ const filterAndGroupComponents = ({
123124
return false;
124125
}
125126

127+
if (
128+
component === blockComponent &&
129+
isFeatureEnabled("contentEditableMode") === false
130+
) {
131+
return false;
132+
}
133+
126134
return true;
127135
});
128136

apps/builder/app/builder/features/topbar/builder-mode.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {
3232
type BuilderMode,
3333
} from "~/shared/nano-states";
3434
import { useState } from "react";
35+
import { isFeatureEnabled } from "@webstudio-is/feature-flags";
3536

3637
const StyledMenuItem = styled(DropdownMenuRadioItem, {
3738
"&:where([data-state='checked'])": {
@@ -57,7 +58,7 @@ export const BuilderModeDropDown = () => {
5758
description: "Modify the page content",
5859
title: "Content",
5960
shortcut: ["cmd", "shift", "c"],
60-
enabled: isContentModeAllowed,
61+
enabled: isContentModeAllowed && isFeatureEnabled("contentEditableMode"),
6162
},
6263
preview: {
6364
icon: <PlayIcon />,

0 commit comments

Comments
 (0)