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
allow resizing up to 200px width, but keep default mobile width at 360
Oleg Isonen49b603c6ca74
diff --git a/app/designer/designer.tsx b/app/designer/designer.tsxindex 3ebd57b0f0..b87fb4580f 100644--- a/app/designer/designer.tsx+++ b/app/designer/designer.tsx@@ -21,7 +21,6 @@ import designerStyles from "./designer.css";import { Breadcrumbs } from "./features/breadcrumbs";import { TreePrevew } from "./features/tree-preview";import {- minWidth,useUpdateCanvasWidth,useSubscribeBreakpoints,} from "./features/breakpoints";@@ -197,7 +196,6 @@ export const Designer = ({ config, project }: DesignerProps) => {title={project.title}css={{height: "100%",- minWidth,}}style={{ width: canvasWidth }}/>diff --git a/app/designer/features/breakpoints/index.ts b/app/designer/features/breakpoints/index.tsindex 403793a94c..216d02cd97 100644--- a/app/designer/features/breakpoints/index.ts+++ b/app/designer/features/breakpoints/index.ts@@ -1,4 +1,3 @@export * from "./breakpoints";-export { minWidth } from "./width-setting";export * from "./use-update-canvas-width";export * from "./use-subscribe-breakpoints";diff --git a/app/designer/features/breakpoints/width-setting.tsx b/app/designer/features/breakpoints/width-setting.tsxindex 4021499221..5b1cf0d1c8 100644--- a/app/designer/features/breakpoints/width-setting.tsx+++ b/app/designer/features/breakpoints/width-setting.tsx@@ -8,10 +8,13 @@ import {import { Slider, Text, Flex } from "~/shared/design-system";import { sort } from "./sort";-// Doesn't make sense to allow resizing the canvas lower/higher than this.+// Currently most populare mobile resolutionexport const minWidth = 360;export const maxWidth = 3000;+// Doesn't make sense to allow resizing the canvas lower/higher than this.+const minResizeWidth = 200;+/*** Return the next breakpoint from the currently selected one, sorted by the `sort()`*/@@ -41,8 +44,8 @@ export const WidthSetting = () => {// We want to enable unconstrained resizing in a preview modeconst min = isPreviewMode- ? minWidth- : Math.max(minWidth, selectedBreakpoint.minWidth);+ ? minResizeWidth+ : Math.max(minResizeWidth, selectedBreakpoint.minWidth);const max = isPreviewMode? maxWidth: Math.min(