Creating component variants
Dynamic panels and components are reusable elements that can change states. Today, I will demonstrate their efficiency and practicality. Which one is more convenient to use?
Dynamic panels are indeed efficient, and when turned into a library, they can become part of a design system.
Eediting components is more complex than dynamic panels, takes more time, and requires editing in the component modal editing mode.
If I want to change the size of the button, for example, turning it into a block button, in one state of the dynamic panel, adjust the button to the desired size.
However, with components, you cannot directly modify the size of the button on the canvas. You need to enter the modal editing mode and resize it. In the editing mode, the button loses its context. You are not sure how large it should be to match the width of the dialog box. You have to adjust its size multiple times. Alternatively, you can break down the component and then resize it, which is inconvenient. The component instance will lose its connection with the component.
Adjusting the size of all internal elements
If you want to adjust the size of all internal elements in a dynamic panel, it can be quite cumbersome. Let's say we create the left dialog box as a dynamic panel. If you directly resize the dynamic panel, the sizes of its elements in each state will not change. You need to enter each state and adjust the element sizes individually. If there are multiple states, you need to adjust them one by one, which can result in inconsistent scaling.
Similarly, adjusting the size of internal elements in different component views also encounters this problem. You need to enter the component modal editing mode and edit the element sizes in each view. However, entering the modal component editing mode loses the context.
Suggestions for Improvement
1. Ability to simultaneously change the size of all states and views of dynamic panels and components on the canvas.
2. Editing components should not use modal editing mode but adopt the contextual editing mode of dynamic panels.
3. Similar to dynamic panels, the ability to directly set the overall and individual view interactions of components on the canvas. Abandon the "Raise Event" mode.