The Story of the Ribbon so far and to come...

by ASP.NET AJAX Team | Comments 6

The ribbon (or RadRibbonBar, as we have named it) is among the most tempting-to-use looking and yet somewhat neglected controls. True, it has received some Microsoft love with being the core command component in the Office suite, as well as being more deeply integrated in the soon-to-be-released Windows8, but overall it's not been used that much.

Main reason being “why use it”. That, by the way, is an excellent question.

So why use the ribbon?

To answer that, let's first analyse the control and its purpose: it looks like a tabbed command area; a tabbed toolbar if you will. For the most part, you could say that's true, but just for the most part.

Other than being an overly sized toolbar, a ribbon has a couple of overwhelming features making it superior when compared to traditional toolbars:

  • commands (buttons and alike) in the ribbon are grouped together in logical and visible entities — the groups;
  • commands can have different size depending on the available screen real estate, with sizes ranging from large (big icon and text), through medium (small icon and text) and small (only icon);
  • finally, if the real estate is not enough a group may be collapsed to a much smaller state;
  • a ribbon could be vertically minimized to save even more screen real estate;
  • a ribbon has an additional set of quick commands — the quick access toolbar;
  • a ribbon may show additional commands depending on the context — the contextual tabs.

If it's not clear from the above features, the ribbon is a command interface that offers a very narrow focus over a broad range of commands.

The spec

So far it sounds nice and easy. We have to remember though, that simple things are not only rainbows and unicorns — when you look beyond the visually stunning fluent interface, there is an awful lot of logic and math happening behind the scenes. Thankfully, all that and much more is described in a big, extremely detailed specification.

Speaking of which, true, the spec, math and logic are somewhat “easy” to implement in a controlled environment such as Silverlight and WPF; but when it comes to HTML and browsers, things couldn't be worse or harder to implement.

I won't bore you with the exact details, which can be found in various places across the internet, but the key elements of the spec are:

  • a ribbon is a top level control;
  • a ribbon must have tabs, groups, commands visible at all times;
  • nor the ribbon as whole nor a group can be empty;
  • height of the ribbon is fixed;
  • size of the buttons is fixed to three possible variants; yet it's somewhat fluid;
  • resizing is only limited to window (application) resizing;
  • resizing happens in a particular algorithm with the developer either having a big part by supplying the parameters needed, or leaves everything to framework…

Those are the so called requirements for ribbon; in a way, in order for a ribbon to be recognized as such, it has to comply with the above and other requirements.

What it means?

Those requirements, I spoke about, roughly translate to the following:

  • a ribbon must be the first element that you put in your webform, after the script managers and such;
  • the entire ribbon tab container must not be hidden; neither must the groups nor the commands nor any other elements, unless specified otherwise;
  • each tab must have at least one group and at least one item must be present in each group;
  • the ribbon cannot be taller or smaller than it is, with the minor exception if you have quick access toolbar or contextual tabs;
  • a button cannot have size different from the one specified; neither it can have different icon size; nor it can have fixed width, except if it's small;
  • no resize handle;
  • developers must either specify how each group looks in each variant, or provide a sequence of how groups should be resized before being collapsed.

If you have been using the ribbon prior 2012 Q2, you might know that we did not follow that specification too strictly. We also knew it and we decided to correct that.

Starting 2012 Q2 we introduced many changes to comply with the spec as much as possible. But it turned out, that there were too many “must” in that spec and some of them did not feel right for our customers.

For instance, a group must have a title. It wouldn't occur to me, not to set a title to a group, but we began receiving support tickets, so we fixed that. A ribbon must not be empty… turns out that empty ribbons are also common.

So we decided to change some of the “must” to “should” and try not to enforce things.

Notable improvements

The resizing, per say, was one area where we vastly improved over the last year. The previous resizing algorithm was … well a bit magical; we also didn't like the algorithm in the spec, as it was a bit of overkill… The current resizing is what we call “predictable resizing” e.g. both shrinking and expanding of ribbon commands to work identically (but in a mirrored fashion).

The resizing itself would not have been possible if we did not perform a bit of reordering of the items on the client (in the browser). That by itself is a breaking change, but we did add the option to disable the reordering of the items, should anyone wanted it.

More to come

We are planning to add new items for the ribbon to make the ribbon more flexible. One such item would be the combobox / dropdown, though the one in the ribbon will be much simpler than the already existing RadComboBox.

Textboxes are also not perfect, when you add them as template items, so we are going to make them a standard ribbon item.

