-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Inspector v2: Back compat for explorerExtensibility v1 option #17470
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inspector v2: Back compat for explorerExtensibility v1 option #17470
Conversation
|
Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds backward compatibility for Inspector v1's explorerExtensibility option in Inspector v2 by introducing support for context menu commands alongside inline commands. The key changes enable commands to be shown either inline in the tree view or in a right-click context menu, with optional icons for context menu commands.
- Implements conversion of v1
explorerExtensibilityoptions to v2 context menu commands - Refactors command type system to support "inline" and "contextMenu" modes
- Adds context menu rendering with support for action and toggle commands, including proper icon/checkmark handling
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| packages/dev/inspector-v2/src/legacy/inspector.tsx | Adds conversion logic to transform v1 explorerExtensibility entries into v2 context menu commands |
| packages/dev/inspector-v2/src/components/scene/sceneExplorer.tsx | Refactors command type definitions to support inline vs context menu modes, adds context menu rendering logic |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Snapshot stored with reference name: Test environment: To test a playground add it to the URL, for example: https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/refs/pull/17470/merge/index.html#WGZLGJ#4600 Links to test babylon tools with this snapshot: https://playground.babylonjs.com/?snapshot=refs/pull/17470/merge To test the snapshot in the playground with a playground ID add it after the snapshot query string: https://playground.babylonjs.com/?snapshot=refs/pull/17470/merge#BCU1XR#0 |
|
You have made possible changes to the playground. https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/PLAYGROUND/refs/pull/17470/merge/ The snapshot playground with the CDN snapshot (only when available): Note that neither Babylon scenes nor textures are uploaded to the snapshot directory, so some playgrounds won't work correctly. |
|
You have changed file(s) that made possible changes to the sandbox. https://snapshots-cvgtc2eugrd3cgfd.z01.azurefd.net/SANDBOX/refs/pull/17470/merge/ |
|
Devhost visualization test reporter: |
|
Visualization tests for WebGPU |
|
WebGL2 visualization test reporter: |
Prior to this PR Inspector v2 supports Scene Explorer "commands" which are shown inline in the tree view item, and as such they must have an icon. For the Inspector v1
explorerExtensibilityoption, it is effectively a Scene Explorer command, but has no icon. In Inspector v1, there is a...icon at the end that has the context menu. In Inspector v2, we already have a right click context menu for other things like expand/collapse. Given this, the strategy for Inspector v2 is:With this in place,
explorerExtensibilityis simply adding commands of type "action" and mode "contextMenu" with no icon.