Tuesday, November 7th, 2006

Yahoo! UI: BasicDialog Updated

Category: Sencha, Yahoo!

Jack Slocum has updated his fantastic YAHOO.ext package yet again.

The main changes are:

CSS Sprites

First off, many of the images for the TabPanel, BasicDialog, BorderLayout and Button classes have been made into CSS sprites. This should improve loading time for images and prevent flickering. All components developed in the future will use CSS sprites from the beginning so I don’t have to go back and redo them!

Gray Theme

There’s also a new theme for the components mentioned above “ytheme-gray”. It changes my nice blue color scheme into an equally smooth looking gray color scheme. :) To use it, you just add the class “ytheme-gray” to the body element or apply it to individual elements by putting it on a container element. Here’s a BasicDialog with the gray theme:

Basic Dialog Grey

BasicDialog (New Class)

The YUI dialog classes are great for most implementations and relatively simple to implement. I have no desire to try to replace them with my own Dialog classes. Sometimes though, I need a lightweight dialog that displays something, looks nice and offers features like resizing, drag and drop and tabs. Kind of like my comments dialog on this blog. I got started with this idea, and in the end I ended up with a Dialog class that I find incredibly useful. It also mixes well with the rest of YAHOO.ext.

For more information, I would recommend taking a look at the BasicDialog.js file in the download. All of the public configuration options and methods are documented. Here’s a short list of features:

  • Automatically create tabs from markup
  • Automatic body height synchronization (for easy overflow scrolling)
  • Animation targeting (to animate from any existing element, like the comments window)
  • 4 way resizing
  • Drag and drop moving
  • Modal or non-modal
  • Easy to use / nice looking custom button implementation
  • Automatic state management across page views (location and size) via YAHOO.ext.state
  • Easy key listeners

Check out some examples:

The new django book uses the inline comment system that Jack created.

Posted by Dion Almaer at 7:45 am

4.5 rating from 36 votes


Comments feed TrackBack URI

Based on his latest work, I suspect Jack is either secretly a designer in previous years, or has someone doing some work for him. Very nice UI stuff! A rare find in web developers these days. :)

Comment by Scott Schiller — November 7, 2006

Nice, i am almost ready to releae a jQuery dialog plugin (98% finished) so stay tuned for that. It has a lot of default window features you would expect from a dialog, like the drag/drop part, modal/non-modal, listeners and themability of it.

Comment by Gilles — November 7, 2006

yahoo is sure developing itself to a very stable ajax library

Comment by Google Logs — November 8, 2006

[…] The Rails community could learn a lot from the Django book that is being produced and annotated right now. The annotations are done with the YAHOO.ext library, and it all works together very nice. […]

Pingback by Panasonic Youth » Blog Archive » Friday Night Randomness — November 11, 2006

Leave a comment

You must be logged in to post a comment.