Add edit flow for Shell thickness (#5525)
* WIP: Add edit flow for Shell thickness Would fix #5406 but not like this :sad: * Early win with working edit on shell * Extend to logic to walls with tags * Remove skip * Add wall test * Fixing inconsistencies in code. Tests not working on win * Refactor addShell for consitency * Clean up * More clean up * Add validation on both params * A snapshot a day keeps the bugs away! 📷🐛 (OS: namespace-profile-ubuntu-8-cores) * Passing tests * Prettier * Change from test.skip to comment * Clean up for review * Add review suggestions and disable thickness validator * 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) * Remove uneccessary changes * Add edit flow for Shell thickness Fixes #5406 * Enable edit step in test that works only if the start code is properly formatted * Clean up for review --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
@ -58,6 +58,9 @@ export type ModelingCommandSchema = {
|
||||
selection: Selections
|
||||
}
|
||||
Shell: {
|
||||
// Enables editing workflow
|
||||
nodeToEdit?: PathToNode
|
||||
// KCL stdlib arguments
|
||||
selection: Selections
|
||||
thickness: KclCommandValue
|
||||
}
|
||||
@ -382,18 +385,25 @@ export const modelingMachineCommandConfig: StateMachineCommandSetConfig<
|
||||
icon: 'shell',
|
||||
needsReview: true,
|
||||
args: {
|
||||
nodeToEdit: {
|
||||
description:
|
||||
'Path to the node in the AST to edit. Never shown to the user.',
|
||||
skip: true,
|
||||
inputType: 'text',
|
||||
required: false,
|
||||
},
|
||||
selection: {
|
||||
inputType: 'selection',
|
||||
selectionTypes: ['cap', 'wall'],
|
||||
multiple: true,
|
||||
required: true,
|
||||
validation: shellValidator,
|
||||
hidden: (context) => Boolean(context.argumentsToSubmit.nodeToEdit),
|
||||
},
|
||||
thickness: {
|
||||
inputType: 'kcl',
|
||||
defaultValue: KCL_DEFAULT_LENGTH,
|
||||
required: true,
|
||||
// TODO: add dry-run validation on thickness param
|
||||
},
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user