Incubator contribution: Blink widget

Hi folks,

Just made a small commit to
incubator
, something I made for fun, the Blink widget.

This project contains one utility widget: the Blink widget. You can use it to highlight/emphasize
something changing on the screen when something changes and you feel the Notification widget
is too heavy.

Server-side API is pretty much myBlinkInstance.blinkThis(someComponent).

Implementation is more concept level than production ready. So download, tweak to your needs, use.

Simple demo
here
.

Enjoy. :stuck_out_tongue:

  • Ville

Nice, I like this :slight_smile:

Nice pattern.

Bug report: if you click the save button couple of times quickly, blink animation gets stuck. It seems that the case of starting to blink while animation is already active is not handled properly.

Great! This really would be a good replacement for
notifications
in many cases. Hannu would probably agree with me on this. :slight_smile:

From the technical side: I also like the way of doing this in generic way. It makes me more certain that more generic animation effect could be added to Vaadin someday…

This is one of those “I wish this API could be implemented in AbstractComponent” things :) With Vaadin dialect we would end up with something like AbstractComponent implements Blinkable.

(I am not saying that the above would be a good idea)

Yeah. While designing this I decided that this has to be done without touching Vaadin internals. Pros and cons exist but this way you can take the Blink widget and use it in your existing project without version updates whatsoever.

Joonas: thanks for the bug report. Fix: don’t click it that fast! :slight_smile:

  • Ville