Mailinglist Archive: yast-devel (45 mails)

< Previous Next >
[yast-devel] Hackweek Project - Modern Popup Class
  • From: Josef Reidinger <jreidinger@xxxxxxx>
  • Date: Mon, 20 Nov 2017 11:06:53 +0100
  • Message-id: <20171120110653.3bd178e4@linux-vvcf.privatesite>
I would like to introduce my hackweek project ( thanks lslezak for
giving idea ). It is modern popup library, that have nice API that is
readable, extendable and well documented. At first let me show you some
comparison of old and new API calls so you get idea:


Yast::Popup.MessageDetails(text, details), details: details)

Yast::Popup.TimedError(text, seconds), headline: :error, timeout: seconds)

Yast::Popup.TimedErrorAnyQuestion("Notice", "Hi, how are you?",
"Happy", "Sad", :yes, 10)"Hi, how are you?", headline: "Notice",
timeout: 10, buttons: { happy: "Happy", sad: "Sad"), focus: :happy)

Yast::Popup.TimedLongNotify(message, timeout_seconds), richtext: true, timeout: timeout_seconds)

So as you can see there is only one method "show" that have named
parameters with reasonable defaults. It also have proper its rspec

I also decide to split Feedback to own class as feedback is
special kind of popup window. And add one more feature that allow to
change feedback as you continue with long operation.

It is not yet merged, so you have still chance to add some notes and
improve final result as much as possible. One controversial part is
rspec helpers, which allows to specify something like


and it will mock what is needed at low level and at same time do all
input parameters validation, so it show wrong parameter problems. So
feel free to comment pull request at [1]


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

< Previous Next >
This Thread
  • No further messages