You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes you set up elements on one screen, and realize you want to repeat those elements on other screens. You can manually copy/paste from one screen to the other, but it can also make sense to make a system wide component out of that element, so that it's centrally managed for all screens it's relevant on.
This is important because it's not trivial to see the values you set for an existing element when trying to recreate it for a new component.
The text was updated successfully, but these errors were encountered:
This concept is similar to the concept in Visual Studio where you can select a block of code and extract method.
Phase 1:
Right-click on an instance in a screen or a component
Select the option "Create Component"
A popup appears similar to the add component popup which asks the user for the name of the component. For now, we can make this just go into the root folder and we can add folder support later.
When the user clicks OK, a new component is created with the desired name from the popup.
The component should have its base type be set to the type of the selected instance from step 1. This should be initially tested with Container as the base type since that's the most common type, and then test it with more complex types later.
Each child of the selected instance from step 1 should be copied in to the newly-created component
Each variable from the default state for any of the copied instances should be copied over to the new component.
Copy variables from the instance onto the newly-created component.
Phase 2:
Add a checkbox that the user can select "Replace {InstanceName} and all children with an instance of the new component
If checked, and if the user selects OK, delete all children of the instance that was selected and the instance itself
Add a new instance with the same name that is of the type of the newly created component. All variables on the instance itself should remain.
Sometimes you set up elements on one screen, and realize you want to repeat those elements on other screens. You can manually copy/paste from one screen to the other, but it can also make sense to make a system wide component out of that element, so that it's centrally managed for all screens it's relevant on.
This is important because it's not trivial to see the values you set for an existing element when trying to recreate it for a new component.
The text was updated successfully, but these errors were encountered: