• Home
  • Quick Start
    • Configurator
    • Download YUI 3
  • Documentation
    • User Guides
    • Examples
    • Tutorials
    • API Docs
  • Community
    • Gallery
    • Blog
    • Forums
    • YUI Theater
    • Calendar
  • Contribute
    • YUI on GitHub »
    • File a Ticket
    • View Tickets
    • Dashboard
  • Other Projects
    • YUI 2
    • YUI Compressor
    • YUI Doc »
    • YUI Builder
    • YUI PHP Loader
    • YUI Test
    • YUI Website

Blog: Archive for May, 2011

Quick GBS Status Update

We’ve missed the Q1 update, and rather than rush out the Q2 update, we are taking the opportunity to streamline our approach to GBS. Rest assured, the next update will land in Q2. In the meantime, remember to examine your own user statistics to ensure the best ROI on your development and testing resources.

By Matt SweeneyMay 27th, 2011

YUI: Open Hours Thurs May 26th

What’s coming in YUI 3.4.0?

We’re trying to get our ducks in a row earlier nowadays, and add a little more transparency to our development cycle and process. Believe it or not, we actually have some idea of what we plan to release in version 3.4.0.

The final version 3.4.0 is scheduled for an August release, but we’ll be posting three incremental Preview Releases on the way there, including the first, PR1, this week!

Join the call for an overview of some of the upcoming features and bug fixes, get a status on where we are today, and get a first glance into our new release cycle.

Time & Details

We’ll be online from 10am to 11am PDT Thursday. The connection details are the same as usual.

  1. Dial in to 1-888-371-8922 (Skype works great for non-US participants*)
  2. Enter the attendee code 47188953#
  3. Join the screen sharing session (this will prompt you to install the Adobe Connect plugin if this is your first time using it)

* – If Skype is not an option, email me or catch me (davglass) in the #yui IRC channel on freenode for a local number.

By Luke SmithMay 24th, 2011

YUI Training in Switzerland

Liip recently sponsored YUI training given by Tobias Ebnöther for beginners with some basic knowledge about JavaScript. Our space was very limited so we didn’t announce this very publicly.

The Morning

Starting early I had a first group of developers who were keen on learning about YUI. Most of them were already familiar with other major libraries or version 2 of YUI. The feedback from the group was great, as everyone loved the very clean way that YUI enables you to solve daily problems and potentially reuse code. We had a little discussion about using the sandboxing technique or just rolling with SimpleYUI. While the simple version enabled a nice start into the workshop most people seemed to prefer the sandboxed instances.

The Afternoon

In the afternoon I had a very interesting group with a mix of developers, customers, and product owners. At first I was a bit afraid because of the very different knowledge levels, but as it turned out, with everyone supporting each other we nearly matched the speed of the morning group. The feedback here was good as well: people were mainly astonished how fast you can do something with a draggable widget. So I showed them some nice examples of how people put together things in the gallery, and we even had some time to build our own modules.

Next

Giving a full day of training was a great and exhausting experience. Next time I’ll plan a little bit more time in the morning as 3 hours were rather short for a full introduction. We will have an intermediate course based on the “YUI Building Blocks” material at Liip Zurich on June 9. The space will be very limited again but leave a comment to this post if you’re interested in joining.

Introducing people to YUI was real fun so we want to host a more public training in Zurich soon, probably sometime in July. It would be good to know how many people are interested so drop a comment if you would like to come.


Tobias EbnötherAbout the author:
Tobias Ebnöther is a front-end engineer and coach at Liip. He’s passionate about JavaScript, testing, and foosball. You can follow Tobias on Twitter at @ebii or find him on IRC as ebi.

By Tobias EbnötherMay 24th, 2011

Bidi Tutorial: RTL YUI Calendar in Arabic

This example shows how to create a right-to-left Arabic version of a “Basic Popup Calendar” with YUI 2.9.0. The YUI Calendar component contains a number of useful APIs, including a configurable close button, dynamic iframe shim, and APIs for hiding and showing from the user.

LTR:
YUI Calendar in English screenshot

RTL:
YUI Calendar in Arabic screenshot

Click here to check out the working example. Click here to download all the files needed to run the example locally.

Steps to Bidirectionalize a Widget to RTL

  1. Declare the primary language and change the direction for the page inside the <html> tag with the lang attribute and dir="rtl", this point in case the whole page is rtl, but if the page is ltr, we should add the rtl in widget.
  2. Convert CSS attributes and values that relate to direction in the style sheet, including float, image positions, text-align, margin, padding, border, etc. We recommend CSSJanus for converting CSS.
  3. Update any JavaScript related to directionality. As much as possible, we recommend making direction configurable in your JavaScript code.
  4. Translate text strings from the original language to the RTL language in both the HTML page and JavaScript.
  5. Test sprite images in case they need to be flipped.
  6. Check A-grade compatibility, testing the calendar across browsers to be sure it’s working fine.



