fix(editor): Switch schema preview feature flag to multivariant (no-changelog) (#13983)

This commit is contained in:
Elias Meire
2025-03-17 11:07:53 +01:00
committed by GitHub
parent 4d04c227a9
commit e157217d8c
4 changed files with 14 additions and 5 deletions

View File

@@ -574,7 +574,10 @@ const isSchemaPreviewEnabled = computed(
!(nodeType.value?.codex?.categories ?? []).some(
(category) => category === CORE_NODES_CATEGORY,
) &&
posthogStore.isFeatureEnabled(SCHEMA_PREVIEW_EXPERIMENT),
posthogStore.isVariantEnabled(
SCHEMA_PREVIEW_EXPERIMENT.name,
SCHEMA_PREVIEW_EXPERIMENT.variant,
),
);
const hasPreviewSchema = asyncComputed(async () => {

View File

@@ -484,7 +484,7 @@ describe('VirtualSchema.vue', () => {
const trackSpy = vi.spyOn(telemetry, 'track');
const posthogStore = usePostHog();
vi.spyOn(posthogStore, 'isFeatureEnabled').mockReturnValue(true);
vi.spyOn(posthogStore, 'isVariantEnabled').mockReturnValue(true);
const schemaPreviewStore = useSchemaPreviewStore();
vi.spyOn(schemaPreviewStore, 'getSchemaPreview').mockResolvedValue(
createResultOk({
@@ -562,7 +562,7 @@ describe('VirtualSchema.vue', () => {
data: [],
});
const posthogStore = usePostHog();
vi.spyOn(posthogStore, 'isFeatureEnabled').mockReturnValue(true);
vi.spyOn(posthogStore, 'isVariantEnabled').mockReturnValue(true);
const schemaPreviewStore = useSchemaPreviewStore();
vi.spyOn(schemaPreviewStore, 'getSchemaPreview').mockResolvedValue(
createResultOk({

View File

@@ -130,7 +130,7 @@ const getNodeSchema = async (fullNode: INodeUi, connectedNode: IConnectedNode) =
};
const isSchemaPreviewEnabled = computed(() =>
posthogStore.isFeatureEnabled(SCHEMA_PREVIEW_EXPERIMENT),
posthogStore.isVariantEnabled(SCHEMA_PREVIEW_EXPERIMENT.name, SCHEMA_PREVIEW_EXPERIMENT.variant),
);
const nodeSchema = asyncComputed(async () => {