On Tue, 13 Jun 2017 16:18:31 +0200 Ancor Gonzalez Sosa <ancor@suse.de> wrote: Now after thinking about it for second, lets use your constructive rant as start point to make CWM widgets better 0) too hard to orient in it If you have simple hint that dialogs are top level part which contain widgets and widgets can have other widgets or be the final one, will it help to see where is top and where bottom? Partitioner have another specific, that it have page widgets and other widgets. Page contain only other widgets and rest of widgets is leaf ones like tables or descriptions. Do you have any suggestion how to make it easier to orient? if you want to orient according to old prototype then https://github.com/yast/yast-storage-ng/blob/master/src/lib/expert_partition... is in CWM main_dialog and Overview widget various TreeView classes are Page classes in CWM and TabViews are included in Page classes in CWM. So for me complexity looks similar, so I am interested why you see this structure more complex? Maybe because some code and text is hidden in libstorage itself?
1) CWM Widgets are way more than widgets
It depends on your definition of widget. Do you think it is not proper name? What responsibility you think should not be there? Should it be really only UI Term and nothing more?
2) CWM is a dictator :-)
As written in previous answer, this is good point and make sense to look into it and make widget easy to use even outside of CWM. Is the sequence I write there fine for you? repeating it here without TODOs, just as target proposal: content = HBox( ... widget.content, ... ) UI.OpenDialog(content) widget.init UI.loop do |e| res = widget.handle return res if res end if success loop_again unless widget.validate widget.store end
3) Reusability can be easier than that
I actually do not see there too much difference. In fact each of example I can easily write with CWM with same or less code. If you are interested pick any of that examples and I will try it. Or what you find hard on CWM, that other examples are easier?
4) Relatively complex mechanism even for simple stuff
Can you point to such simple stuff that you see as too much complex? Maybe it can be changed to allows easier way. As I already commented, for buttons tricky part is actually handle, as button that do nothing is useless. For Label, there is no such widget, as in CWM label is usually always associated with widget to which it is associated. So I would like to see example, where we can discuss how to make mechanism simpler. Actually one of my goal with CWM object widgets is to care only about its target domain and not about UI stuff, that is done automatic ( like setting/getting value to widget ). Looking forward to your reply to make CWM better. Josef
Pheew! Feel much better now. ;) Deactivating rant mode.
Cheers.
[1] https://github.com/yast/yast-storage-ng/tree/master/src/lib/expert_partition... [2] https://github.com/yast/yast-partitioner/ (many things are still not merged in master at the time of writing)
-- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org