jQuery UI 1.9 Milestone 7 – Accordion

Posted on by

The seventh milestone release for jQuery UI 1.9 is out. As its been seven months since our last milestone release, we’ve got a lot of improvements and bug fixes to share. Most notably, the Accordion widget redesign is done.

What’s a Milestone Release?

A milestone release makes it easier to try out the latest development code of jQuery UI without necessarily having to check out code from GitHub.

With a milestone release you can try out new widgets that are pretty far along (though not yet final) and provide feedback based on released code with a specific version number.

Accordion

The Accordion redesign is now fully implemented. We finally have really solid animations, with no more flickering or jumping of content below. The ARIA implementation also got a lot better. A big thanks goes to Hans Hillen for his contributions.

Menu

Menu now supports other markup than just UL/LI elements. Support for disabled menu items got a lot better, too.

A ton of bug fixes

A lot of components have seen a lot of bug fixes. While we continue to maintain the 1.8 branch, a lot of bugs get only fixed in master. Here are all tickets fixed in 1.9, by component.

Download

You can download the jQuery UI 1.9 Milestone 7 – Accordion release as a zip file or via git:

File Downloads

Git

How to Provide Feedback

wiki page

To help with the testing of the Accordion widget, visit the Accordion page on our Development & Planning wiki.

forum

If the comments section on the wiki page doesn’t provide enough room for your feedback, post to the Developing jQuery UI Forum and tag the post:

How to Contribute Code

If you have code changes for the Accordion widget, fork jQuery UI on GitHub and submit a pull request.

If you’re new to git or GitHub, see our guide: How to submit a fix to jQuery UI – The Easy Way.

Comments

Note: please do NOT use the comments section of this blog post for feedback on the Accordion widget. This discussion should occur on the wiki page and the forum (see How to Provide Feedback, above).

If you have feedback on us doing our sixth milestone release, feel free to leave a comment below. Thank you.

State of the jQuery UI Grid

Posted on by

We announced the Grid project back in February. Since then, we finished the first three stages and are now getting started on the fourth. In this post we’ll take a look at what we’ve built so far.

Grid

This is what we designed as the “zero feature grid”. All it does is enhance HTML tables, but it does that pretty well while also providing the right hooks for all kinds of other features that we can add on top of that. And that turns out to be really useful, as there are a bunch of things that regular HTML tables can’t do. With Grid, you get:

  • styling with the CSS framework, making it ThemeRoller-ready
  • a proper titlebar, based on the table’s caption
  • markup and styles necessary for scrolling of the table body, while keeping the header fixed

The API for the Grid controls what content to render, and how to present it:

  • The columns option specifies which columns to render. If not specified, it picks up existing table header elements.
  • The rowTemplate option allows the grid to render each row from a custom template. If this option is not provided, each row is generated based on the columns option.
  • The source option specifies the content to render, in the form of a plain array of objects. When not specified, existing table rows are used.
  • By default, the grid’s body grows with the number of rows. With heightStyle: ‘fill’, it stays at a fixed height and the body starts scrolling if there are more rows.
  • When picking up column information from the existing table headers, certain data-attributes are read. The grid itself uses only the data-property attribute (and the actual text of each header cell), but the dataFields option specifies a few more attributes that other components can use, such as “type”, “culture” and “format” to configure local sorting and filtering. If a grid add-on handles other data attributes, adding those to the dataFields option will make them automatically available as part of the columns option.

So far we only have an enhanced table, but often enough, a grid needs to be fed data from some remote resource. That’s where Dataview comes in.

Dataview

Dataview is a low-level abstraction for retrieving content. It has an API for specifying what content to retrieve, and an SPI (service provider interface), implemented by components that provide that content. There are built-in options for filtering, sorting and paging, and the design makes it easy to add more options, like grouping. The API is asynchronous by default, even for local data, so that all components relying on Dataview can work with both local and remote data.

Dataview only depends on Widget and Observable (we’ll get to that below), but not on Grid. This allows Dataview to be used in a variety of contexts. For example it could power a product listing, such as those on eBay or Amazon, where a table presentation is not the right format.

The Dataview SPI makes it easy to write implementations from scratch as well as to create reusable extensions.

As an example, we can use a custom dataview as the input for the Autocomplete widget. The same data is also displayed in the grid below the input field. This demonstrates how a Dataview can be used in multiple representations, where each decides on its own what data to show.

