Mailinglist Archive: yast-devel (46 mails)

< Previous Next >
Re: [yast-devel] CWM Widgets: a rant ;-)
  • From: Josef Reidinger <jreidinger@xxxxxxx>
  • Date: Tue, 13 Jun 2017 19:10:30 +0200
  • Message-id: <20170613191030.0274ccce@linux-vvcf.privatesite>
On Tue, 13 Jun 2017 16:18:31 +0200
Ancor Gonzalez Sosa <ancor@xxxxxxx> 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
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(
UI.loop do |e|
res = widget.handle
return res if res
if success
loop_again unless widget.validate

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.


Pheew! Feel much better now. ;) Deactivating rant mode.


[2] (many things are still
not merged in master at the time of writing)

To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >