Close

Announcing new Vaadin Elements: vaadin-split-layout and vaadin-context-menu

Vaadin Elements has just launched <vaadin-split-layout> and <vaadin-context-menu> as two new freely available elements to our existing four. Vaadin Elements is a set of open source business class web components that bring structure and functionality to your web apps. vaadin-split-layout and vaadin-context-menu continue our trend of powerful, extensible web components.

We’ve also updated <vaadin-combo-box> with new features and fixes. Learn more in the release notes at the end of this post.

vaadin-split-layout 

<vaadin-split-layout> is a layout component that creates a customizable, resizable split between two elements. This element can be used for many different purposes, such as splitting a window for multitasking, for arranging different views on the same page, or for laying out pieces of information for an item.

Some of the features of <vaadin-split-layout> include:

  • Adjustable width/height of the layout with a draggable handle in between.
  • Vertical or horizontal split with the vertical property.
  • Can be nested to create more complex split layouts.
  • Customizable resize handle.
  • Emits resize notification.

Learn more about <vaadin-split-layout>  here.

vaadin-context-menu

This update also introduces the <vaadin-context-menu> component. <vaadin-context-menu> is a responsive web component for showing context dependent items for any element. This kind of context menu is often triggered with a right click or long tap and gives access to a menu suitable for that context. This can be used to supplement the existing browser context menu for your own unique context.

Some of the features of <vaadin-context-menu> include:

  • Customizable content can be either plain HTML or Polymer elements such as <paper-menu>.
  • Supports data-binding to the context and content.
  • Opens on both mouse and touch events. Can be set to open on any event, but defaults to your platform’s specific context opening trigger.
  • Automatic fullscreen mode for small viewports.
  • Both the contents and the overlay can be styled.
  • Provides both declarative HTML and imperative Javascript APIs.

 

Learn more about <vaadin-context-menu> here.

vaadin-combo-box release notes

<vaadin-combo-box> has received some love, too, and has new features and fixes.

  • Custom filtering lets the developer to bypass the built-in client-side filtering with a filter function of their own.
  • Remote filtering can asynchronously retrieve filtered items from a remote server.
  • Screenreader support has been improved.
  • selectedItem is no longer readOnly.

The Vaadin Elements team is committed to creating new, powerful web components.  As always, you can ask for questions and support on our forums or our Gitter chat.

Learn more at the Vaadin Elements homepage.

Why it’s faster to use Vaadin Designer than write Java

I’ve always been against WYSIWYG editors since the early days of Windows GUI design tools, because I felt that with those tools developing good-looking UIs was slower than writing code. I did some testing to find out which one actually is faster: my fingers and Eclipse auto-complete, or Vaadin Designer. I made a pretty simple form and timed my performance. To my surprise, with Designer I was more than 2x more productive. Here’s a side-by-side video of 9 minutes distilled into 30 seconds.

The declarative format of Vaadin doesn’t add any dirty abstraction on top of my components as I still must implement the event handling and logic in Java code. It is undeniably faster to create Vaadin layouts using Vaadin Designer than writing those in Java. It was quite a surprise to me that my 5+ years of experience in Vaadin doesn’t help me much when competing against the quickness of using a graphical design tool. There are a couple of reasons why using Vaadin Designer is faster than using only Java. Here are the features I found to be the biggest productivity boosts.

True WYSIWYG

The most obvious productivity comes from seeing the changes immediately while editing instead of having to re-deploy changes. Even when using some class reloading tool, you may still need to navigate to the view you changed or have some interaction with the application to see your dialog or form you just modified. Designer uses actual Vaadin layouting so what you see in the Design paper is the same you see in browser. The immediate apply of changes is even more prominent when doing modifications to the application theme.

Layout hierarchy visualisation

It’s pretty hard to keep the component tree as an abstract image in your head. UX designers don’t necessarily know how Vaadin layouting works so the view mockups might not have the correct layout components outlined. Instead, you need to figure out what components to use and try to build a correct layout with only Java API, which usually means some amount of trial-and-error. Having the layout displayed correctly while editing makes it easier to concentrate and deliver correct results without a hassle. Even better if you can teach your design person to install Eclipse or IntelliJ and build the UI for you instead of doing static mockup pictures.

Sizing quick-actions

Vaadin Designer displays quick action buttons for setting a full width or height to a component. It also helps you make correctly behaving layouts by hiding the sizing actions when using those would result in an invalid layout by having a relatively sized component inside an auto size component.

Changing component order is faster in Outline

Using drag-and-drop to position components is faster than writing addComponent even with auto-complete. The effect of drag-and-drop is highlighted even more when reordering components.

It’s not just the big features

There are some other features, too, that make me more productive, for example using copy-paste with components, having paper size presets to help do responsive design and the ability to use split-view when doing SASS changes. In the end, even though Designer has its limitations, I tend to pick it up more often than not. I don’t have to go all-in Designer or all-in Java, but I can mix-and-match and use Designer where it’s best suited - building good-looking layouts fast.

Vaadin Designer

Vaadin Designer 1.2 with responsive templates

Vaadin Designer 1.2 comes with powerful new responsive design templates. With the new templates creating responsive application views is easier than ever before.

You use a template by creating a design: File ‣ New ‣ Vaadin Design. With Designer 1.2 you now have four new templates to choose from: Application Menu, Tile Layout, Responsive Form and Data Grid With Editor. All the templates work with all screen sizes. The templates contain style definitions, which means your application must have a custom application theme extending Valo theme, although you don’t need to do any changes to your theme’s SCSS files. If you don’t have a theme folder, the templates don’t look right and the responsive features don’t work. The styles are automatically imported to designs.scss file inside your theme folder.

Application Menu template

The Application Menu template has an action menu on the left side of the view. The menu changes its size and position depending on the screen size. The right side is the application content area, which you should use as a view display for your application views.

Tile Layout template

Tile Layout template is meant to be used in situations, where you need a view with a lot of information pieces to be shown together in a larger screen, but the content needs to adapt for smaller screen sizes too. The most obvious use case is for creating dashboard type views. The template comes with CSS classes you can use to control how the columns of the tile layout for each row are divided.

Responsive Form template

Responsive Form template has a comprehensive set of form fields grouped to sections. The field captions can be shown either on top of the fields or on the left side of the fields. You can use the template as the basis of your form - just remove any fields you don’t need. Naturally, the template displays the fields optimally for all screen sizes.

Data Grid With Editor template

Data Grid With Editor template gives you a data grid with a search field, and an editor form you can show in a row selection. The form is displayed differently depending on the available screen size.

Update to Vaadin Designer 1.2 today

Create good-looking and well designed UIs easily with the new responsive view templates. Update to Designer 1.2 today. I think you’re going to love it. To learn more details on how to use the templates, read this tutorial.

If you are not using Designer yet, check the product page for more details and start your free trial today.

Try Vaadin Designer 1.2