As for reusable extensions, we currently have three implemented:

  1. localDataview takes an input array and does sorting, paging and filtering on that array. It uses Globalize (see below) to implement filtering and sorting of localized numbers and dates. When combined with the grid on a table with existing content (without specifying the source option), you get a complete tablesorter.
  2. odataDataview takes a resource URL, pointing at a webservice that understands OData, the Open Data Protocol. While our implementation doesn’t yet cover all of the OData options, you can use it to sort, filter and page, without having to implement any custom request/response mapping. We have an example of a grid using the OData based Netflix API.
  3. preloaderDataview wraps a Dataview and adjusts the paging behaviour to load more data than rendered, paging locally before preloading another batch. In this Flickr API slideshow example we preload both the API responses and the actual images. This pushes all the loading in the background, allowing the user to page through images without interruptions.

All three need testing in actual projects before we can consider them stable. We’re also looking for other use cases for dataview that we might be missing.

Observable

Data binding is currently a common theme among newer JavaScript frameworks, with various competing solutions available. We don’t yet have a full-featured alternative, but we’ve developed a low-level abstraction that might power a data binding component in the future. We call this abstraction Observable. It provides an API for making changes on plain JavaScript objects and arrays that can be observed by listening to events that each change triggers. We’ve designed Observable to have a very small number of methods and events, with the purpose of making it easy to implement the same API in other contexts. These events are:

  • change: Triggered on objects after one or more properties have changed.
  • insert: Triggered on arrays after inserting one or more new items.
  • remove: Triggered on arrays after removing one or more items.
  • replaceAll: Triggered on arrays after replacing all items in an array.

That last event may seem odd at first, but this makes it possible to create a dataview, pass it to a grid, have the grid subscribe to events on that dataview’s output array, and then update itself when the dataview updates.

For all four events, Observable provides method counterparts:

  • property: to work on objects
  • insert, remove and replaceAll: to work on arrays.

Usage is consistent in both cases:

  • $.observable( object ).property( “name”, “Fred” );
  • $.observable( array ).insert({ name: “Peter” });

We’re still working on Observable. The next step is to find an abstraction for the array bindings, which would remove some overhead both from the Grid as well as from the todo-app demo.

When combining Observable with the Grid, we can easily add editing capabilities. In our grid editing demo, you can add, edit and remove developers from the table. Results are persisted via localStorage.

Instead of adding custom columns that have “Edit” and “Remove” buttons, we can use the selectable interaction to select one or more rows and then interact with the selection. In that demo, the selected array is also an observable array, which the second grid displays. Note that you can select rows on one page, go to the next page (you may need to add a few developers for a second page to show up), select more rows with command/ctrl-click (to extend the selection) and it will display all those rows in the second grid. The selected state is separated from the visual representation, making selection over multiple pages pretty easy.

Globalize

Globalize originally started as the jquery-global plugin. We rewrote it as part of the Grid project to be independent of jQuery, allowing usage on both client and server. Our localDataview implementation (mentioned above) uses it, and its also behind custom inputs like Spinner and Timepicker.

Mask, Timepicker, Selectmenu

These three custom inputs are being developed as part of the Grid project. They are intended to be used within the Grid for inline editing, as well as standalone in regular forms or websites. We’re getting close to landing all three in master, to release them as part of 1.9.

And more…

Work is still in progress on Template, Datepicker and other Custom Inputs. We’ll report back on those once we have more stable solutions.

Up next

We’re finishing existing components and are starting on Stage 4. For details, check out the main Grid wiki page.

So, when is it done?

Our Roadmap has the Grid on the 2.1 release, while the main focus for jQuery UI is on 1.9. In other words, there is a lot that needs to get done before we can put the Grid into a stable release and support it along with all the other components. At the same time, we encourage you to start testing the features outlined above now. Grid, Observable and Dataview are all pretty stable and working well. Globalize is a separate project that you should start using now if you want to support localized number and date handling on the clientside.

