diff --git a/editor/src/components/inspector/constraints-section.tsx b/editor/src/components/inspector/constraints-section.tsx index 95cd3353e71c..2d0f6f0d957d 100644 --- a/editor/src/components/inspector/constraints-section.tsx +++ b/editor/src/components/inspector/constraints-section.tsx @@ -125,7 +125,7 @@ const GroupChildConstraintsSection = React.memo(() => { return ( - + { return ( - + diff --git a/editor/src/components/inspector/fill-hug-fixed-control.tsx b/editor/src/components/inspector/fill-hug-fixed-control.tsx index 2136933abf79..e97e7e2e5e5b 100644 --- a/editor/src/components/inspector/fill-hug-fixed-control.tsx +++ b/editor/src/components/inspector/fill-hug-fixed-control.tsx @@ -71,13 +71,13 @@ import type { ElementPathTrees } from '../../core/shared/element-path-tree' export const FillFixedHugControlId = (segment: 'width' | 'height'): string => `hug-fixed-fill-${segment}` -export const FillContainerLabel = 'Fill container' as const +export const FillContainerLabel = 'Fill' as const export const FixedLabel = 'Fixed' as const export const ScaledLabel = 'Scaled' as const -export const HugContentsLabel = 'Hug contents' as const +export const HugContentsLabel = 'Hug' as const export const SqueezeContentsLabel = 'Squeeze' as const export const CollapsedLabel = 'Collapsed' as const -export const HugGroupContentsLabel = 'Hug contents' as const +export const HugGroupContentsLabel = 'Hug' as const export const ComputedLabel = 'Computed' as const export const DetectedLabel = 'Detected' as const diff --git a/editor/src/components/inspector/flex-section.tsx b/editor/src/components/inspector/flex-section.tsx index 733a7184fdcd..97a4d96f5e34 100644 --- a/editor/src/components/inspector/flex-section.tsx +++ b/editor/src/components/inspector/flex-section.tsx @@ -523,7 +523,6 @@ function AxisDimensionControl({ {value.areaName ?? index + 1} ( (props: AlignDistributeButtonProps) => { return ( - + ) }, ) @@ -177,7 +177,6 @@ const AlignmentButtons = React.memo((props: { numberOfTargets: number }) => { justifyContent: 'space-around', alignItems: 'center', height: UtopiaTheme.layout.rowHeight.normal, - background: colorTheme.inspectorBackground.value, padding: '8px 0px', flexShrink: 0, }} diff --git a/editor/src/components/inspector/sections/layout-section/self-layout-subsection/clip-content-control.tsx b/editor/src/components/inspector/sections/layout-section/self-layout-subsection/clip-content-control.tsx index 50223da80cf2..80ac7a0fa474 100644 --- a/editor/src/components/inspector/sections/layout-section/self-layout-subsection/clip-content-control.tsx +++ b/editor/src/components/inspector/sections/layout-section/self-layout-subsection/clip-content-control.tsx @@ -2,6 +2,7 @@ import React from 'react' import { useInspectorStyleInfo, useIsSubSectionVisible } from '../../../common/property-path-hooks' import { BooleanControl } from '../../../controls/boolean-control' import { FlexRow } from 'utopia-api' +import { UtopiaTheme } from '../../../../../uuiui' export const ClipContentControl = React.memo(() => { const isVisible = useIsSubSectionVisible('overflow') @@ -20,7 +21,15 @@ export const ClipContentControl = React.memo(() => { } return ( - + { `, - expectedFixedHugDropdownWidthValue: 'Hug contents', - expectedFixedHugDropdownHeightValue: 'Hug contents', + expectedFixedHugDropdownWidthValue: 'Hug', + expectedFixedHugDropdownHeightValue: 'Hug', }), ) @@ -710,8 +710,8 @@ describe('Frame updating layout section', () => { `, - expectedFixedHugDropdownWidthValue: 'Hug contents', - expectedFixedHugDropdownHeightValue: 'Hug contents', + expectedFixedHugDropdownWidthValue: 'Hug', + expectedFixedHugDropdownHeightValue: 'Hug', }), ) }) @@ -1113,8 +1113,8 @@ describe('Frame updating layout section', () => { `, - expectedFixedHugDropdownWidthValue: 'Hug contents', - expectedFixedHugDropdownHeightValue: 'Hug contents', + expectedFixedHugDropdownWidthValue: 'Hug', + expectedFixedHugDropdownHeightValue: 'Hug', }), ) @@ -1427,7 +1427,7 @@ describe('Frame updating layout section', () => { /> `, expectedFixedHugDropdownWidthValue: 'Scaled', - expectedFixedHugDropdownHeightValue: 'Fill container', + expectedFixedHugDropdownHeightValue: 'Fill', }), ) @@ -1693,8 +1693,8 @@ describe('Frame updating layout section', () => { `, - expectedFixedHugDropdownWidthValue: 'Hug contents', - expectedFixedHugDropdownHeightValue: 'Hug contents', + expectedFixedHugDropdownWidthValue: 'Hug', + expectedFixedHugDropdownHeightValue: 'Hug', }), ) @@ -1863,8 +1863,8 @@ describe('Frame updating layout section', () => { `, - expectedFixedHugDropdownWidthValue: 'Hug contents', - expectedFixedHugDropdownHeightValue: 'Hug contents', + expectedFixedHugDropdownWidthValue: 'Hug', + expectedFixedHugDropdownHeightValue: 'Hug', }), ) @@ -2033,8 +2033,8 @@ describe('Frame updating layout section', () => { `, - expectedFixedHugDropdownWidthValue: 'Hug contents', - expectedFixedHugDropdownHeightValue: 'Hug contents', + expectedFixedHugDropdownWidthValue: 'Hug', + expectedFixedHugDropdownHeightValue: 'Hug', }), ) @@ -2203,8 +2203,8 @@ describe('Frame updating layout section', () => { `, - expectedFixedHugDropdownWidthValue: 'Hug contents', - expectedFixedHugDropdownHeightValue: 'Hug contents', + expectedFixedHugDropdownWidthValue: 'Hug', + expectedFixedHugDropdownHeightValue: 'Hug', }), ) }) @@ -2407,7 +2407,7 @@ describe('Frame updating layout section', () => { }} /> `, - expectedFixedHugDropdownWidthValue: 'Fill container', + expectedFixedHugDropdownWidthValue: 'Fill', expectedFixedHugDropdownHeightValue: 'Scaled', }), ) diff --git a/editor/src/components/inspector/sections/layout-section/self-layout-subsection/frame-updating-layout-section.tsx b/editor/src/components/inspector/sections/layout-section/self-layout-subsection/frame-updating-layout-section.tsx index 714243ecdbf3..a48bf49ff382 100644 --- a/editor/src/components/inspector/sections/layout-section/self-layout-subsection/frame-updating-layout-section.tsx +++ b/editor/src/components/inspector/sections/layout-section/self-layout-subsection/frame-updating-layout-section.tsx @@ -273,11 +273,7 @@ export const FrameUpdatingLayoutSection = React.memo(() => { return ( <> - + { invalid={invalidPins.top || invalidPins.bottom} // currently showing red for BOTH directions /> - + { return ( - - - - - - + + + + {when(showWrapperSectionWarning, )} - + {when( showLayoutSection, <> - + - + - - + + - + , )} diff --git a/editor/src/components/inspector/sections/style-section/text-subsection/text-shadow-subsection.tsx b/editor/src/components/inspector/sections/style-section/text-subsection/text-shadow-subsection.tsx index d8bbc4d707d1..f48507b985c1 100644 --- a/editor/src/components/inspector/sections/style-section/text-subsection/text-shadow-subsection.tsx +++ b/editor/src/components/inspector/sections/style-section/text-subsection/text-shadow-subsection.tsx @@ -176,8 +176,7 @@ const TextShadowItem = React.memo((props) => { <--1fr-->|22px|': { - gridColumnGap: 4, + gridColumnGap: 8, gridTemplateColumns: '1fr 1fr 22px', }, + '<--auto--><--1fr-->|22px|': { + gridColumnGap: 8, + gridTemplateColumns: 'auto 1fr 22px', + }, '<--1fr--><--1fr-->|-18px-|': { gridColumnGap: 4, // multiple columns with 1fr don't actually resize evenly as expected, diff --git a/editor/src/core/performance/__snapshots__/performance-regression-tests.spec.tsx.snap b/editor/src/core/performance/__snapshots__/performance-regression-tests.spec.tsx.snap index 6a9ad7f91c35..0a70f798d0e7 100644 --- a/editor/src/core/performance/__snapshots__/performance-regression-tests.spec.tsx.snap +++ b/editor/src/core/performance/__snapshots__/performance-regression-tests.spec.tsx.snap @@ -592,17 +592,17 @@ Array [ "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/FrameUpdatingLayoutControl/UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/FrameUpdatingLayoutControl/Symbol(react.memo)(NumberInput)", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/FrameUpdatingLayoutControl/UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", - "/Symbol(react.forward_ref)(Styled(div))/div//Symbol(react.memo)()", - "/Symbol(react.forward_ref)(Styled(div))/div//div", - "/Symbol(react.forward_ref)(Styled(div))/div//UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//Symbol(react.memo)()", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//div", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", - "/Symbol(react.forward_ref)(Styled(div))/div//UtopiaSpiedFunctionComponent(BooleanControl)", - "/Symbol(react.forward_ref)(Styled(div))/div//UtopiaSpiedFunctionComponent(FlexRow)", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//UtopiaSpiedFunctionComponent(BooleanControl)", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//UtopiaSpiedFunctionComponent(FlexRow)", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/OpacityRow/span", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/OpacityRow/Symbol(react.memo)()", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/OpacityRow/UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", @@ -1134,17 +1134,17 @@ Array [ "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/FrameUpdatingLayoutControl/UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/FrameUpdatingLayoutControl/Symbol(react.memo)(NumberInput)", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/FrameUpdatingLayoutControl/UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", - "/Symbol(react.forward_ref)(Styled(div))/div//Symbol(react.memo)()", - "/Symbol(react.forward_ref)(Styled(div))/div//div", - "/Symbol(react.forward_ref)(Styled(div))/div//UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//Symbol(react.memo)()", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//div", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", - "/Symbol(react.forward_ref)(Styled(div))/div//UtopiaSpiedFunctionComponent(BooleanControl)", - "/Symbol(react.forward_ref)(Styled(div))/div//UtopiaSpiedFunctionComponent(FlexRow)", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//UtopiaSpiedFunctionComponent(BooleanControl)", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//UtopiaSpiedFunctionComponent(FlexRow)", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/OpacityRow/span", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/OpacityRow/Symbol(react.memo)()", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/OpacityRow/UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", @@ -1395,17 +1395,17 @@ Array [ "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/FrameUpdatingLayoutControl/UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/FrameUpdatingLayoutControl/Symbol(react.memo)(NumberInput)", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/FrameUpdatingLayoutControl/UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", - "/Symbol(react.forward_ref)(Styled(div))/div//Symbol(react.memo)()", - "/Symbol(react.forward_ref)(Styled(div))/div//div", - "/Symbol(react.forward_ref)(Styled(div))/div//UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//Symbol(react.memo)()", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//div", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", - "/Symbol(react.forward_ref)(Styled(div))/div//UtopiaSpiedFunctionComponent(BooleanControl)", - "/Symbol(react.forward_ref)(Styled(div))/div//UtopiaSpiedFunctionComponent(FlexRow)", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//UtopiaSpiedFunctionComponent(BooleanControl)", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//UtopiaSpiedFunctionComponent(FlexRow)", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/OpacityRow/span", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/OpacityRow/Symbol(react.memo)()", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/OpacityRow/UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", @@ -1966,17 +1966,17 @@ Array [ "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/FrameUpdatingLayoutControl/UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/FrameUpdatingLayoutControl/Symbol(react.memo)(NumberInput)", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/FrameUpdatingLayoutControl/UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", - "/Symbol(react.forward_ref)(Styled(div))/div//Symbol(react.memo)()", - "/Symbol(react.forward_ref)(Styled(div))/div//div", - "/Symbol(react.forward_ref)(Styled(div))/div//UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//Symbol(react.memo)()", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//div", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", - "/Symbol(react.forward_ref)(Styled(div))/div//UtopiaSpiedFunctionComponent(BooleanControl)", - "/Symbol(react.forward_ref)(Styled(div))/div//UtopiaSpiedFunctionComponent(FlexRow)", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//UtopiaSpiedFunctionComponent(BooleanControl)", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//UtopiaSpiedFunctionComponent(FlexRow)", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/OpacityRow/span", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/OpacityRow/Symbol(react.memo)()", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/OpacityRow/UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", @@ -2489,17 +2489,17 @@ Array [ "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/FrameUpdatingLayoutControl/UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/FrameUpdatingLayoutControl/Symbol(react.memo)(NumberInput)", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/FrameUpdatingLayoutControl/UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", - "/Symbol(react.forward_ref)(Styled(div))/div//Symbol(react.memo)()", - "/Symbol(react.forward_ref)(Styled(div))/div//div", - "/Symbol(react.forward_ref)(Styled(div))/div//UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//Symbol(react.memo)()", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//div", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", - "/Symbol(react.forward_ref)(Styled(div))/div//UtopiaSpiedFunctionComponent(BooleanControl)", - "/Symbol(react.forward_ref)(Styled(div))/div//UtopiaSpiedFunctionComponent(FlexRow)", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//UtopiaSpiedFunctionComponent(BooleanControl)", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//UtopiaSpiedFunctionComponent(FlexRow)", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/OpacityRow/span", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/OpacityRow/Symbol(react.memo)()", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/OpacityRow/UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", @@ -2890,17 +2890,17 @@ Array [ "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/FrameUpdatingLayoutControl/UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/FrameUpdatingLayoutControl/Symbol(react.memo)(NumberInput)", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/FrameUpdatingLayoutControl/UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", - "/Symbol(react.forward_ref)(Styled(div))/div//Symbol(react.memo)()", - "/Symbol(react.forward_ref)(Styled(div))/div//div", - "/Symbol(react.forward_ref)(Styled(div))/div//UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//Symbol(react.memo)()", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//div", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", "/div/div//Symbol(react.memo)()", - "/Symbol(react.forward_ref)(Styled(div))/div//UtopiaSpiedFunctionComponent(BooleanControl)", - "/Symbol(react.forward_ref)(Styled(div))/div//UtopiaSpiedFunctionComponent(FlexRow)", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//UtopiaSpiedFunctionComponent(BooleanControl)", + "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div//UtopiaSpiedFunctionComponent(FlexRow)", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/OpacityRow/span", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/OpacityRow/Symbol(react.memo)()", "/Symbol(react.forward_ref)(EmotionCssPropInternal)/div/OpacityRow/UtopiaSpiedFunctionComponent(InspectorContextMenuWrapper)", diff --git a/editor/src/uuiui/inputs/base-input.tsx b/editor/src/uuiui/inputs/base-input.tsx index f7af8140e568..c25d576a0d02 100644 --- a/editor/src/uuiui/inputs/base-input.tsx +++ b/editor/src/uuiui/inputs/base-input.tsx @@ -137,7 +137,7 @@ export const InspectorInputEmotionStyle = ({ paddingTop: 2, paddingBottom: 2, paddingRight: 6, - paddingLeft: hasLabel ? 22 : 6, + paddingLeft: hasLabel ? 26 : 6, background: 'transparent', fontStyle: controlStyles.fontStyle, fontWeight: controlStyles.fontWeight, diff --git a/editor/src/uuiui/inputs/number-or-keyword-control.tsx b/editor/src/uuiui/inputs/number-or-keyword-control.tsx index 992a63da3438..0d1f3c95a93f 100644 --- a/editor/src/uuiui/inputs/number-or-keyword-control.tsx +++ b/editor/src/uuiui/inputs/number-or-keyword-control.tsx @@ -1,6 +1,6 @@ import type { CSSProperties } from 'react' import React from 'react' -import { Icons } from '../icons' +import { Icons, SmallerIcons } from '../icons' import { DropdownMenu, regularDropdownMenuItem, @@ -53,11 +53,12 @@ export function NumberOrKeywordControl(props: NumberOrKeywordC const dropdownButton = React.useCallback( () => ( - ), diff --git a/editor/src/uuiui/widgets/popup-list/popup-list.tsx b/editor/src/uuiui/widgets/popup-list/popup-list.tsx index d9fa7d749394..251bbdef0ad1 100644 --- a/editor/src/uuiui/widgets/popup-list/popup-list.tsx +++ b/editor/src/uuiui/widgets/popup-list/popup-list.tsx @@ -472,7 +472,7 @@ const SingleValue = (props: SingleValueProps) => { )} {props.children}