By Mohammad YounisMay 23rd, 2011

YUI: Open Hours Thurs May 12th

Component owner updates and a discussion about the future of Loader

In the wake of Adam Moore leaving the YUI team for “Startup”ier pastures, we recently did a big shuffle of components, assigning new owners to a number of core components including Loader, Event, and the YUI global. Dav Glass will be cohosting the call with Eric F this week to talk about the reassignments and open the conversation about what’s on the roadmap for these components.

If you have brilliant ideas, nagging itches, or just plain old thoughts about the YUI global object, Loader, the module system, or anything else, call in. We’re all ears!

Time & Details

We’ll be online from 10am to 11am PDT Thursday. The connection details are the same as usual.

  1. Dial in to 1-888-371-8922 (Skype works great for non-US participants*)
  2. Enter the attendee code 47188953#
  3. Join the screen sharing session (this will prompt you to install the Adobe Connect plugin if this is your first time using it)

* – If Skype is not an option, email me or catch me (davglass) in the #yui IRC channel on freenode for a local number.

By Dav GlassMay 9th, 2011

In the YUI 3 Gallery: Geo

Geolocation is one of the more exciting HTML5-related technologies to appear in browsers, and the Geo Gallery module gives you access to location information. The W3C Geolocation API provides a simple interface to access the user’s location from JavaScript. The following code accesses the user’s current location in a supporting browser:

navigator.geolocation.getCurrentPosition(function(result) {
    //success handler
}, function (result){
    //failure handler
})

When this code is executed, the browser pops up a message asking for the user’s permission to reveal their current location. The dialog displayed in Firefox looks like this:

Geolocation dialog in Firefox

If the user denies permission, or an error occurs while trying to get the current position, the failure handler is called. Otherwise, the success handler is called with information about the current location. That information comes in the form of latitude and longitude coordinates (other information may be available as well, depending on the implementation).

The W3C Geolocation API is supported in Internet Explorer 9+, Firefox 3.5+, Safari 5+, Chrome, and Opera 10.6 as well as on Mobile Safari and Webkit on Android, making it fairly ubiquitous.

The Geo module uses the Geolocation API when it’s available, and falls back to an IP-based lookup via the YQL pidgets.geoip open table when not available or if there is an error. This table is exceptionally useful because you can lookup location information for a specific IP address, or you can omit the IP address and it will return the location information for the IP address making the request. The latter part ensures that you need to make only one request to get location information instead of two (other solutions use one to get the IP address and then one to get the location information for that IP address).

In typical YUI fashion, the Geo module provides a streamlined interface for accessing geolocation information. Instead of providing two callback functions, one for success and one for failure, just pass in one. The result object has a success property indicating if the call succeeded:

YUI({
    gallery: 'gallery-2011.04.27-17-14'
}).use('gallery-geo', function(Y) {
 
    Y.Geo.getCurrentLocation(function(response){
 
        //check to see if it was successful
        if (response.success){
            console.log(response.coords.latitude);
            console.log(response.coords.longitude);
        }
 
    });
 
});

When a geolocation call completes successfully, the success property is true and response.coords is filled with at least two properties: latitude and longitude (if the native API is used, then all available properties are copied to this object). There is also a source property on the response object that is either “native”, if the information was retrieved from the native API, or “pidgets.geoip”, if it was retrieved by YQL. If an error occurs, or if the user declines to provide location information, then success is false.

If the Geolocation API has an error, the Geo module will try IP-based lookup instead. If, however, the user declines to provide information, the IP-based lookup is not performed.

Keep in mind that the native API is much more accurate than IP location, so you won’t get the same quality results in browsers without native geolocation support. However, the Geo module is a good first step to providing location-based experiences to your users.

By Nicholas C. ZakasMay 6th, 2011

Pages

  • About
  • Contribute
  • YUI Jobs

Recent Posts

  • YUI Weekly for May 24th, 2013
  • YUI Weekly for May 17th, 2013
  • Yahoo’s International Team Is Hiring!
  • YUICompressor 2.4.8 Released
  • YUI 3.10.1 Released to Fix SWF Vulnerability

Archives

Categories

  • Accessibility (25)
  • CSS 101 (6)
  • Design (51)
  • Development (590)
  • Frontend Jobs at Yahoo (13)
  • Graded Browser Support (8)
  • In the Wild (63)
  • Miscellany (11)
  • Open Hours (44)
  • Performance (23)
  • Releases (26)
  • Target Environments (11)
  • Yeti (4)
  • YUI 3 Gallery (29)
  • YUI Events (45)
  • YUI Implementations (55)
  • YUI Theater (146)
  • YUI Weekly (38)

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
© 2013 YUI Blog