Replies: 4 comments
-
Originally there was an implicit Options that you would push/pop stuff onto so it had a recursive nature. And it was really confusing (at least for me). Now the idea is that if you want this kind of inheritance you would thread an Options var through the code, locally using Still I have wondered if font size should default from parent, but then you run into how to communicate when not to use the parent's font size. For gravity I'm pretty sure the global default is good, because I'm usually thinking of a compound widget where it's gravity shouldn't affect the arrangement of the inside widgets. Do you have some code that illustrates this that I can look at? A good motivating example could help guide us here. |
Beta Was this translation helpful? Give feedback.
-
I changed the title.
I don't have a good motivating example. I have a example. If I use a flexbox and want to align every child in the center, I have to remember to pass the options when I add new children to the flexbox. The code looks very different, like this
because I'm used to write this all the time
I simply do not trust myself remembering the above code style. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the example. When you forget (as I often do) to use One design feature I'm really going for is visual feedback - when you add some widgets or change some options the visual output should change obviously (as much as can be). I'm willing to give up some cleverness in the design and require a bit more typing for it. That is what is driving the current design, and I'm worried about introducing non-local dependencies. Having said that, it only works if it actually makes the coding go well. In light of that, would you be willing to use the current system for a while longer and circle back on this? |
Beta Was this translation helpful? Give feedback.
-
Yes, I will use DVUI more as I have yet no conclusion. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Coming from CSS Flexbox, this is a bit strange to me.
Having only global default for gravity is strange.
Currently you have to pass gravity to each widget. I think there need to be some way for widgets to get default options from their direct parent (e.g. gravity) and from recursive ancestors (e.g. font size)
Beta Was this translation helpful? Give feedback.
All reactions