We value your input and help. Please use the Developing jQuery UI forum, comment on individual wiki pages or visit us on IRC (#jqueryui-dev on Freenode). If you found a solution to an issue, send a pull request.

ARIA Hackathon Summary

Posted on by

The original idea of the ARIA Hackathon was to get developers of jQuery UI and experts for ARIA together in one room, connect them, share knowledge and work on the accessibility of jQuery UI.

Meeting at the Inclusive Design Research Centre (IDRC) of OCAD University in Toronto, several members of the jQuery UI team (Richard, Scott, Dan, Jörn), various developers at OCAD (Michelle, Justin, Antranig, Harris), around Toronto (Ates, George, Darcy) and further away (Mat from Boston, Candace and William from the University of Washington and Jerry from the University of Illinois) learned a ton about testing and developing for screenreader users, about the ARIA standard and its process, as well as Mozilla’s efforts on accessibility.

  • Colin Clark gave an overview of the work of the IDRC team, including the Fluid project which makes use of jQuery UI.
  • Hans Hillen provided a lot of very practical insight on testing and developing with JAWS and NVDA and the ARIA spec and DHTML styleguide.
  • Jospeh Scheuhammer, heavily involved in the ARIA standards process, gave insight on how the process works like, how to provide feedback and which documents can and should be used along with the main specification.
  • David Bolter provided an overview of Mozilla’s efforts on Firefox accessibility, also covering the state and future of Firefox Mobile.
  • Finally Jennison Asuncion demonstrated usage of JAWS on regular websites, giving the spectators (or rather, listeners) a much better understanding of how a blind user actually uses a screenreader. He’s also an incredibly nice guy.

In a group discussion, we defined latest NVDA on latest Firefox as the supported setup for ARIA and acccessiblity, while also testing with JAWS on Windows and VoiceOver on OSX. We will accept reasonable patches for other or older ATs if the code is maintainable and doesn’t break ARIA in spec-conforming ATs.

After the two days of the main event, Hans and Jörn stayed till Friday to work on the keyboard and accessibility implementation of multiple jQuery UI widgets. Jörn also had meetings with Justin and Michelle at OCAD and Bobby and David at Mozilla to recruit them for jQuery UI and the Testing subteam (QUnit, TestSwarm). There is a lot of mutual interest that should lead to a lot more collaboration going forward.

Special thanks go out to IDRC and Colin Clark for hosting the event and Mozilla and David Bolter for funding some of the travel and lodging expenses.

For a mostly complete list of attendees (and links to Twitter and GitHub profiles) and various resources gathered during the event, visit the events page on our planning wiki.

jQuery UI 1.9 Milestone 3 – Spinner

Posted on by

The third milestone release for jQuery UI 1.9 is out, featuring the new Spinner widget, in active development. It also includes updates to the Tooltip and Menu widgets that we did since our second milestone release.

What’s a Milestone Release?

A milestone release makes it easier to try out the latest development code of jQuery UI without necessarily having to check out code from GitHub.

With a milestone release you can try out new widgets that are pretty far along (though not yet final) and provide feedback based on released code with a specific version number.

Note: the API is subject to change as the code is still under active development.

Spinner

We’d love your feedback on our new Spinner widget, to help ready it for the 1.9 final release. The API is already in good shape, so if you start using it now, migrating to 1.9 final should be really easy.

A spinner is a simple widget that allows users to increment or decrement the current text box value without having to input it manually. Increments do not have to be whole numbers — they can be set to decimal values (0.1) or large increments (5) for each click.

The widget uses the jquery-global plugin for globalization of numbers, including parsing and formatting of decimal numbers and currency values. This gives it several hundred cultures that it can support from the start.

Demo: Currency

Demos

Play with some of the latest demos in the menu branch on our live code view site, view.jqueryui.com:

Download

You can download the jQuery UI 1.9 Milestone 3 – Spinner release as a zip file or via git:

File Downloads

Git

How to Provide Feedback

wiki page

To help with the design and development of the Spinner widget, visit the Spinner page on our Development & Planning wiki.

forum

If the comments section on the wiki page doesn’t provide enough room for your feedback, post to the Developing jQuery UI Forum and tag the post:

How to Contribute Code

If you have code changes for the Spinner, fork jQuery UI on GitHub, commit to the spinner branch, and submit a pull request.

If you’re new to git or GitHub, see our guide: How to submit a fix to jQuery UI – The Easy Way.

Comments

Note: please do NOT use the comments section of this blog post for feedback on the Spinner widget. This discussion should occur on the wiki page and the forum (see How to Provide Feedback, above).

If you have feedback on us doing our third milestone release, feel free to leave a comment below. Thank you.

jQuery UI 1.9 Milestone 2 – Menu

Posted on by

The second milestone release for jQuery UI 1.9 is out, featuring the new Menu widget, in active development. It also includes updates to the Tooltip widget that we did since our first milestone release.

What’s a Milestone Release?

A milestone release makes it easier to try out the latest development code of jQuery UI without necessarily having to check out code from GitHub.

With a milestone release you can try out new widgets that are pretty far along (though not yet final) and provide feedback based on released code with a specific version number.

Note: the API is subject to change as the code is still under active development.

Menu

We’d love your feedback on our new Menu widget, to help ready it for the 1.9 final release. The API is already in good shape, so if you start using it now, migrating to 1.9 final should be really easy.

From the Menu documentation:

Menu transform a list of anchors into a widget with mouse and keyboard support for selecting an item. Its a low-level widget already used by Autocomplete and designed as the base for other widgets, for example, a menu bar or nested menus.

Demo: Contextmenu

Demos

Play with the latest demos in the menu branch on our live code view site, view.jqueryui.com:

Download

You can download the jQuery UI 1.9 Milestone 2 – Menu release as a zip file or via git:

File Downloads

Git

How to Provide Feedback

wiki page

To help with the design and development of the Menu widget, visit the Menu page on our Development & Planning wiki.

forum

If the comments section on the wiki page doesn’t provide enough room for your feedback, post to the Developing jQuery UI Forum and tag the post:

How to Contribute Code

If you have code changes for the Menu, fork jQuery UI on GitHub, commit to the menu branch, and submit a pull request.

If you’re new to git or GitHub, see our guide: How to submit a fix to jQuery UI – The Easy Way.

Comments

Note: please do NOT use the comments section of this blog post for feedback on the Menu widget. This discussion should occur on the wiki page and the forum (see How to Provide Feedback, above).

If you have feedback on us doing our second milestone release, feel free to leave a comment below. Thank you.

jQuery UI 1.9 Milestone 1 – Tooltip

Posted on by

The first milestone release for jQuery UI 1.9 is out, featuring the new Tooltip widget, in active development.

What’s a Milestone Release?

A milestone release makes it easier to try out the latest development code of jQuery UI without necessarily having to check out code from GitHub.

With a milestone release you can try out new widgets that are pretty far along (though not yet final) and provide feedback based on released code with a specific version number.

Note: the API is subject to change as the code is still under active development.

Tooltip

We’d love your feedback on our new Tooltip widget, to help ready it for the 1.9 final release. The API is already in good shape, so if you start using it now, migrating to 1.9 final should be really easy.

From the Tooltip documentation:

Tooltip replaces native tooltips, making them themable as well as allowing various customizations:

  • display other content than just the title, like inline footnotes or extra content retrieved via Ajax
  • customize the positioning, eg. to center the tooltip above elements
  • add extra classes to customize the appearance, for warning or error fields

A fade animation is used to show and hide the tooltip, making the appearance a bit more organic, compared to just toggling the visibility.

All you need is an element with a title attribute. Grab that element and call .tooltip() on it:

<a title="Details for this link" href="#">Link</a>
<script>
  $("a").tooltip();
</script>

When the mouse hovers over the element, the tooltip will appear, like so:

Demo: Forms with tooltips

Demos

Play with the latest demos in the tooltip branch on our live code view site, view.jqueryui.com:

Download

You can download the jQuery UI 1.9 Milestone 1 – Tooltip release as a zip file or via git:

File Downloads

Git

How to Provide Feedback

wiki page

To help with the design and development of the Tooltip widget, visit the Tooltip page on our Development & Planning wiki.

forum

If the comments section on the wiki page doesn’t provide enough room for your feedback, post to the Developing jQuery UI Forum and tag the post:

How to Contribute Code

If you have code changes for the Tooltip, fork jQuery UI on GitHub, commit to the tooltip branch, and submit a pull request.

If you’re new to git or GitHub, see our guide: How to submit a fix to jQuery UI – The Easy Way.

Comments

Note: please do NOT use the comments section of this blog post for feedback on the Tooltip widget. This discussion should occur on the wiki page and the forum (see How to Provide Feedback, above).

If you have feedback on us doing our first milestone release, feel free to leave a comment below. Thank you.