On 08/02/17 09:24, Josef Reidinger wrote: > Hi developers, Hi Josef,
> I was again hit by issue with enabling disabling buttons in wizard and > also its renaming and having six parameters to all wizard dialogs are > wrong from API POV. > > So what I proposing? > > Create configuration class that have names and enablement for all > buttons in wizard, reasonable defaults for it and can be passed as > argument or apply to wizard it itself. > > so instead of > def InstDialog(enable_next: true, enable_back: true, enable_abort: > true, next_label: Label.Next, back_label: Label.Back, abort_label: > Label.Abort) > > will API look like > def InstDialog(buttons: DefaultButtons.new) > > What do you think? From my POV it makes sense. I was also considering something like this for AutoYaST integration tests because we have a pretty similar scenario[1]. In my case, the configuration could be "promoted" to a class on its own. Regards, Imo [1] https://github.com/yast/autoyast-integration-test/blob/master/lib/aytests/media_builder.rb#L32 -- Imobach González Sosa YaST team at SUSE LINUX GmbH Blog: https://imobachgs.github.io/ Twitter: @imobachgs
signature.asc
Description: OpenPGP digital signature
