From a7bb87c3ed8b9466a4e1bcf4cc0af6f6d2591dc9 Mon Sep 17 00:00:00 2001 From: Alexandre Rousseau Date: Sat, 9 Nov 2024 22:49:05 +0100 Subject: [PATCH] feat(ui): put Dataframe editor behind feature flag - WF-66 Put the new dataframe editor behind the flag `dataframeEditor`. So to activate the new feature, you need to add the flag in `main.py` like this: ```py wf.Config.feature_flags.append("dataframeEditor") ``` --- .../core/content/CoreDataframeLegacy.vue | 653 ++++++++++++++++++ src/ui/src/core/index.ts | 11 + 2 files changed, 664 insertions(+) create mode 100644 src/ui/src/components/core/content/CoreDataframeLegacy.vue diff --git a/src/ui/src/components/core/content/CoreDataframeLegacy.vue b/src/ui/src/components/core/content/CoreDataframeLegacy.vue new file mode 100644 index 000000000..cddbe3073 --- /dev/null +++ b/src/ui/src/components/core/content/CoreDataframeLegacy.vue @@ -0,0 +1,653 @@ + + + + + + diff --git a/src/ui/src/core/index.ts b/src/ui/src/core/index.ts index e45d3627d..22ed6ebc6 100644 --- a/src/ui/src/core/index.ts +++ b/src/ui/src/core/index.ts @@ -13,6 +13,7 @@ import { getSupportedComponentTypes, getComponentDefinition, registerAbstractComponentTemplate, + registerComponentTemplate, } from "./templateMap"; import * as typeHierarchy from "./typeHierarchy"; import { auditAndFixComponents } from "./auditAndFix"; @@ -97,6 +98,16 @@ export function generateCore() { featureFlags.value = initData.featureFlags; loadAbstractTemplates(initData.abstractTemplates); + // put some components behind feature flag + + if (featureFlags.value.includes("dataframeEditor")) { + const component = await import( + "@/components/core/content/CoreDataframe.vue" + ).then((m) => m.default); + + registerComponentTemplate("dataframe", component); + } + // Only returned for edit (Builder) mode userFunctions.value = initData.userFunctions;