Add helix to the artifact graph (#5317)
* Add helix simulation test * Update output for new test * Add helix to the artifact graph * Update output since adding helix to the graph * Fix helix selection-based deletion (#5323) * Fix helix selection-based deletion * Run e2e tests on all PRs * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: Pierre Jacquier <pierrejacquier39@gmail.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -1375,6 +1375,7 @@ export async function deleteFromSelection(
|
||||
varDec.node.init.type === 'PipeExpression') ||
|
||||
selection.artifact?.type === 'sweep' ||
|
||||
selection.artifact?.type === 'plane' ||
|
||||
selection.artifact?.type === 'helix' ||
|
||||
!selection.artifact // aka expected to be a shell at this point
|
||||
) {
|
||||
let extrudeNameToDelete = ''
|
||||
@ -1382,7 +1383,8 @@ export async function deleteFromSelection(
|
||||
if (
|
||||
selection.artifact &&
|
||||
selection.artifact.type !== 'sweep' &&
|
||||
selection.artifact.type !== 'plane'
|
||||
selection.artifact.type !== 'plane' &&
|
||||
selection.artifact.type !== 'helix'
|
||||
) {
|
||||
const varDecName = varDec.node.id.name
|
||||
traverse(astClone, {
|
||||
@ -1421,13 +1423,17 @@ export async function deleteFromSelection(
|
||||
if (!pathToNode) return new Error('Could not find extrude variable')
|
||||
} else {
|
||||
pathToNode = selection.codeRef.pathToNode
|
||||
const extrudeVarDec = getNodeFromPath<VariableDeclarator>(
|
||||
astClone,
|
||||
pathToNode,
|
||||
'VariableDeclarator'
|
||||
)
|
||||
if (err(extrudeVarDec)) return extrudeVarDec
|
||||
extrudeNameToDelete = extrudeVarDec.node.id.name
|
||||
if (varDec.node.type !== 'VariableDeclarator') {
|
||||
const callExp = getNodeFromPath<CallExpression>(
|
||||
astClone,
|
||||
pathToNode,
|
||||
'CallExpression'
|
||||
)
|
||||
if (err(callExp)) return callExp
|
||||
extrudeNameToDelete = callExp.node.callee.name
|
||||
} else {
|
||||
extrudeNameToDelete = varDec.node.id.name
|
||||
}
|
||||
}
|
||||
|
||||
const expressionIndex = pathToNode[1][0] as number
|
||||
|
Reference in New Issue
Block a user