I'd like to be able to override properties on Masters and then have (at least) my overrides appear on the subcomponents #343
Replies: 3 comments
-
This is more a problem with Buttons themselves than the master component. By directly changing the label of the button, you have bypassed the label property of the button, which is not a derived property, but stores the label info locally. I have tried to change this into a fully derived property which would get rid of this issue but it for some reason always creates problems. I will investigate this and come back with a PR that solves this. |
Beta Was this translation helpful? Give feedback.
-
Coming back to this, it recently occurred to me what the underling issue here is: We have two conflicting interfaces that are not aligned and can therefore lead to inconsistent results in the system. Interface 1 is the programmatic interface of a button which essentially encapsulates the buttons submorphs and just exposes a custom property (here I may open up a discussion on this issue. However my current answer is that we actually do the former approach and solve the inconvenience for the programmer by not having to touch the visual properties in the general case. What that means is, the derived properties like label color, label font etc should not be necessary since the programmer will not directly set those at all in the general sense but just make use of the master components the designer prepares. Data driven props like |
Beta Was this translation helpful? Give feedback.
-
The way we handle this in the Galyleo Dashboard is that both the visual editor and code operate on a common data structure, which holds the ground truth. This is I know reminiscent of the MVC architecture, not Morphic, where editors of every type (code, text, visual) operate on a Model, and the model is fixed and permits all the data interactions. I am not sure if this is feasible for the component architecture, but it might help here. |
Beta Was this translation helpful? Give feedback.
-
So this issue came up when I wanted to have a master "close window button' component, since this is something I do a lot. So I got a dark button, and set its label to be the icon 'close-window', tooltip to be "Close Window', and tooltip on label to be Close Window. When I copy the component, the label reverts to "a button". Which I understand; that's the label on the original master. But I can't seem to find a way to override that and make the default label the close-window icon for morphs that use this as a master

Beta Was this translation helpful? Give feedback.
All reactions