New in 6.2: The new 'Dockbar'

Hey guys,

The 6.2 release is almost out and I want to use this opportunity to talk about some of the improvements we have done to the dockbar. For those newer to Liferay, the Dockbar is the nick name for the bar that appears at the top of the screen and provides personal and administration options to users. In 6.1, this bar looked like this:

Although, of course it is possible to customize it. For example, here at liferay.com it currently looks like this within my blog:

In some other portals I've seen people just remove the dockbar except for for administrators. While this is something easy to do from the theme, I always advice people to use it as a last resort. The reason is that Liferay has a very flexible permission system and when a user has some management permissions for the current site or page the dockbar is where those editing options will appear. Liferay has some advanced logic to determine what options to show to each user, but you probably won't want to replicate that logic in your theme to determine when to show the dockbar and when not to.

For 6.2 we wanted to improve the Look & Feel of the dockbar as well as its usability. But we also wanted to make it less intrusive, easier to customize. Among other reasons we wanted to reduce the situations in which there was a need to remove the dockbar altogether.

After doing the proper analysis and quite a few discussions between Nate, Juan Hidalgo, Ed Chung and myself made the most visible decission: In 6.1 the dockbar is a full horizontal bar, that goes from left to right. While this is not so bad for intranet-like environments, it is often not desired in public sites. Furthermore, for regular users who only saw his name in the par it was a significant waste of space. We decided that the bar would float from the right top edge (with some padding) and grow towards the left as needed. Thanks to this, we save tons of screen real state, specially for regular users who just see this:

Let's see this in the context of the whole page. As you can see below, by placing the dockbar to the right the site logo and name become more relevant, which is what is desired in most situations:

 

If the user belongs to at least one site and has some administration priviledges then two additional menus appear:

  1. My Sites: Shows the sites that the user belongs to, with direct links to the public and private pages (if they exist).

     
  2. Admin: Contains a link to the Control Panel if the user has access to it and direct links to the site administration sections (Pages, Content, Users and Configuration) that the user has access to. The direct links to each section was one of the last additions based on early user feedback and it has two benefits: It requires fewer clicks to perform any administration operation and it shows the type of things the user will be able to manage for this site even before clicking them.

 

That's it for now. I'd love to hear your feedback on these changes.

Also, feel free to let me know what other features or improvements of the dockbar or Liferay 6.2 in general that you would like us to cover in upcoming blog entries.

Blogs
A little off topic but I really really like the combination of the new dockbar + control panel differentiation (separation between site admin and portal / system admin).

Is it possible to put custom items into the dockbar? I could see some plugin or site admin wanting some super-commonly-used link in there.
Whoops, sorry Jorge, posted the above as Ron but it was really me who was asking! Ron, stop using my account! ;-)
Hey James,

I'm glad you like the idea.
Regarding putting custom items into the dockbar the answer is yes. Actually the notifications plugin which comes with the bundle by default is a good example of how to do it.
I was looking at the notifications and wondering how it works. Does it get its content from alerts and announcements, subscriptions, or ... ?
It shows any notification sent using the notifications API that was introduced in 6.1. This means that it's not limited to Liferay's own portlets, you can use it in yours. Right now, workflow is the only out-of-the-box functionality that uses it, but other features will start using it going forward.
Denis, Jorge, thanks! Is there a portlet or something where users will be able to subscribe to the notifications they want, or more importantly, unsubscribe to the ones they don't? That seems like an essential feature.
Hey Joseph,

I don't think that exists, because the goal of dockbar notifications where to replace or complement existing email notifications. I can see some value in what you say though. Why don't you create a Feature Request and https://www.liferay.com/community/ideas and promote the idea to check how much interest in this there is?
I believe https://issues.liferay.com/browse/LPS-36673 was intended to provide the framework for managing/restricting notifications.
Hi @Joseph

I was investigating by myself on the same topic so I'm going to share what I've discovered so far.
Notifications it's a "quite new" portlet plugin that leverage on UserNotificationEvent and UserNotificationEventLocalServiceUtil (a service and an entity included in Liferay Portal). "Quite new" because it seems it was initially developed as a feature included in social office 2.0 and now available in Liferay Portal Bundle.

If you want inspect deeply, source code can be found here: https://github.com/liferay/liferay-plugins/blob/master/portlets/notifications-portlet
Hi Jorge , Can you please help me to notify message board notifications in dockbar notifications instead of notify via mails.. Tell me full description how to configure it.
I like the new dockbar notification implementation, it's like what I did (https://issues.liferay.com/browse/LPS-31082) but better! emoticon
Very nice work on this for v6.2, folks. A question: how do we remove the "My Sites" dropdown from the dockbar? We're using org sites to allow for org-specific doc library file storage, but want that to be transparent to the user (we're using the merge feature for public pages)
Hey Ben,

As of 6.2, I think the easiest way is with a hook that overwrites the dockbar portlet JSPs. The most specific one you can overwrite is /html/portlet/dockbar/view_my_sites.jspf but since it's a JSPf you will need to either restart the app server or also overwrite the view.jsp to make sure it detects the change.

For future versions we want to learn more about the type of customizations that Liferay users need and make them possible without any development. We had some ideas for 6.2 but didn't have enough feedback to ensure we were choosing the right customization points so we decided to defer it.
Thanks much, Jorge. We also got this clue from the post here https://www.liferay.com/web/jorge.ferrer/blog/-/blogs/new-in-6-2-the-new-dockbar-

I think we may proceed with this approach. Good stuff - keep up the good work!
Hi Jorge, you wrote: "since it's a JSPf you will need to either restart the app server or also overwrite the view.jsp to make sure it detects the change" ; also a command like "touch view.jsp" should work on Linux or Mac, or on Windows in gitbash
Hello Jorge!

I have a problem about dockbar in Liferay 6.2 (ee sp3) and I don't know if this is a bug or not.
I create an user with a new role that I have defined with some permissions.
The user has not access to the dockbar on his private layouts, but only on his public layouts.
When I add the role "Power User" to this user, he sees the dockbar on his private layouts, even if I remove all the permissions to "Power User".
Am I obliged to be "Power User" (or "Administrator" I suppose) to get access to the dockbar on private layouts?

Thanking you in advance.
Hey Yamina,

I'm pretty sure that this is a bug that was already fix. Since you seem to have an Enterprise Subscription I would recommend contacting support so that they can tell you in which Fix Pack or Service Pack it is fixed.