Those two are a must for the 2012 Q3 release, but the rest are up to you. Tell us what else you would like to see in the ribbon, be it a numeric textboxes, galleries or backstage view…

About the author

Ivan Zhekov

Ivan Zhekov

is a front-end developer at one of Telerik's ASP.NET AJAX teams. He's a self-taught, code-by-hand developer who enjoys twisted language constructs and language abuse above all. He's primarily fluent in Bulgarian and English, but has strong knowledge in HTML, CSS and JavaScript. He tries to have minimalistic approach to development and ambient way of living. He's not modest, that's for sure, but he compensates with vast experience and a wicked sense of humor.

Posted in: aspnet ribbon

6 Comments

Ben Hayat
Ivan, this was a great blog coming from the team members. I think these types of blog and communication leads to a great product.
I had used the ASP Ajax ribbon before and was not too happy with the experience it provided so I pulled it out and used toolbar. But now that I see the team is making enhancements, I'll use it in this upcoming project and will provide feedback. I think if the ASP.Ajax Ribbon can match the same functionality and Look & Feel of the Silverlight version, would be great. Because, there are cases where in an ASP app, SL is also used and the user will not get confused between the ASP version v.s. SL version of Ribbon.
Thanks!
..Ben
Stuart Hemmng
Not a comment directly about the RadRibbonBar per se, but, could you ensure that the RibbonBar employed by the RadEditor matches the functionality of the standard control?
Ivan Zhekov
Stuart,
I am not sure I understand your question completely, but here are some possible answers:
Each and every tool in the standard editor toolbar is translated to ribbon bar items.
Since a feature parity between the standard editor toolbar and ribbon built-in items is currently not available, the difference in the items is compensated with custom templates. That of course is a short term solution, as we'll be narrowing the gab in functionality with the upcoming updates of the ribbon, namely own combobox and testbox.
As for feature parity with the ribbon interface available in the office, that's another story... The main obstacles here are the so called font control, which has resizing behaviour of it's own and the gallery control, which has preview on item hover and undo preview on item out.
Of course there might be some cases that we are missing, so if you come across such, do file a support ticket.
Julian S

Hi Ivan, I've been using the Ribbon control for quite a while now and while it hasn't been perfect it definitely keeps getting better with each release.

Two great-to-haves in the next release would be adding a client-side collapse/expand event when clicking the minimise button. It would also be great if you added CommandName and CommandValue to the RibbonBarButton as per other button controls (e.g. RadToolBarButton). This would obviously be useful to support command arguments (e.g. where CommandName is export and CommandValue might be PDF).

Two other, perhaps more complicated, improvements for consideration:
1. The ribbon functionality is fantastic and it would nice to be able to use it in cases where there is no need to display the RibbonBarGroup tab thus saving space - i.e. in cases where you have one group and just want to show the buttons. At the moment I do this by CSS-hackery but it would be nice to see this as a supported option.
2. Having the option to collapse/expand the ribbon by double-clicking the ribbon group button. This behaviour would make it similar to other ribbon controls like SharePoint 2010 or Office 2010.

 

Ivan Zhekov
Julian,
your suggestions do make sense, especially CommandName and CommandValue. Those sound like musts for the Q3, yet we'll have to squeeze them in our planning somehow.
Hiding the tabs might prove tricky, but as you said it is possible now with a bit of a CSS trickery. We have to get our story straight though, such as this working only if there is just one tab and no contextual tabs; when there is no quick access toolbar; when there is no application menu.
Minimizing / maximizing the ribbon by double clicking the tab should also be fairly easy to implement. After all we have minimizing and maximizing functionality in the ribbon, we just need to hook it to double click. I do remember some hiccups which prevented us from releasing this behaviour, but we can sort them out and have this for the Q3 release.
I have logged all your suggestion in our PITS:
http://www.telerik.com/support/pits.aspx#/public/aspnet-ajax/12502
http://www.telerik.com/support/pits.aspx#/public/aspnet-ajax/12503
http://www.telerik.com/support/pits.aspx#/public/aspnet-ajax/12504
http://www.telerik.com/support/pits.aspx#/public/aspnet-ajax/12505
We really appreciate your feedback and we have awarded you some Telerik Points for that.
Julian S
Thanks Ivan, looking forward to checking out the next Q3 release.

Comments

  1.    
      
      
       
  2. (optional, emails won't be shown on public pages)
  3. (optional)
Read more articles by ASP.NET AJAX Team - or - read latest articles in Developer Tools