Updated YUI3 for YUI2


For those of you who are using my YUI 3 for YUI 2 emulation code, I want to share with you the latest, and perhaps final version. This version is very similar to what we are now using on Mint.com, where I have been successfully swapping back and forth between the mock YUI 3 and the real YUI 3.

http://yui-ext-mvc.googlecode.com/svn/trunk/assets/js/yahoo-ext/yui3foryui2.js

Notes

  • Y.Base.create has been added
  • use YUI.add instead of YUI().add
  • Y.NodeList is now supported
  • Y.Event.attach and Y.Event.detach emulated
  • window resize event supported
  • the Y.mix function is fully emulated

There is definitely more, but the above is a good list of the major improvements.

Adding Find() to NodeList in YUI3


In YUI 3, when searching an array for a value, you have to include the collection module, as the Y.Array.find() function is not built into Y.Array. This is a little annoying, because 9 out of 10 times, I include the collection module, it is just for the Y.Array.find() function. Additionally, because the function isn't built into the core library, it is not used or added to the core features, like NodeList. Yet, I believe having a find() function on NodeList is very useful and this article provides a simply way to augment NodeList.

continue reading article…

Mac Preference Radios For The Web


One of my favorite UI features of the Mac OS, both OSX and the iPhone, is the way it handles radio inputs. Instead of having small, hard to click little round circle (like the web), there are large buttons that are obviously grouped by use of a connecting bar. The best place to see this is in the system preferences on OSX. Todays article, introduces a widget that will do the same, by converting existing radio buttons into a Mac Preference Radio.

continue reading article…

Mocking YUI 3 in YUI 2


At Mint.com we have wanted for some time to upgrade to YUI 3. However, since YUI 3 is not backwards compatible with YUI 2, it is hard to justify taking the time to port a large codebase. To alleviate the cost of upgrading, we have decided on a two step approach. During the first phase we will convert our YUI 2 code to use YUI 3 syntax, then in the second phase when we switch to YUI 3, many parts of the code should work right away.

continue reading article…

YUI 3 Radial Menu Gallery Component


The RadialMenu gallery component is finished and available on GitHub at http://github.com/mattsnider/yui3-gallery/downloads. The latest version of the RadialMenu improves on the previous two articles by having the RadialMenu and RadailMenuPanel objects extend Overlay. By using the overlay component, RadialMenu can leverage the knowledge and experience that went into developing overlay, and we remove the need to mask the page with an invisible div.

continue reading article…