Skip to content

Commit b7cca8f

Browse files
georginahalpernGeorgina
andauthored
[Fluent] DraggableLine, SpinButton/FLoatLineComponent, FileUploadLine with icon for NME (#16876)
<img width="243" height="355" alt="image" src="https://github.com/user-attachments/assets/d6072ef9-07f7-44a7-9adb-ac31130f6725" /> - split up floatLineComponent into usage of spinbutton/numberinput, parsing props to send proper precision/step values - condense draggableLine and draggableLineWithButton (only the delete button being used) - upload fileUploadLine UX --------- Co-authored-by: Georgina <[email protected]>
1 parent 110524d commit b7cca8f

File tree

72 files changed

+350
-221
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+350
-221
lines changed

packages/dev/inspector-v2/src/components/debug/debugPane.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { CreateGround } from "core/Meshes/Builders/groundBuilder";
1212
import { Tools } from "core/Misc/tools";
1313
import { UtilityLayerRenderer } from "core/Rendering/utilityLayerRenderer";
1414
import { GridMaterial } from "materials/grid/gridMaterial";
15-
import { SwitchPropertyLine } from "shared-ui-components/fluent/hoc/switchPropertyLine";
15+
import { SwitchPropertyLine } from "shared-ui-components/fluent/hoc/propertyLines/switchPropertyLine";
1616

1717
import { AccordionPane, AccordionPaneSection } from "../accordionPane";
1818
import { BoundProperty } from "../properties/boundProperty";

packages/dev/inspector-v2/src/components/properties/boundProperty.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type { ComponentType } from "react";
2-
import type { BaseComponentProps } from "shared-ui-components/fluent/hoc/propertyLine";
2+
import type { BaseComponentProps } from "shared-ui-components/fluent/hoc/propertyLines/propertyLine";
33
import { useProperty } from "../../hooks/compoundPropertyHooks";
44

55
/**

packages/dev/inspector-v2/src/components/properties/commonGeneralProperties.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import type { FunctionComponent } from "react";
22

33
import { useMemo } from "react";
44

5-
import { TextInputPropertyLine } from "shared-ui-components/fluent/hoc/inputPropertyLine";
6-
import { TextPropertyLine } from "shared-ui-components/fluent/hoc/textPropertyLine";
5+
import { TextInputPropertyLine } from "shared-ui-components/fluent/hoc/propertyLines/inputPropertyLine";
6+
import { TextPropertyLine } from "shared-ui-components/fluent/hoc/propertyLines/textPropertyLine";
77
import { useProperty } from "../../hooks/compoundPropertyHooks";
88
import { GetPropertyDescriptor, IsPropertyReadonly } from "../../instrumentation/propertyInstrumentation";
99

packages/dev/inspector-v2/src/components/properties/lights/areaLightSetupProperties.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { RectAreaLight } from "core/index";
22
import type { FunctionComponent } from "react";
33

4-
import { Color3PropertyLine } from "shared-ui-components/fluent/hoc/colorPropertyLine";
5-
import { NumberInputPropertyLine } from "shared-ui-components/fluent/hoc/inputPropertyLine";
6-
import { Vector3PropertyLine } from "shared-ui-components/fluent/hoc/vectorPropertyLine";
4+
import { Color3PropertyLine } from "shared-ui-components/fluent/hoc/propertyLines/colorPropertyLine";
5+
import { NumberInputPropertyLine } from "shared-ui-components/fluent/hoc/propertyLines/inputPropertyLine";
6+
import { Vector3PropertyLine } from "shared-ui-components/fluent/hoc/propertyLines/vectorPropertyLine";
77

88
import { useColor3Property, useVector3Property } from "../../../hooks/compoundPropertyHooks";
99
import { BoundProperty } from "../boundProperty";

packages/dev/inspector-v2/src/components/properties/lights/directionalLightSetupProperties.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { DirectionalLight } from "core/index";
22
import type { FunctionComponent } from "react";
33

4-
import { Color3PropertyLine } from "shared-ui-components/fluent/hoc/colorPropertyLine";
5-
import { NumberInputPropertyLine } from "shared-ui-components/fluent/hoc/inputPropertyLine";
6-
import { Vector3PropertyLine } from "shared-ui-components/fluent/hoc/vectorPropertyLine";
4+
import { Color3PropertyLine } from "shared-ui-components/fluent/hoc/propertyLines/colorPropertyLine";
5+
import { NumberInputPropertyLine } from "shared-ui-components/fluent/hoc/propertyLines/inputPropertyLine";
6+
import { Vector3PropertyLine } from "shared-ui-components/fluent/hoc/propertyLines/vectorPropertyLine";
77

88
import { useColor3Property, useVector3Property } from "../../../hooks/compoundPropertyHooks";
99
import { BoundProperty } from "../boundProperty";

packages/dev/inspector-v2/src/components/properties/lights/hemisphericLightSetupProperties.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { HemisphericLight } from "core/index";
22
import type { FunctionComponent } from "react";
33

4-
import { Color3PropertyLine } from "shared-ui-components/fluent/hoc/colorPropertyLine";
5-
import { NumberInputPropertyLine } from "shared-ui-components/fluent/hoc/inputPropertyLine";
6-
import { Vector3PropertyLine } from "shared-ui-components/fluent/hoc/vectorPropertyLine";
4+
import { Color3PropertyLine } from "shared-ui-components/fluent/hoc/propertyLines/colorPropertyLine";
5+
import { NumberInputPropertyLine } from "shared-ui-components/fluent/hoc/propertyLines/inputPropertyLine";
6+
import { Vector3PropertyLine } from "shared-ui-components/fluent/hoc/propertyLines/vectorPropertyLine";
77

88
import { useColor3Property, useVector3Property } from "../../../hooks/compoundPropertyHooks";
99
import { BoundProperty } from "../boundProperty";

packages/dev/inspector-v2/src/components/properties/lights/pointLightSetupProperties.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import type { PointLight } from "core/index";
22
import type { FunctionComponent } from "react";
33

4-
import { Color3PropertyLine } from "shared-ui-components/fluent/hoc/colorPropertyLine";
5-
import { NumberInputPropertyLine } from "shared-ui-components/fluent/hoc/inputPropertyLine";
6-
import { Vector3PropertyLine } from "shared-ui-components/fluent/hoc/vectorPropertyLine";
4+
import { Color3PropertyLine } from "shared-ui-components/fluent/hoc/propertyLines/colorPropertyLine";
5+
import { NumberInputPropertyLine } from "shared-ui-components/fluent/hoc/propertyLines/inputPropertyLine";
6+
import { Vector3PropertyLine } from "shared-ui-components/fluent/hoc/propertyLines/vectorPropertyLine";
77

88
import { useColor3Property, useVector3Property } from "../../../hooks/compoundPropertyHooks";
99
import { BoundProperty } from "../boundProperty";

packages/dev/inspector-v2/src/components/properties/lights/shadowGeneratorSetupProperties.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { DirectionalLight } from "core/Lights/directionalLight";
99
import { CascadedShadowGenerator } from "core/Lights/Shadows/cascadedShadowGenerator";
1010
import { ShadowGenerator } from "core/Lights/Shadows/shadowGenerator";
1111
import { ButtonLine } from "shared-ui-components/fluent/hoc/buttonLine";
12-
import { NumberDropdownPropertyLine, StringDropdownPropertyLine } from "shared-ui-components/fluent/hoc/dropdownPropertyLine";
12+
import { NumberDropdownPropertyLine, StringDropdownPropertyLine } from "shared-ui-components/fluent/hoc/propertyLines/dropdownPropertyLine";
1313
import { useObservableState } from "../../../hooks/observableHooks";
1414

1515
import "core/Lights/Shadows/shadowGeneratorSceneComponent";

packages/dev/inspector-v2/src/components/properties/lights/shadowsSetupProperties.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import type { FunctionComponent } from "react";
44

55
import { Collapse } from "@fluentui/react-motion-components-preview";
66

7-
import { NumberInputPropertyLine } from "shared-ui-components/fluent/hoc/inputPropertyLine";
7+
import { NumberInputPropertyLine } from "shared-ui-components/fluent/hoc/propertyLines/inputPropertyLine";
88

9-
import { SwitchPropertyLine } from "shared-ui-components/fluent/hoc/switchPropertyLine";
9+
import { SwitchPropertyLine } from "shared-ui-components/fluent/hoc/propertyLines/switchPropertyLine";
1010
import { useProperty } from "../../../hooks/compoundPropertyHooks";
1111
import { BoundProperty } from "../boundProperty";
1212

packages/dev/inspector-v2/src/components/properties/lights/spotLightSetupProperties.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ import type { SpotLight } from "core/index";
22
import type { FunctionComponent } from "react";
33

44
import { Tools } from "core/Misc/tools";
5-
import { Color3PropertyLine } from "shared-ui-components/fluent/hoc/colorPropertyLine";
6-
import { NumberInputPropertyLine } from "shared-ui-components/fluent/hoc/inputPropertyLine";
7-
import { SyncedSliderLine } from "shared-ui-components/fluent/hoc/syncedSliderLine";
8-
import { Vector3PropertyLine } from "shared-ui-components/fluent/hoc/vectorPropertyLine";
5+
import { Color3PropertyLine } from "shared-ui-components/fluent/hoc/propertyLines/colorPropertyLine";
6+
import { NumberInputPropertyLine } from "shared-ui-components/fluent/hoc/propertyLines/inputPropertyLine";
7+
import { SyncedSliderPropertyLine } from "shared-ui-components/fluent/hoc/propertyLines/syncedSliderPropertyLine";
8+
import { Vector3PropertyLine } from "shared-ui-components/fluent/hoc/propertyLines/vectorPropertyLine";
99

1010
import { useColor3Property, useProperty, useVector3Property } from "../../../hooks/compoundPropertyHooks";
1111

@@ -24,8 +24,8 @@ export const SpotLightSetupProperties: FunctionComponent<{ context: SpotLight }>
2424
<Color3PropertyLine label="Specular" value={groundColor} onChange={(val) => (spotLight.specular = val)} />
2525
<Vector3PropertyLine label="Direction" value={direction} onChange={(val) => (spotLight.direction = val)} />
2626
<Vector3PropertyLine label="Position" value={position} onChange={(val) => (spotLight.position = val)} />
27-
<SyncedSliderLine label="Angle" value={Tools.ToDegrees(angle)} min={0} max={90} step={0.1} onChange={(value) => (spotLight.angle = Tools.ToRadians(value))} />
28-
<SyncedSliderLine
27+
<SyncedSliderPropertyLine label="Angle" value={Tools.ToDegrees(angle)} min={0} max={90} step={0.1} onChange={(value) => (spotLight.angle = Tools.ToRadians(value))} />
28+
<SyncedSliderPropertyLine
2929
label="Inner Angle"
3030
value={Tools.ToDegrees(innerAngle)}
3131
min={0}

0 commit comments

Comments
 (0)