-
Notifications
You must be signed in to change notification settings - Fork 9
Pr try steps block #291
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
Pr try steps block #291
Conversation
…face into pr_try_steps_block
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.
I haven't done a full review yet.
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.
Can you pull the recent changes from main into your branch?
… into pr_try_steps_block
Initialize mrcStepNames to [].
Removed "if (state && state.stepNames) {" from loadExtraState.
Add braces to if statements.
Changed python code that checks whether _initialize_steps has been set.
Added createStepsBlocks function to create the steps block for the toolbox.
In methods_category.ts:
Modified MethodsCategory.methodsFlyout to call createStepsBlocks to create the mrc_steps block for the toolbox.
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.
I've addressed most of my comments in
alan412#17
Addressed most of my comments on PR 291
Added renameSteps function. In mrc_step_container: Added conditionShadowState, conditionTargetConnection, statementTargetConnection to StepItemMixin. In mrc_steps: Renamed INPUT_STEP_PREFIX to INPUT_STATEMENT_PREFIX. Added saveConnections method to keep track of connections during mutation. (This is what blockly's controls_if block does.) Changed compose method to reconnect connections. (This is what blockly's controls_if block does.) Call renameSteps (from mrc_jump_to_step) when steps are renamed. Changed updateShape_ to remove all inputs and create new ones. (This is what blockly's controls_if block does.)
|
I created alan412#18 to reconnect the blocks if they are reordered. |
Renamed paramName (createStepFieldFlydown parameter) to stepName. Removed export from createParameterBlock and createJumpToStepBlock.
Reconnect blocks if steps are reordered
This adds a steps block to opmodes that create a steps method for an easier way for students to create their autonomous opmodes.
There are two changes I know need to be made after this PR.