Skip to content

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.

fix: Settings panel spacing (#2817)

Oleg Isonenf28c241a49e6
diff --git a/apps/builder/app/builder/features/inspector/inspector.tsx b/apps/builder/app/builder/features/inspector/inspector.tsx
index 62604e70ad..b562f8b830 100644
--- a/apps/builder/app/builder/features/inspector/inspector.tsx
+++ b/apps/builder/app/builder/features/inspector/inspector.tsx
@@ -14,6 +14,7 @@ import {
EnhancedTooltipProvider,
Flex,
ScrollArea,
+ Separator,
} from "@webstudio-is/design-system";
import { StylePanel } from "~/builder/features/style-panel";
import { SettingsPanelContainer } from "~/builder/features/settings-panel";
@@ -43,6 +44,7 @@ const InstanceInfo = ({ instance }: { instance: Instance }) => {
align="center"
css={{
px: theme.spacing[9],
+ my: theme.spacing[3],
height: theme.spacing[13],
color: theme.colors.foregroundSubtle,
}}
@@ -120,6 +122,7 @@ export const Inspector = ({ navigatorLayout }: InspectorProps) => {
)}
<PanelTabsTrigger value="settings">Settings</PanelTabsTrigger>
</PanelTabsList>
+ <Separator />
<PanelTabsContent value="style" css={contentStyle} tabIndex={-1}>
<InstanceInfo instance={selectedInstance} />
<StylePanel selectedInstance={selectedInstance} />
diff --git a/apps/builder/app/builder/features/settings-panel/props-section/props-section.tsx b/apps/builder/app/builder/features/settings-panel/props-section/props-section.tsx
index 1521a56862..a82248a693 100644
--- a/apps/builder/app/builder/features/settings-panel/props-section/props-section.tsx
+++ b/apps/builder/app/builder/features/settings-panel/props-section/props-section.tsx
@@ -174,7 +174,7 @@ export const PropsSection = (props: PropsSectionProps) => {
return (
<>
- <Row css={{ py: theme.spacing[5] }}>
+ <Row css={{ py: theme.spacing[3] }}>
{logic.systemProps.map((item) => renderProperty(props, item))}
</Row>
@@ -185,7 +185,7 @@ export const PropsSection = (props: PropsSectionProps) => {
onAdd={() => setAddingProp(true)}
hasItems={hasItems}
>
- <Flex gap="2" direction="column">
+ <Flex gap="1" direction="column">
{addingProp && (
<AddPropertyForm
availableProps={logic.availableProps}
diff --git a/apps/builder/app/builder/features/settings-panel/shared.tsx b/apps/builder/app/builder/features/settings-panel/shared.tsx
index 8d0eaeede6..7d43a4c807 100644
--- a/apps/builder/app/builder/features/settings-panel/shared.tsx
+++ b/apps/builder/app/builder/features/settings-panel/shared.tsx
@@ -7,6 +7,7 @@ import {
useState,
useEffect,
useMemo,
+ type ComponentProps,
} from "react";
import equal from "fast-deep-equal";
import {
@@ -26,7 +27,6 @@ import {
Grid,
Text,
theme,
- type CSS,
rawTheme,
} from "@webstudio-is/design-system";
import { humanizeString } from "~/shared/string-utils";
@@ -294,8 +294,11 @@ export const ResponsiveLayout = ({
);
};
-export const Row = ({ children, css }: { children: ReactNode; css?: CSS }) => (
- <Flex css={{ px: theme.spacing[9], ...css }} gap="2" direction="column">
+export const Row = ({
+ children,
+ css,
+}: Pick<ComponentProps<typeof Flex>, "css" | "children">) => (
+ <Flex css={{ px: theme.spacing[9], ...css }} direction="column">
{children}
</Flex>
);
diff --git a/apps/builder/app/builder/shared/binding-popover.tsx b/apps/builder/app/builder/shared/binding-popover.tsx
index 54e4f0d7ee..cb139d7e22 100644
--- a/apps/builder/app/builder/shared/binding-popover.tsx
+++ b/apps/builder/app/builder/shared/binding-popover.tsx
@@ -244,14 +244,14 @@ const bindingOpacityProperty = "--ws-binding-opacity";
export const BindingControl = ({ children }: { children: ReactNode }) => {
return (
- <Box
+ <Flex
css={{
position: "relative",
"&:hover": { [bindingOpacityProperty]: 1 },
}}
>
{children}
- </Box>
+ </Flex>
);
};
diff --git a/packages/design-system/src/components/panel-tabs.tsx b/packages/design-system/src/components/panel-tabs.tsx
index 01d98ffd78..613b331845 100644
--- a/packages/design-system/src/components/panel-tabs.tsx
+++ b/packages/design-system/src/components/panel-tabs.tsx
@@ -14,10 +14,8 @@ export const PanelTabs = styled(Primitive.Root, {
export const PanelTabsList = styled(Primitive.List, {
display: "flex",
- paddingRight: theme.spacing[5],
- paddingLeft: theme.spacing[5],
- paddingTop: theme.spacing[3],
- paddingBottom: theme.spacing[3],
+ px: theme.spacing[5],
+ py: theme.spacing[3],
});
export const PanelTabsTrigger = styled(Primitive.Trigger, {