Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
experimental: More comboclass fixes (#3716)
Oleg Isonen429c406d2ba1
diff --git a/apps/builder/app/shared/copy-paste/plugin-webflow/plugin-webflow.test.tsx b/apps/builder/app/shared/copy-paste/plugin-webflow/plugin-webflow.test.tsxindex 812b692415..636a21433f 100644--- a/apps/builder/app/shared/copy-paste/plugin-webflow/plugin-webflow.test.tsx+++ b/apps/builder/app/shared/copy-paste/plugin-webflow/plugin-webflow.test.tsx@@ -2628,9 +2628,9 @@ describe("Styles", () => {instanceId: expect.any(String),values: ["uu1p3Xdvlq_AZOxnzDvAv",+ "uumXb7vHOnzTr-4SIW-wJ","uuBw1PRC_uE8RhTmwxaH8","uuORexg4BOrRXBJZgB80_",- "uumXb7vHOnzTr-4SIW-wJ",],},]);diff --git a/apps/builder/app/shared/copy-paste/plugin-webflow/styles.ts b/apps/builder/app/shared/copy-paste/plugin-webflow/styles.tsindex fa6012f628..0fd01aa207 100644--- a/apps/builder/app/shared/copy-paste/plugin-webflow/styles.ts+++ b/apps/builder/app/shared/copy-paste/plugin-webflow/styles.ts@@ -424,7 +424,7 @@ const mergeComboStyles = (styles: Array<WfStyle>) => {mergedStyle.styleLess += style.styleLess;mergedStyle.name += "." + style.name;for (const key in style.variants) {- if (key in style.variants === false) {+ if (key in mergedStyle.variants === false) {mergedStyle.variants[key] = { styleLess: "" };}mergedStyle.variants[key].styleLess += style.variants[key];@@ -531,6 +531,14 @@ export const addStyles = async ({}});+ addNodeTokenStyles({+ styleSourceId: await generateStyleSourceId(wfStyle.name),+ name: wfStyle.name,+ variants,+ instanceId,+ fragment,+ });+// Produce all possible combinatios of combo classes so we can check later if they alredy exist.// This is needed to achieve the same end-result as with combo-classes in webflow.const allComboClasses = comboStylesMerge.mergedClasses.flatMap((name1) =>@@ -546,13 +554,5 @@ export const addStyles = async ({addStyleSource(wsStyleSourceId, instanceId, fragment);}}-- addNodeTokenStyles({- styleSourceId: await generateStyleSourceId(wfStyle.name),- name: wfStyle.name,- variants,- instanceId,- fragment,- });}};