Skip to content

Commit 0ffba19

Browse files
authored
refactor: remove animation flags (#5269)
1 parent 136d7c1 commit 0ffba19

File tree

3 files changed

+0
-57
lines changed

3 files changed

+0
-57
lines changed

apps/builder/app/builder/features/command-panel/command-panel.tsx

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import { compareMedia } from "@webstudio-is/css-engine";
2323
import {
2424
componentCategories,
2525
collectionComponent,
26-
parseComponentName,
2726
elementComponent,
2827
tags,
2928
} from "@webstudio-is/sdk";
@@ -56,7 +55,6 @@ import { mapGroupBy } from "~/shared/shim";
5655
import { setActiveSidebarPanel } from "~/builder/shared/nano-states";
5756
import { $commandMetas } from "~/shared/commands-emitter";
5857
import { emitCommand } from "~/builder/shared/commands";
59-
import { isFeatureEnabled } from "@webstudio-is/feature-flags";
6058
import {
6159
getInstanceLabel,
6260
InstanceIcon,
@@ -122,23 +120,6 @@ const $componentOptions = computed(
122120
continue;
123121
}
124122

125-
if (
126-
category === "animations" &&
127-
isFeatureEnabled("animation") === false
128-
) {
129-
continue;
130-
}
131-
132-
const [namespace, shortName] = parseComponentName(name);
133-
134-
if (
135-
isFeatureEnabled("videoAnimation") === false &&
136-
namespace === "@webstudio-is/sdk-components-animation" &&
137-
shortName === "VideoAnimation"
138-
) {
139-
continue;
140-
}
141-
142123
// show only xml category and collection component in xml documents
143124
if (selectedPage?.meta.documentType === "xml") {
144125
if (category !== "xml" && name !== collectionComponent) {
@@ -167,16 +148,6 @@ const $componentOptions = computed(
167148
continue;
168149
}
169150

170-
const [namespace, shortName] = parseComponentName(name);
171-
172-
if (
173-
isFeatureEnabled("videoAnimation") === false &&
174-
namespace === "@webstudio-is/sdk-components-animation" &&
175-
shortName === "VideoAnimation"
176-
) {
177-
continue;
178-
}
179-
180151
const componentMeta = metas.get(name);
181152
const label =
182153
meta.label ??

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

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import {
88
type WsComponentMeta,
99
componentCategories,
1010
collectionComponent,
11-
parseComponentName,
1211
elementComponent,
1312
} from "@webstudio-is/sdk";
1413
import {
@@ -64,22 +63,6 @@ const $metas = computed(
6463
const availableComponents = new Set<string>();
6564
const metas: Meta[] = [];
6665
for (const [name, componentMeta] of componentMetas) {
67-
const [namespace, shortName] = parseComponentName(name);
68-
if (
69-
isFeatureEnabled("animation") === false &&
70-
namespace === "@webstudio-is/sdk-components-animation"
71-
) {
72-
continue;
73-
}
74-
75-
if (
76-
isFeatureEnabled("videoAnimation") === false &&
77-
namespace === "@webstudio-is/sdk-components-animation" &&
78-
shortName === "VideoAnimation"
79-
) {
80-
continue;
81-
}
82-
8366
// only set available components from component meta
8467
availableComponents.add(name);
8568
metas.push({
@@ -93,15 +76,6 @@ const $metas = computed(
9376
}
9477
for (const [name, templateMeta] of templates) {
9578
const componentMeta = componentMetas.get(name);
96-
const [namespace, shortName] = parseComponentName(name);
97-
if (
98-
isFeatureEnabled("videoAnimation") === false &&
99-
namespace === "@webstudio-is/sdk-components-animation" &&
100-
shortName === "VideoAnimation"
101-
) {
102-
continue;
103-
}
104-
10579
availableComponents.add(name);
10680
metas.push({
10781
name,

packages/feature-flags/src/flags.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@
22
export const internalComponents = false;
33
export const unsupportedBrowsers = false;
44
export const aiRadixComponents = false;
5-
export const animation = false;
6-
export const videoAnimation = false;
75
export const resourceProp = false;
86
export const tailwind = false;

0 commit comments

Comments
 (0)