• 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, 2012

« Older Entries

YUI: Open Hours Thurs May 31st

Twitter Bootstrap, Powered by YUI?

Twitter Bootstrap has been wildly successful since its debut a year ago. It has a nice consistent look and fills many gaps web developers get stuck in when getting started with a new site or project. As you probably know, its JavaScript layer is based on jQuery. But is that a hard requirement?

YUI Community member J. Shirley decided to find out, and with a little help from Juan Dopazo and other YUIers, created the YUI 3 fork of Twitter Bootstrap.

It’s certainly an interesting product, worth checking out, theming, forking, and contributing to. But in this hour, I’d like to not only have J and Juan introduce the product, but also talk about the process of adapting it from jQuery—what were the easy parts, complicated parts, and if there were any broader learnings they want to share.

Recording

The recording is available in the YUILibrary YouTube channel.

By Luke SmithMay 29th, 2012

YUI: Open Hours Thurs May 24th

YUIDoc Updates and Travis CI Integration

With the latest release of YUIDoc and his recent post on getting YUI tests running on Travis CI, it seems like a good time to have a chat and Q&A with Dav. Not that there’s a bad time to have a chat with Dav.

Time & Details

We’ll be online on Thursday from 10am to 11am PDT.

We’re going back to using Adobe Connect this week because the broadcast resolution from Google+ Hangouts on Air was a bit low, and we’d like the chat to be more accessible for non-IRC users. Let us know if you agree or disagree in the comments.

Recording

The recording is available in the YUILibrary YouTube channel.

By Luke SmithMay 21st, 2012

YUI and Travis sitting in a git-tree

Travis-CIOver the last few weeks, I have spent a great deal of time getting YUI’s core tests executing on Travis CI. As of today, every push to our YUI 3 repo on GitHub results in over 6,000 (6,053 to be exact) unit tests being executed and logged. These tests include 1,130 of our core JavaScript-only unit tests executing natively inside of Node.js on versions 0.4.x and 0.6.x (with 0.7.x support to be added soon). We follow that with our full unit test suite (4,923 tests), running with my command-line YUITest/PhantomJS wrapper, Grover.

Today I want to tell you a little more about how and why we are doing this.

Why?

For the longest time, our tests and builds were a mystery to our users. They all happened behind closed doors and nobody really knew what we were doing. Over the last few years, we started adding more and more of our tests to our source tree, so that people can see what we are actively testing. This helped a little, but it didn’t show that we run every test on every build and that if a test fails, we don’t push that build to GitHub.

Then along came Travis CI, the open source continuous integration platform that hooks directly into GitHub. I played around with it for a day and immediately began moving our tests around so we could use it. We want to be more transparent in our processes and allow the public to see what we test and how we do it.

One thing we want to add to this process is access to our current code coverage report. Currently, we run a code coverage report daily from tests executed in FF12, Chrome-latest and IE8, but none of our users can see that we are at ~80% covered:


Coverage Report

We are working very hard to rectify this issue and hopefully get this data out in the open for everyone to see.

How?

I had to make minimal changes to our core test suites in order to get them to run under Node.js in Travis CI. By “core test suites”, I mean any YUI module that can execute without the need for a working DOM. This includes, but is not limited to: YUI Core, Loader, YQL, Y.Array, Y.Object, etc. These modules are all perfectly usable inside of Node.js without modification.

Let’s look at the YQL tests as an example.

All I had to do was create a Node.js wrapper similar to the standard test wrapper we use in a browser and include the exact same test that’s executed in the browser.

Here is the YQL module’s wrapper:

Now, this same test module can be executed in a browser and in Node.js without modification!

Caveats?

In order for these tests to run natively in Node.js, they need to not interact with the DOM. For example, Y.Array consists of helper methods for dealing with Arrays in JavaScript. But there are a few tests that include dealing with DOM elements to ensure that the helper methods return the right values. For these tests, I had to move the DOM-related code into a new test and add that test to the list of ignored tests when Y.UA.nodejs is detected. This way, such tests are ignored in Node.js, but still run in the browser.

Here’s an example:

As you can see, it’s relatively easy to make our tests run in both environments to ensure that our code is stable and fully functional when used in Node.js as it is in the browser.

What is Grover?

Grover is a command-line tool that allows you to execute YUITest-based tests in PhantomJS. PhantomJS is a headless Webkit instance that allows you to render an HTML page without a GUI present. So Grover closes the gap on this and allows you to run our unit tests from the command-line inside of a CI system like Travis.

Grover is free and available via: npm install -g grover (You must have the PhantomJS binary installed before using Grover.)

How do we see all this?

Travis CI provides a full report of previous builds, as well as an up-to-date status information. Below are the links to our current projects hosted on Travis CI:

  • YUI 3
  • YUIDoc
  • Yeti
  • Grover

Here is a small snippet of what our build output looks like (from the build history for the yui3 repo):

Travis YUI 3 Build

What else does it do?

We are trying out the new Travis/GitHub Pull Request feature on all of our projects. This means that whenever a developer submits a Pull Request to us, Travis will automatically pull their code, merge it into master (on their server) and run our full unit test suite against it. Their “Travis Bot” will automatically post a comment back to the Pull Request telling the developer whether or not their patch passed its tests.

Here’s an example of a Pull Request passing:

travis bot commenting on a pull request

And one where it fails:

travis bot commenting on a failed pull request

What’s next

We plan on adding support for executing our tests with Yeti as soon as it becomes stable enough to run on each build. We are also looking into deploying our code coverage numbers as well. Other than that, feel free to tell us in what other ways we can be more open than we are now.

I, for one, am very happy with all of these new features and I hope you are too!

By Dav GlassMay 11th, 2012

