Skip to content

Commit

Permalink
Missing required props indicator for the opened component
Browse files Browse the repository at this point in the history
adeira-source-id: c7b2857efd96a4a446d34b140ed8ee09f0a4fe50
  • Loading branch information
itsdouges authored and triplex-bot committed Nov 11, 2024
1 parent 4d36639 commit e13726c
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/lemon-pets-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"triplex-vsce": patch
---

Add warning dialog when a component is missing required props.
5 changes: 5 additions & 0 deletions .changeset/long-fans-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"triplex-vsce": patch
---

Component switcher now shows ellipsis if the component name is longer than the container.
4 changes: 4 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
24 changes: 24 additions & 0 deletions examples/test-fixture/src/required-props.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<>
<Gltf scale={size} src="assets/pmndrs.glb">
<meshStandardMaterial color={color} />
</Gltf>
</>
);
}

0 comments on commit e13726c

Please sign in to comment.