From e13726c9b413361b12664a804fdb254f1011f774 Mon Sep 17 00:00:00 2001 From: Michael Dougall <6801309+itsdouges@users.noreply.github.com> Date: Mon, 11 Nov 2024 11:28:07 +1100 Subject: [PATCH] Missing required props indicator for the opened component adeira-source-id: c7b2857efd96a4a446d34b140ed8ee09f0a4fe50 --- .changeset/lemon-pets-smash.md | 5 ++++ .changeset/long-fans-try.md | 5 ++++ .vscode/launch.json | 4 ++++ examples/test-fixture/src/required-props.tsx | 24 ++++++++++++++++++++ 4 files changed, 38 insertions(+) create mode 100644 .changeset/lemon-pets-smash.md create mode 100644 .changeset/long-fans-try.md create mode 100644 examples/test-fixture/src/required-props.tsx diff --git a/.changeset/lemon-pets-smash.md b/.changeset/lemon-pets-smash.md new file mode 100644 index 00000000..db7ca144 --- /dev/null +++ b/.changeset/lemon-pets-smash.md @@ -0,0 +1,5 @@ +--- +"triplex-vsce": patch +--- + +Add warning dialog when a component is missing required props. diff --git a/.changeset/long-fans-try.md b/.changeset/long-fans-try.md new file mode 100644 index 00000000..c5aaa92d --- /dev/null +++ b/.changeset/long-fans-try.md @@ -0,0 +1,5 @@ +--- +"triplex-vsce": patch +--- + +Component switcher now shows ellipsis if the component name is longer than the container. diff --git a/.vscode/launch.json b/.vscode/launch.json index 04c27773..09a01583 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -5,6 +5,10 @@ "name": "Run VS Code", "type": "extensionHost", "request": "launch", + "env": { + "FG_ENVIRONMENT_OVERRIDE": "development" + }, + "debugWebviews": true, "args": [ "${workspaceFolder}/examples", "${workspaceFolder}/examples/test-fixture/src/scene.tsx", diff --git a/examples/test-fixture/src/required-props.tsx b/examples/test-fixture/src/required-props.tsx new file mode 100644 index 00000000..501a6abd --- /dev/null +++ b/examples/test-fixture/src/required-props.tsx @@ -0,0 +1,24 @@ +/** + * Copyright (c) Michael Dougall. All rights reserved. + * + * This source code is licensed under the GPL-3.0 license found in the LICENSE + * file in the root directory of this source tree. + */ + +import { Gltf } from "@react-three/drei"; + +export function RequiredProps({ + color = "red", + size, +}: { + color: string; + size: number; +}) { + return ( + <> + + + + + ); +}