YUI 3.6.0 PR1 Is Now Available

We are pleased to announce the availability of YUI 3.6.0 PR1 for community testing and feedback. Please take a moment to check it out via CDN or download.

Here are the target dates for all YUI 3.6.0 milestones:

  • PR1 – May 8, 2012
  • PR2 – June 12, 2012
  • PR3 – July 17, 2012
  • GA – July 31, 2012

An overview of items we are working on for YUI 3.6.0 include:

  • ScrollView enhancements
  • DataTable features and performance improvements
  • Charts bug fixes
  • Image preview feature in Uploader
  • Popup Calendar
  • YUI seed and global refactored for performance

We are also taking steps to condense our development cycle so that we can transition to monthly releases in the near future.

The list of issues addressed in 3.6.0 PR1 and the full list of issues targeted for 3.6.0 are available in our bug tracker.

We invite you to join the ongoing development discussions happening with the team over on GitHub.

We look forward to your continued feedback!

By Jenny DonnellyMay 11th, 2012

YUIDoc 0.3.0 is Official!

Today we are pleased to announce the official release of the new YUIDoc, our JavaScript documentation generator. YUIDoc is a Node.js application that generates API documentation from comments in source, using a syntax similar to tools like Javadoc and Doxygen. YUIDoc is currently powering the API documentation for YUI and has been actively updated over the last year.


Click for a larger image

[View Larger Image]

YUIDoc provides:

  • Live previews. YUIDoc includes a standalone doc server, making it trivial to preview your docs as you write.
  • Modern markup. YUIDoc’s generated documentation is an attractive, functional web application with real URLs and graceful fallbacks for spiders and other agents that can’t run JavaScript.
  • Wide language support. YUIDoc was originally designed for the YUI project, but it is not tied to any particular library or programming language. You can use it with any language that supports /* */ comment blocks.

Some of the new features added to this version are:

  • Markdown support in code comments
  • Support for many more tags out of the box
  • Logic separated to allow for easy extensibility
  • Better theming support
  • Server mode for development time previews
  • External data mixing
  • Easy cross platform installation
  • Cross-linking inside and out of current project
  • JSON based configuration

Let’s get into a little more detail on some of these:

Simple Installation

If you have Node.js and NPM installed, installation is easy:

npm -g install yuidocjs

Markdown support in code comments

YUIDoc will parse your comment with Markdown before it applies the Handlebars template giving you great flexibility when writing your docs.

Logic separated to allow for easy extensibility

YUIDoc uses YUI’s class infrastructure internally and exports all of these modules when you require the yuidocjs module. This allows end users to hook into YUIDoc’s internals and change the way it does things. You can extend classes, augment them or just flat out change methods to suite your needs.

Better theming support

In this release we use the built-in Y.Handlebars helper to handle all template generation. We have also taken development into consideration when building this feature. YUIDoc will first search it’s built in theme directory for partials, then it will search your local theme directory. This allows you to only have to maintain the files you wish to change in your theme and not have to copy every partial even if you are not modifying it.

Server mode for development time previews

This is my favorite new feature! You can fire up YUIDoc in server mode and it will give you live previews of your documentation as you edit it. Simply save your file and reload the page from the built in server and see your changes live. Including external data and cross-linking. You no longer have to generate the docs for your entire project just to see a documentation change!

External data mixing

YUIDoc now allows you to link your documentation to the rendered output from another YUIDoc instance. For example, if your project is using YUI and extending some of our core classes, you can link to our exported data.json file (from our YUIDoc build) and when YUIDoc parses your documentation it will fetch our data and cross-link all of your extended classes back to ours. This way you don’t have to document another projects code, you simply point over to their docs like it was part of yours.

Project Changes

All future YUIDoc development will be fully conducted on Github. We will be tracking the project on their wiki and using their issues to manage our tickets. It will be run like a native Node.js project completely in the open. We will also be using a Google Group for support requests, so sign up today!

We are also happy to report that YUIDoc’s unit tests are hosted on Travis-CI and will run per Github push!

  • Source
  • Documentation
  • API Docs
  • Google Group
  • Travis-CI

What about the old version of YUIDoc?

The old Python source for YUIDoc is in a branch on the current Github repo where it will remain indefinately. There are no plans on accepting any pull requests or making any updates to that code base.

By Dav GlassMay 9th, 2012

YUI: Open Hours Thurs May 10th

YUI 3.5.0 Uploader

Uploader was another component that saw a major upgrade in 3.5.0. Of the many changes, one big one was the addition of support for native features in browsers supporting HTML5.

Join us for a discussion with its author, Allen Rabinovich, in which we’ll talk about how Uploader is structured, some of the challenges with modern techniques that needed to be addressed, and what’s on the roadmap for upcoming versions.

Time & Details

We’ll be online on Thursday from 10am to 11am PDT.

This week, we’ll be trying out Google Plus Hangouts on Air, so the audio and video feed will be through G+, and we’ll be monitoring chat in the #yui IRC channel on freenode.

View the Recording

By Luke SmithMay 9th, 2012

Announcing YUI 3.5.1

We are pleased to announce the availability of YUI 3.5.1 on CDN or as a download. YUI 3.5.1 is a smaller scoped release of bug fixes only.

Enjoy!

By Jenny DonnellyMay 7th, 2012
« Older Entries

Pages

  • About
  • Contribute
  • YUI Jobs

Recent Posts

  • 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
  • YUI Weekly for May 10th, 2013

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 (25)
  • Target Environments (11)
  • Yeti (3)
  • YUI 3 Gallery (29)
  • YUI Events (45)
  • YUI Implementations (55)
  • YUI Theater (146)
  • YUI Weekly (37)

Meta

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