Rename debug pane label for artifact graph (#5092)
* Rename debug pane label for artifact graph * Rename component
This commit is contained in:
@ -38,14 +38,14 @@ test.describe('Debug pane', () => {
|
|||||||
// Set the code in the code editor.
|
// Set the code in the code editor.
|
||||||
await u.codeLocator.click()
|
await u.codeLocator.click()
|
||||||
await page.keyboard.type(code, { delay: 0 })
|
await page.keyboard.type(code, { delay: 0 })
|
||||||
// Scroll to the feature tree.
|
// Scroll to the artifact graph.
|
||||||
await tree.scrollIntoViewIfNeeded()
|
await tree.scrollIntoViewIfNeeded()
|
||||||
// Expand the feature tree.
|
// Expand the artifact graph.
|
||||||
await tree.getByText('Feature Tree').click()
|
await tree.getByText('Artifact Graph').click()
|
||||||
// Just expanded the details, making the element taller, so scroll again.
|
// Just expanded the details, making the element taller, so scroll again.
|
||||||
await tree.getByText('Plane').first().scrollIntoViewIfNeeded()
|
await tree.getByText('Plane').first().scrollIntoViewIfNeeded()
|
||||||
})
|
})
|
||||||
// Extract the artifact IDs from the debug feature tree.
|
// Extract the artifact IDs from the debug artifact graph.
|
||||||
const initialSegmentIds = await segment.innerText({ timeout: 5_000 })
|
const initialSegmentIds = await segment.innerText({ timeout: 5_000 })
|
||||||
// The artifact ID should include a UUID.
|
// The artifact ID should include a UUID.
|
||||||
expect(initialSegmentIds).toMatch(
|
expect(initialSegmentIds).toMatch(
|
||||||
|
@ -4,18 +4,18 @@ import { expandPlane, PlaneArtifactRich } from 'lang/std/artifactGraph'
|
|||||||
import { ArtifactGraph } from 'lang/wasm'
|
import { ArtifactGraph } from 'lang/wasm'
|
||||||
import { DebugDisplayArray, GenericObj } from './DebugDisplayObj'
|
import { DebugDisplayArray, GenericObj } from './DebugDisplayObj'
|
||||||
|
|
||||||
export function DebugFeatureTree() {
|
export function DebugArtifactGraph() {
|
||||||
const featureTree = useMemo(() => {
|
const artifactGraphTree = useMemo(() => {
|
||||||
return computeTree(engineCommandManager.artifactGraph)
|
return computeTree(engineCommandManager.artifactGraph)
|
||||||
}, [engineCommandManager.artifactGraph])
|
}, [engineCommandManager.artifactGraph])
|
||||||
|
|
||||||
const filterKeys: string[] = ['__meta', 'codeRef', 'pathToNode']
|
const filterKeys: string[] = ['__meta', 'codeRef', 'pathToNode']
|
||||||
return (
|
return (
|
||||||
<details data-testid="debug-feature-tree" className="relative">
|
<details data-testid="debug-feature-tree" className="relative">
|
||||||
<summary>Feature Tree</summary>
|
<summary>Artifact Graph</summary>
|
||||||
{featureTree.length > 0 ? (
|
{artifactGraphTree.length > 0 ? (
|
||||||
<pre className="text-xs">
|
<pre className="text-xs">
|
||||||
<DebugDisplayArray arr={featureTree} filterKeys={filterKeys} />
|
<DebugDisplayArray arr={artifactGraphTree} filterKeys={filterKeys} />
|
||||||
</pre>
|
</pre>
|
||||||
) : (
|
) : (
|
||||||
<p>(Empty)</p>
|
<p>(Empty)</p>
|
@ -1,4 +1,4 @@
|
|||||||
import { DebugFeatureTree } from 'components/DebugFeatureTree'
|
import { DebugArtifactGraph } from 'components/DebugArtifactGraph'
|
||||||
import { AstExplorer } from '../../AstExplorer'
|
import { AstExplorer } from '../../AstExplorer'
|
||||||
import { EngineCommands } from '../../EngineCommands'
|
import { EngineCommands } from '../../EngineCommands'
|
||||||
import { CamDebugSettings } from 'clientSideScene/ClientSideSceneComp'
|
import { CamDebugSettings } from 'clientSideScene/ClientSideSceneComp'
|
||||||
@ -14,7 +14,7 @@ export const DebugPane = () => {
|
|||||||
<EngineCommands />
|
<EngineCommands />
|
||||||
<CamDebugSettings />
|
<CamDebugSettings />
|
||||||
<AstExplorer />
|
<AstExplorer />
|
||||||
<DebugFeatureTree />
|
<DebugArtifactGraph />
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user