Blogs

Blogs

4.3.3 - Some new, interesting changes

Pagination sweeping the nation.

Well, Liferay version 4.3.3 has come out with 2 new "features" (they're more improvements), but I was really happy with how they came out.

The first one is that we've fixed our horrendous paging mechanism. The old way of selecting pages was annoying to say the least. Let's revisit our old friend:

That beast is simple and all, and I love me some simplicity, but it's deceptively hard to use, and really uninformative.
The first input box is the one that holds the current page. Why is it an input box? So you can custom enter in your page number of course!
But sitting right next to this input is an arrow that leads almost everyone to believe that it takes you to the next page.
Whoops! Sorry, it submits whatever you've entered into the page. How insane is that?

But who in the world wants to do that? Why do I have to type anything at all? Sure, if you're a keyboard wizard, fine, but since our little paging bar only exists at the bottom of the results, we have to scroll down to the bottom of the page, then click into the input box, switch our focus from browsing to typing, or we can just hit next.

The other problem with this old bar is that it only sat at the bottom of the page. By default, the results per page in Liferay is 20. That's a pain to have to scroll to the bottom of every result set whenever you want to go next.

A use case is, let's say you have multiple pages of content, and you're looking for an item. You don't quite know what page it's on, but it's somewhere in the first 3-5 pages. You click next, scroll down, click next, scroll down, click next, scroll down.
What a pain.

Also, let's say you have less than 20 items, or if you've changed your default result-per-page set. Let's say you have 17 items. How would you ever know it from this page?
You have to manually count each item, which is another huge pain.

So enough griping, how did we improve it?

Here is what the pagination bar looks like in Liferay 4.3.3:


You'll notice that it now let's you know how many are on the current page, what page your on, and better looking links for navigation the pages.

You'll also notice that there is a select drop down box instead of an input. This allows both the average user, and our speed keyboarders who navigate everything with shortcut keys a way to select the page you wish to go to.

Also, the new pagination bar is a bit more intelligent. If you have less than 10 results, it will only show the bar on the top. Why is this? Because chances are, you can squeeze around 10 results and the search bar into a pretty tight space in your browser. Most people don't need to see two paging bars if the actual result set isn't long enough to warrant any scrolling.

Overall, there are a lot of little changes like this that can go a long way to helping everyone understand the interface, and browse through the website more quickly.

Theme properties are a changing

In versions prior to Liferay 4.3.3, to set up a theme, you needed at least 2 XML files. XML is nothing short of a pain in the rear to use.

I understand that it helps machines communicate better. That's fine. But the machines exist to serve us, not the other way around.
When we force our users to use XML files when other files will suffice, we're not helping people be productive.
We're being lazy.

The XML files also contained data that was repetitive. Why should someone have to change the name of their theme in 3 different places? This is rife with possible errors, files falling out of sync, etc.

So, with that thinking in mind, we've added the ability to use just 1 .properties file that will contain all of your theme's meta data.

The XML files can still be there, but the default, recommended way is to use just the one liferay-plugin-package.properties file.

The contents of the file look something like this:

 

name=Casino
module-group-id=liferay
module-incremental-version=1
tags=1-column, 2-column, 3-column, 1-2-1-column, 2-2-column
short-description=Texas Hold'em anyone?
change-log=Adapted to the latest version of Liferay.
page-url=http://www.liferay.com/web/guest/downloads
author=Liferay, Inc.
licenses=MIT


I'm not saying that XML is horrendous. It's incredibly powerful, but when flexibility and "power" become an obstacle, is it really any more powerful, or is it just more dangerous?

So, with all of that, enjoy Liferay 4.3.3!

haha liferay is filled with so many things that are so close to being really good! nice change on the pagination since it gets used so much...
Nate wrote: "I understand that it helps machines communicate better. That's fine. But the machines exist to serve us, not the other way around." The alternative will soon be released in:"Terminator 4: Rise of the XML" .....hopefully ...ha!