Quantcast
Channel: Webix Blog
Viewing all 246 articles
Browse latest View live

Webix 5.1 Release Overview

$
0
0

The new version 5.1 of Webix UI library is released. Now you can enjoy Grid layout and Dashboard with convenient arrangement, on-the-fly number formatting for text inputs, and multiselection for Calendar and DatePicker and renewed Query Builder. Let’s look closely at the novelties of Webix 5.1.

Watch this brief overview and read the details below.

Numeric Format for Text Control and Editor

Display and edit numbers in formats suitable for your country with the format property of the Text control. You can define your own formats for numbers in forms and datatable editors. Such formatting is a great addition to strict input patterns available in the PRO edition of Webix.

webix numeric editor in form and datatable

Live demo >>

Multiselect in Calendar and DatePicker

Now you have an option to select multiple dates in Calendar and DatePicker. You can choose either of the two ways of selecting several dates: by pressing Ctrl and clicking on days, or by clicking or tapping days, which can be especially useful on touch devices.

webix multiselect for calendar and date picker

Live demo >>

GridLayout and Grid-Based Dashboard

PRO edition of Webix 5.1 includes two awesome layout widgets for precise UI arrangement.

GridLayout is one more way to put every UI component in its place. You can create a layout grid with a desired number of rows and columns and position the components relatively to the resulting grid cells. A component can span several cells horizontally or vertically.

GridLayout API allows easy adding, moving and deleting components from the layout, as well as saving the current cell arrangement and restoring it.

webix gridLayout

Live demo >>

Grid Dashboard adds the ability to drag parts of UI, or panels, and drop them in suitable places. You can also make Dashboard panels resizable.

webix grid dashBoard

Live demo >>

New Features of Query Builder

Query Builder has also been updated and offers several new features. Beginning from this version, you can convert filtering rules into SQL queries. Input values can be validated by adding validation rules to Query Builder fields. Besides, now it is more convenient to use Query Builder as a filter for DataTable, as you can change sizes of the popup with the filter. You can also change the width of input fields.

Webix Query Builder updated

Live demo >>

Other Updates

Webix 5.1 includes other feature updates, such as:

  • Updated Portlet with ability to save and restore UI state
  • parse() and getConfig() methods for Number helper
  • webix.ui.freeze() method to control resizing
  • onEnter event for all widgets to track the “Enter” key presses
  • point property for popups to control arrow visibility

…and a number of bug fixes.

You can also visit the What’s new page for a more detailed description of what’s been added and updated.

Webix 5.1 is available for download, on CDN and via Bower, NuGet and npm package managers. Clients with active licenses can get the new version from the Client Area or via npm. If you have never developed with Webix, download the trial version and see it in action. And, of course, send us your feedback and questions in the comment section or by email.

The post Webix 5.1 Release Overview appeared first on Webix Blog.


Webix Hint: The Widget for App Tours

$
0
0

Reading time: 8 minutes

Webix Hint is a widget for creating guided tours through apps. This is especially suitable for apps with a lot of contents and complex forms. With Hint, you can create guides with several steps. On each step, users will see a focused area and instructions how to work with the specific element of the app.

Webix Hint a widget for creating tours in apps

I’ll show you:

For demonstration, I’ll create a mock service for ordering medications online. I’ll deal with the UI aspect only.

Base UI for the Demo

Guided tours can be useful for different apps, e.g. booking apps and online shops. I’ll create the UI of a mock service for ordering medications online. If you are interested mostly in Hint usage, you can jump to the Hint Usage step.

Here are the main parts of the UI.

Layout and Toolbar

I’ve placed all main demo components into MultiView. The icons and the label on the toolbar show cell contents.

webix hint demo layout

Medications List

The first cell of the master MultiView is a TabView. It contains three DataTables with lists of medications. A tabbar is used for switching between lists.

demo main view drug list

Cart

The next cell of the multiview contains the shopping cart. I also used DataTable to display the list of meds.

demo cart

There are checkboxes in the first column of the datatable. The Back to shopping button returns you to “Drug List”, and the Log in and Pay button opens Login Form. This form can also be opened with the first icon on the toolbar.

Login Form

demo login form

A similar form is created for adding an account. That form opens when you click Create an account or the second toolbar icon.

If you click Sign in, the cart will open again, this time with the user’s name on top.

Logging in and out is imitated to some extent. Actually, I just change views and show/hide buttons, so that the demo would resemble a real online shop.

Credit Card View

A form for entering credit card credentials opens when you click Pay in the cart after logging in.

demo card view

Finally, if you fill in the form and click Pay, a template is shown. After a couple of seconds, the template will give way to the starting point – Drug List.

Live demo >>

Webix Hint and Where to Find it

The source files of the Hint widget are located separately from the main library package. You should download them from a GitHub repository. After that, you need to unpack and include Hint files into your HTML file:

<script src="{your path to hint}/codebase/hint.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="{your path to hint}/codebase/hint.css"></link>

Here is how you can initialize and start Hint with two steps:

webix.ui({
    view: "hint",
    id: "hint",
    steps: [
        {
            el: "div[button_id='grid_main']",
            title: "Welcome to Webix Pharmacy!",
            text: "Here you can order medications",
            event:"click"
        },
        {
            el: "div[button_id='grid_vet']",
            title: "Meds for Pets",
            text: "Look for meds and other goods for your pets",
            event:"click"
        }
    ]
}).start();

webix hint basic usage

Hint can have any number of steps. Steps must be defined as an array of objects. The only things I really have to define for each step are el and event. el is the part of the UI that will be highlighted. The el attribute accepts the ID of a Webix widget or any common CSS selector. event is the event that shows the next step.

Yet, Hint doesn’t help much without any instructions. For that, I’ll add some text. I can also give a title to a step.

To move from one step to the next by clicking on the focused element or by pressing Enter, you can set event to “click” or “enter” respectively.

var hint = webix.ui({
    view: "hint",
    id: "hint",
    steps: [
        {
            el: "div[button_id='grid_vet']",
            title: "Meds for Pets",
            text: "Click here to look for meds and other goods for your pets",
            event:"click"
        },
        {
            el: "toolbar:cart:icon",
            title:"Shopping Cart",
            text:"Press <b>Enter</b> to view goods in your cart",
            event:"enter"
        }
    ]
});
hint.start();

To start a guided tour at once, it would be enough to call hint.start() as I did in the sample above. But I want to delay the tour, say, for 2-3 seconds to show the demo first and only then dim the screen and start the show:

setTimeout(function(){hint.start();}, 2000);

Live demo >>

Highlighting Larger Areas

There is a way to highlight some area and make a part of it to work as an action target. For instance, you can highlight a form and make one of the buttons the action target for Hint.

Hint steps have an optional attribute eventEl. If you pass an ID or a CSS selector of an element to it, a click on this element will show the next step. el will be highlighted in this case, and users can do something with it, e.g. change input in text fields.

webix hint form highlight

For example, let’s highlight the Sign In form:

webix.ui({
    view: "hint",
    id: "hint",
    steps: [
        {
            el:"sign:form",
            title:"Log In",
            text:"Click <b>Sign In</b> to log into your account",
            event:"click"
        }
    ]
}).start();

Let’s make the Sign In button the element for moving to the next step. I’ll pass its ID to eventEl:

{
    el:"sign:form",
    eventEl:"sign",
    title:"Log In",
    text:"Click <b>Sign In</b> to log into your account",
    event:"click"
}

Hint itself does not disable controls in the highlighted area. So I’ll disable those buttons that users shouldn’t click during this guided tour. I’ll use the onAfterStart event of Hint:

webix.ui({
    view: "hint",
    id: "hint",
    steps: [
        {
            el:"sign:form",
            eventEl:"sign",
            title:"Log In",
            text:"Type a name and a password and click <b>Sign In</b> to log into your account",
            event:"click"
        },
        //...
    ],
    on:{
        onAfterStart:function(){
            $$("sign:create").disable();
            $$("sign:back").disable();
            $$("cart:back").disable();
        }
    }
}).start();

I mustn’t forget to enable the buttons when the guided tour is over. I’ll use the onSkip event for that. Hint has also the onEnd event, but it is better to use onSkip, because it is triggered when the tour is closed or finished.

webix.ui({
    view: "hint",
    id: "hint",
    steps: [
        //...
    ],
    on:{
        //...
        onSkip:function(){
            $$("sign:create").enable();
            $$("sign:back").enable();
            $$("cart:back").enable();
        }
    }
}).start();

I’ll also use the onBeforeStart event to begin the guided tour from a certain part of the UI – the Login form.

webix.ui({
    view: "hint",
    id: "hint",
    steps: [
        //...
    ],
    on:{
        onBeforeStart:function(){
            $$("signin").show();
        },
        //...
    }
}).start();

Live demo >>

You can also highlight larger parts of UI. For instance, you can set padding for the highlighted area around the form:

{
    el:"sign:form",
    padding:10,
    eventEl:"sign",
    title:"Log In",
    text:"Click <b>Sign In</b> to log into your account",
    event:"click"
}

Hint for Many Views (Pages)

Now I will create a longer guided tour. I want to highlight areas in different views. I need to make sure that views are rendered before the following steps are shown. Steps, as defined in the previous point, may not work correctly. This may happen because Hint steps can be rendered faster than views. And certainly faster than pages or big data are loaded.

There is another related problem. If you use Hint navigation buttons in the previous demo, the guide will freeze or won’t find the element to focus.

A not very nice solution would be to disable navigation buttons. No buttons, no problems:

webix.ui({
    view: "hint",
    id: "hint2",
    nextButton:false,
    prevButton:false,
    ...
}).start();

Luckily, there’s a better way. I can tell Hint to perform extra actions or wait for data before showing the next step. For this, I’ll use the next property of steps. next must be a function and it can return a promise if you plan to load big data. After the first step, I just want Hint to wait till the next view is shown:

var hint2 = {
    view: "hint",
    steps: [
        {
            el: "div[button_id='grid_main']",
            title: "Welcome to Webix Pharmacy!",
            text: "Here you can order medications. Click here to view the full list.",
            event:"click",
            next:function(){
                $$("drug_tabbar").setValue("grid_main");
            }
        },
        //other steps
    ]
});

To load a big chunk of data between the first and the second step, I can return a promise of data in next of the first step. Every Webix data component has the waitData property, which is a promise object:

{
    el: "div[button_id='grid_vet']",
    title: "Meds for Pets",
    text: "Click here to look for meds and other goods for your pets",
    event:"click",
    next:function(){
        $$("drug_tabbar").setValue("grid_vet");
        return $$("grid_vet").waitData;
    }
}

Similarly, I will ensure that the tour won’t break if a user chooses to go back to the previous step by clicking the Previous button. I’ll set the previous attribute of the step as a function that shows the necessary part of the UI:

{
    el: "div[button_id='grid_main']",
    title: "Welcome to Webix Pharmacy!",
    text: "Here you can order medications. Click here to view the full list.",
    event:"click",
    next:function(){
        $$("drug_tabbar").setValue("grid_main");
    },
    previous:function(){
        $$("drug_tabbar").setValue("grid_top");
    }
},
//...

And I can also make sure that the previous step waits for data:

{
    el: "div[button_id='grid_vet']",
    title: "Meds for Pets",
    text: "Click here to look for meds and other goods for your pets",
    event:"click",
    next:function(){
        $$("drug_tabbar").setValue("grid_vet");
        return $$("grid_vet").waitData;
    },
    previous:function(){
        $$("drug_tabbar").setValue("grid_top");
        return $$("grid_top").waitData;
    }
}

a gif or a snapshot

Live demo >>

Resuming Hint from Any Step

Hint has one more useful feature: you can resume the tour from any step. This can be useful if you want to show next step or change order of steps depending on the actions of users. This also can be helpful if you want to set Hint events other than a click on the focused area or a press on Enter.

Let’s change the step that shows the Login form. I’ll make the name field work as the action target for Hint. When a user types at least 4 characters, the next step will be shown.

This is the step I want to show first:

{
    el:"sign:form",
    title:"Log In",
    text:"Enter your name to proceed",
    event:"click",
    next:function(){
        login();
        $$("cart").show();
    }
}

To resume Hint, I’ll call hint.resume(). resume can take one parameter – the number of a step. Steps are counted from 1. I want to resume the tour from the following step. Hint has a handy method for getting the current step number – getCurrentStep. I’ll use getCurrentStep() + 1 to provide the right parameter for resume.

The guide will be resumed when a user types in 4 characters into the name field:

//sign:form

{ view:"text", name:"name", label:"Name/E-mail", required:true,
    on:{
        onTimedKeypress:function(){
            if (this.getFormView().validate() && this.getValue().length >= 4){
                var hint = $$("hint2");
                if (hint.isVisible()){
                hint.resume(hint.getCurrentStep()+1);
                }
            }
        }
    }
}

webix hint how to resume the guide from any step

Live demo >>

A Few More Words Before You Go

Hint is useful when you want to help users find their way through complex UIs.
I’ve shown you basic Hint usage and other features of the widget, like adding actions between steps, and resuming the tour from any step.

Download Hint from GitHub and read the documentation for more details. Feel free to drop us a line in the comments.

The post Webix Hint: The Widget for App Tours appeared first on Webix Blog.

Merry Christmas and Happy New Year!

$
0
0

The most amazing time of the year has begun! It is the time of joy and happiness shared with the loved ones. It is the time that brings good tidings and hopes, not to mention yummy food and presents! Webix team wishes you to be happy, healthy, and may success attend you in all your plans.

We also have a present for you: the WINTER171815OFF coupon code for a 15% discount off any purchase at Webix.com. The coupon code is valid till January 31, 2018.

The post Merry Christmas and Happy New Year! appeared first on Webix Blog.

Webix Jet Chronicles: What’s New since Version 1.0

$
0
0

Reading time: 4 minutes

You might be wondering what’s new in the country of Webix Jet since the glorious victory on September, 26 last year. There have been a number of feature updates during these 4 months. Webix Jet 1.3, the latest version at the moment, includes the seventh plugin urlParam for treating URL segments as parameters, new getParam / setParam API for accessing and setting URL parameters, TypeScript support and the optional path parameter for the Locale plugin.

Webix Jet 1.3 Version History

Let’s recap the history of updates in each version of Webix Jet 1.x:

Webix Jet 1.0 – September 26, 2017

Webix Jet 1.0 is a major update from version 0.5. These are the main features of the version:

  1. Views and app modules are defined as ES6 classes. You can also use other features of ES6, such as arrows.
import {JetView} from "webix-jet";
export default class ToolbarView extends JetView {
  config(){
      return {
          view:"toolbar", elements:[
            {
              view:"button", value:"Demos", click: () => {
                this.show("demos");
              }
            }
          ]
      };
  }
}
  1. Webpack is used as a module bundler.
  2. You can choose among four routers to define the URL of the app: a hashbang URL, a plain URL, a non-displayed URL, or a non-storable URL.

Webix Jet routers comparison of URLs

  1. Five new plugins replaced helper modules from the older version.
// myapp.js
import {JetApp, plugins} from "webix-jet";
const app = new JetApp({
  start:"/top/start"
});
app.use(plugins.Locale);
app.render();

 Webix Jet Locale plugin applied

Webix Jet 1.1 – December 6, 2017

Since this version was released, the following features have been made possible:

  1. this.ui can be used to initialize both Webix widgets and JetView classes.
// views/top.js
import {JetView} from "webix-jet";
import WindowsView from "views/window";
export default class TopView extends JetView {
   init(){
        this.win = this.ui(WindowsView);
    }
}

Where WindowsView is a class with a Webix popup inside:

// views/window.js
import {JetView} from "webix-jet";
export default class WindowsView extends JetView {
    config(){
        return {
            view:"popup",
            body:{ template:"Window contents" }
        };
    }
}

Live demo >>

  1. “!” can be removed from the hash URL. Use the routerPrefix property in the app config for that.

Webix Jet Hash URL without a bang

// myapp.js
var app = new JetApp({
    start:"/demo/details",
    routerPrefix:"
}).render();
  1. A view class can return a promise from the config method.
export class StatisticsView extends JetView {
    config() {
        return webix.ajax("server/data.php").then(function(data){
            data = data.json();
            return {
                view:"chart",
                series:[
                    { value:"#sales#", color:data[0].color},
                    { value:"#sales2#", color:data[1].color}
                ]
            }
        });
    }
}
  1. HashRouter supports config.routes. Set this property in the app config to make the URL shorter and prettier.
// myapp.js
import {JetView} from "webix-jet";
const app = new JetApp({
    start: "/top/about",
    routes: {
        "/hi"   : "/top/about", //load ‘/top/about’, but display ‘/hi’ as the URL
        "/form" : "/top/area.left.form",
        "/list" : "/top/area.list",
    }
});

Demo >>

  1. views in the app config can define string-to-string mapping. Use views to define your view creating logic. This property can be set as an object or a function.
// myapp.js
import {JetApp} from "webix-jet";
const app = new JetApp({
    start: "/top/start",
    views: {
        "start" : "area.list"   // load ‘/views/area/list.js’ if the URL segment is ‘start’
    }
}).render();

Demo >>

Webix Jet 1.2 – December 12, 2017

This version includes more improvements and additions.

  1. The show and getSubView APIs are updated.
  • show returns a promise that will be resolved when view is really shown:
{
    view:"button", value:"Show data", click: () => {
      this.show("data").then(webix.message("ready"));
    }
}

Live demo >>

  • getSubView allows you to get a child Jet View object:
{
    view:"button", value:"Load 'data'", click: () => {
        this.getSubView().loadData();
    }
}

Live demo >>

  1. this.ui allows you to define a custom HTML parent. Pass an optional container parameter to the method with the ID of the container.
<div id="here" style='height:100px;'></div>
// views/top.js
import SubView from "views/sub";
export default class TopView extends JetView {
  config(){
    return {  template:"Top view"  };
  }
  init(){
    this.sub = this.ui(SubView,{container:"here"});
  }
}

Where SubView is a Jet view like this:

const SubView = {
  template:"Subview in an HTML container"
};
export default SubView;

Live demo >>

Webix Jet 1.3 – January 11, 2018

These are the updates that you will get with the latest version.

  1. It is possible to create Webix Jet apps in TypeScript.
  2. New API:

Use the getParam() method of the JetView class to get URL parameters.

// views/sub.js
import {JetView} from "webix-jet";
export default class sub extends JetView {
    config(){
        return {
            view:"template"
        };
    }
    urlChange(view){
        var id = this.getParam("id", true);
        view.setHTML("id="+id);
    }
}

Apply the setParam() method of the JetView class to set URL parameters.

// views/top.js
import {JetView} from "webix-jet";
export default class TopView extends JetView {
    config(){
        return {
            rows:[
                { view:"segmented", options:["full", "brief"], on:{
                    onChange: function(){
                        this.$scope.setParam("mode", this.getValue(), true);
                    }
                }}
            ]
        };
    }
}

Use getUrl() to return a parsed URL object.

// views/some.js
import {JetView} from "webix-jet";
export default class SomeView extends JetView{
    config(){
        return {
            view:"button", value:"Show URL", click: () => {
                var url = this.getUrl();  //URL as an array of segments
                console.log(url[0].page); //"some"
            }
        };
    }
}
  1. The UrlParam plugin has been added. It allows using the URL fragments as parameters. They become accessible via the getParam(name) method of Jet views and are correctly weeded out of the URL.
// views/some.js
import {JetView,plugins} from "webix-jet";
export default class SomeView() extends JetView{
   ...
   init(){
       this.use(plugins.UrlParam, ["id"])
       // now when loading /some/23/details
       var id = this.getParam("id");//id === 23
   }
}

Demo >>

All the Future Versions

…are yet to come, so stay tuned. You can get new versions via npm and from the CDN. The Webix Jet gitbook now includes the What’s new page that displays major features of each version of the framework.

The post Webix Jet Chronicles: What’s New since Version 1.0 appeared first on Webix Blog.

Webix 5.2 Release

$
0
0

Meet Webix 5.2 with updates and new features. With the new version, you’ll get a multilevel Sidebar, Switch button and a vertical RangeSlider. Also, you will find performance updates for Kanban and List. Besides, developer tools have been greatly enhanced.

Watch a video overview of Webix 5.2 and read the details below.

Sidebar Included in Main Library

Due to a high demand for a Sidebar widget, we decided to include it into the library core. Sidebar can be multilevel.

Webix 5.2 Sidebar moved into main library

Switch Button

The Webix Switch Button is a slider variation of a checkbox. You can use it to turn some settings on and off. The control can be in two states and has two values for them: 1 and 0, correspondingly.

You can add labels on the left/right side of Switch and right on top of it.

Webix 5.2 Switch toggle buttons

Updated Snippet Tool

New Snippet tool can boast new design and wider possibilities.

  • You can choose the version of Webix, add complex widgets and enter Webix Jet app mode.
  • You can share your snippet with a QR code that will be generated when you save the snippet.
  • You can choose from a number of presets, when creating a new snippet.
  • You can also read help notes, if you have any questions on how to work with Snippet tool.

Webix 5.2 new snippet tool

Updated Form Builder

Form Builder has a new user-friendly interface:

  • You can drag new controls from a list
  • You can easily align controls on the grid.
  • You can undo / redo actions.
  • You can use hotkeys for actions.
  • In case you have questions on how to work with the tool, you can read help notes.

Webix 5.2 new form builder

Vertical Mode and Moving Titles for RangeSlider (PRO)

The RangeSlider widget received useful updates:

  • the vertical mode
  • moving titles with current values

Webix 5.2 Vertical RangeSlider

Pivot with New Design

The Pivot complex widget has new design.

new Pivot design

Export Updates: Format and Filter

You can set the format for exported data. For example, you can change the format of dates.

Webix 5.2 export set format

You can also choose what data items to export.

Webix 5.2 export filters

Faster Performance

Kanban Board had a major update of performance. If you move, add or delete a card, only the updated items of Kanban are repainted.

Before Webix 5.2, dynamic rendering and loading were possible only in DataView and DataTable. From now on you can enjoy the same features with List, provided that it has a newly introduced dynamic property. This update also concerns Richselect, Combo и Kanban, because they use List.

Try New Webix

Webix 5.2 also includes a number of API updates and bug fixes. For details, visit out What’s new page.

If you are an active Webix user, upgrade to the new version via npm or from the Client Area. You can download Webix 5.2, get it from CDN and via Bower, NuGet and npm package managers. If you’ve never coded with Webix, you can try it and share your experience with us.

Download Webix 5.2

The post Webix 5.2 Release appeared first on Webix Blog.

Webix Dashboard Layout: How to Build Appealing Dynamic Dashboards

$
0
0

Reading time: 6 mins

Dashboards are good for tracking important information. With Webix Dashboard, you can conveniently place components in a grid and let users change the structure of the application with drag-n-drop. Dashboard panels can be rearranged, resized, removed and created anew. Join me to find out how Dashboard can help you create dashboards for apps.

View the live demo >>

Get the demo from GitHub >>

webix grid dashboard layout

Step 1. Simple Responsive Dashboard, with Drag and Resize

webix dashboard with drag and drop and resize

Initializing Webix Dashboard

Dashboard is available in Webix PRO. So for your projects you will have to include Webix files from your local folder, e.g. “../codebase/webix.js”.

Let’s initialize Dashboard. By default, it will have 2 rows and 2 columns:

webix.ui({
  view:"dashboard",
  id:"grid"
});

Creating and Configuring Panels

Let’s place the first panel with a widget onto the dashboard. This is a panel with GeoChart that is placed in the bottom right cell of the dashboard:

webix.ui({
  view:"dashboard",
  id:"grid",
  cells:[
    {
      view:"panel",
      x:1, y:1,
      dx:1, dy:1,
      body:{
        view:"geochart", data:data,
        chart:{                        
          colorAxis:{
            colors: ["red","orange","gold","green","blue","indigo","purple"]
          }
        }
      }
    }  
  ]
});

Drag the panel into one of the upper cells:

View code >>

I can also add a header or an icon to a panel. To make the panel resizable, I’ll add resize:true to the panel configuration.

{
   view:"panel",
   x:1, y:1,
   dx:1, dy:1,
   header:"Area World Map", // or icon:"bars"
   resize:true,
   body:{
     view:"geochart", data:data,
     chart:{
       colorAxis:{
         colors:["red","orange","gold","green","blue","indigo","purple"]
       }
     }
   }
}

View code >>

Building a Dashboard

I will create an 8×6 dashboard. Sizes of the grid are set as gridColumns:8, gridRows:6 in the Dashboard configuration. Let’s add more panels, e.g.:

webix.ui({
  view:"dashboard", id:"grid",
  gridColumns:8, gridRows:6,
  cells:[
    {
      view:"panel", x:1, y:0, dx:1, dy:1,
      header:"Visitors",
      body:{
        template:"<p class='title'>1.234K</p>", css:"draft"
      }
    },
    {
      view:"panel",
      x:1, y:3, dx:1, dy:2, resize:true,
      header:"Countries",
      body:{
        view:"list", id:"list",
        template:"#country#",
        data:webix.copy(data),
        ready: function(){
          this.select(3);
        }
      }
     }
   ]
});

I will also add padding for the dashboard and margin for each panel:

webix.ui({
   view:"dashboard",
   id:"grid",
   gridColumns:8, gridRows:6,
   padding:18, margin:18,
   cells:[
     //...cells
   ]
});

View code >>

For the demo, I used the Flat skin with different colors.

Live demo >>

Let it Scroll

You can create dashboards with scrollbars.

View code >>

You can do this by setting fixed height of cells with cellHeight. There is a side effect; panels can be dragged lower than gridRows. The existing panels won’t shrink vertically, and the dashboard will still be responsive. Let’s place the dashboard into a scrollview:

var grid = {
  view:"dashboard",
  id:"grid",
  cellHeight:200,
  gridColumns:8, gridRows:6,
  padding:18, margin:18,
  cells:[
    //...cells
  ]
};

webix.ui({
  rows:[
    toolbar,
    {
      view:"scrollview", body:grid
    }
  ]
});

Live demo >>

By analogy, you can create horizontally scrollable dashboards.

Step 2. Saving and Restoring the Panel Arrangement on Dashboard

It is useful to remember the arrangement of panels and restore it. This way users will not have to rearrange panels every time they open the dashboard again.

Move panels and reload the page:

View code >>

Saving the State

I want the dashboard to save its state each time I move or resize panels. So I will attach a handler to the onChange event, serialize the state and put the state object into the local storage:

var grid = {
  view:"dashboard", id:"grid",
  gridColumns:7, gridRows:6,
  padding:18, margin:18,
  cells:[
    //...cells
  ],
  on:{
    onChange:function(){
      //saving grid state
      var state = this.serialize();
      webix.storage.local.put("grid-dashboard", state);
    }
  }
};

Similarly, you can save the state to the server.

Restoring the State

I will restore the dashboard state after page reloads. I will get the state object from the local storage and restore the state of the grid after the initialization of the UI:

...
webix.ui({
  rows:[
    toolbar,
    grid
  ]
});

//restoring grid state
var state = webix.storage.local.get("grid-dashboard");
if (state)
  $$("grid").restore(state);

Now if you move or resize panels and then reload the page, the dashboard will be rebuilt as before.

Live demo >>

Step 3. Dragging New Panels from the Sidebar and Deleting Panels

Let’s give users even more freedom in configuring the dashboard. I will create a list of different panels and put them onto a sidebar. I will make it possible to drag panels from the list to the dashboard.

View code >>

Each item in the list should contain a unique ID, the name of the item, and the number of rows and columns that the widget will span within the grid. For instance, this is an item for a gage:

{ id:"network_usage_gage", value:"Network Usage Gage", dx:1, dy:2 }

Check out the list of widgets. You can only drag items from it (drag:”source”). template defines the way widget names will be displayed: with their initial sizes.

var widgets = {
  rows:[
   {
      view:"list",
      id:"list",
      width:250,
      drag:"source",
      scroll:false,
      template:"#value# (#dx#x#dy#)",
      data:[
        { id:"visitors_template", value:"Visitors Template", dx:1, dy:1 },
      { id:"sales_template", value:"Sales Template", dx:1, dy:1 },
      { id:"area_pie_chart", value:"Area Pie Chart", dx:2, dy:2 },
      { id:"population_spline_chart", value:"Population Spline Area Chart", dx:3, dy:2 },
      { id:"network_usage_gage", value:"Network Usage Gage", dx:2, dy:2 },
      { id:"countries_list", value:"Countries List", dx:1, dy:2 },
      { id:"countries_datatable", value:"Countries Datatable", dx:2, dy:2 }
     ]
   }
  ]
};

webix dashboard drag from list

Dashboard Panel Factory

To work with dynamic panels, I need to define the factory function. The factory will receive the attributes of a list option (a name and rowspan/colspan) and build a panel according to it. The function receives the state object and must return the Webix UI configuration of the widget.

Each panel will be created by a separate function that will receive the state object and return it to the factory. For example, the factory will receive a list item with the ID “network_usage_gage”:

function panelFactory(obj){
  obj.view = "panel";

  switch (obj.name){
    case "network_usage_gage":
      return createNetworkGage(obj);
    //other cases
}

And createNetworkGage() will create a panel with a gage and return it to the factory:

function createNetworkGage(obj){
    obj.resize = true;
    obj.body = {
        view:"gage",
        id:"g1",
        value:36,
        minRange:0,
        maxRange:100,
        color:color,
        data:webix.copy(data)
    };
    return obj;
};

You can check the complete code of the factory in the GitHub repository.

Deleting Panels

Under the list of widgets I’ll place a button to clear the dashboard and start again:

var widgets = {
  type:"clean", rows:[
    //the list
    ...
    {
      view:"button", value:"Reset",
      click:function(){
        $$("grid").clearAll();
      }
    }
  ]
};

clearAll() of Dashboard works fine if you intend to delete all the panels at once. It can also be useful to delete panels one at a time. I will add icons to each panel for that – an x icon, which goes by the name times:

function panelFactory(obj){
  obj.view = "panel";
  obj.icon = "times";
  //...
}

After that, I will define a click handler that will remove the panel. To make deleting less accidental, I’ll add a confirmation window.

webix dashboard deleting panels

Panels are removed with the removeView method of Dashboard. On a click on the x icon, I will get the panel. If the dialogue returns confirmation, I will get the dashboard with the getParentView method of the panel and will remove the panel. This is the event handler that will open a confirmation window for removing a panel:

webix.event(document.body, "click", function(ev){
  var css = ev.target.className;
  //if the target is a panel icon, show the confirmation window
  if (css && css.toString().indexOf("panel_icon") != -1){
    var view = webix.$$(ev.target);
    webix.confirm({
      title:"Remove Panel",
      ok:"Yes",
      cancel:"No",
      text:"Are you sure?",
      callback:function(result){
        if (result)
            view.getParentView().removeView(view);
    });
  }
});

Live demo >>

Conclusion

Webix Dashboard is a layout widget that helps to present data in a customizable way. Dashboard is good for dynamic layouts that users can configure themselves. You can download the demo, extend it and use for your projects created with Webix PRO.

For more details on the widget, read the documentation. Webix Dashboard is based on GridLayout, Dashboard’s parent without drag and drop, also available in the PRO version of the library.

The post Webix Dashboard Layout: How to Build Appealing Dynamic Dashboards appeared first on Webix Blog.

Using Webix Jet with TypeScript

$
0
0

Creating projects with Webix Jet has become much more convenient since TypeScript support was introduced in version 1.3, and it requires just a few changes in the project. Change extensions of your source files and configure the toolchain, and you will get a smart autocomplete for Webix methods, hints on their use and code validation.

Read further to find out how to use Webix Jet with TypeScript or grab the typescript branch of the Jet starter pack.

Webix Jet with TypeScript

Configuring the Toolchain

Step 1. Adding tsconfig

Begin with creating the tsconfig.json file that specifies the files of your project and compiler options.

Add paths to models and views to the objects with compiler options:

// tsconfig.json
{
    "compilerOptions": {
        ...
        "paths": {
            "models/*":["models/views/*"],
            "views/*":["sources/views/*"]
        }
    },
    ...
}

Typing definitions for Webix widgets, mixin interfaces and parameters for their methods are stored in the webix.d.ts file. It is included in the main Webix package. So to include webix.d.ts into an app, add it to files in tsconfig.json:

// tsconfig.json
{
    ...
    "files":[
        "node_modules/webix/webix.d.ts"
    ]
}

Also include your source .ts files:

// tsconfig.json
{
    ...
    "include":[
        "sources/**/*.ts"
    ]
}

Check out the complete tsconfig.json.

Step 2. Configuring Webpack

Now let’s configure webpack to handle TypeScript. Go to webpack.config.js and change the entry point and other .js files to .ts, e.g.:

// webpack.config.js
var config = {
    entry: "./sources/myapp.ts",
    ...
    resolve: {
        extensions: [".ts", ".js"],
        ...
    }
}

Use a different transpiler: ts-loader instead of babel-loader:

// webpack.config.js
var config = {
    ...
    module: {
    rules: [
            {
                test: /\.ts$/,
                loader: "ts-loader"
            },
            ...
        ]
    }
}

Step 3. Updating Dependencies

Don’t forget to update dependencies in package.json:

"devDependencies": {
    ...
    "ts-loader": "^3.2.0",
    "tslint": "^5.9.1",
    "typescript": "^2.6.2",
    ...
},
"dependencies": {
    "webix-jet": "^1.3.7"
}

Start Coding

All view and model files now must have the .ts extension. There is no need to change anything in files, as webix-jet is imported in the usual way and typings are enabled automatically.

If you want to use the APPNAME and VERSION defined in package.json, declare constants injected by webpack in the app.ts file:

// sources/app.ts
import {JetApp} from "webix-jet";
import "./styles/app.css";

declare var APPNAME;
declare var VERSION;

webix.ready(() => {
    const app = new JetApp({
        id: APPNAME,
        version: VERSION,
        start: "/top/start"
    });
    app.render();
});

Now you are ready to code. TypeScript enables autocompletion of Webix code and parameter hints in your IDE:

gif with autocomplete and hints

Some Extra Benefits

Typescript toolchain includes the tslint tool, which can be used to validate your code and ensure its quality. To enable it, add tslint.json with validation rules for TypeScript into your project.

After that, include a script for linting into package.json:

"scripts": {
    "lint": "tslint -p tsconfig.json",
    ...
}

Now you can run npm run lint to validate the codebase of your app.

Come to the TypeScript Side

Combining TypeScript with Webix Jet makes development more convenient. The Webix TypeScript declaration file is updated with each major update. Grab the starter package and share your coding experience with us.

The post Using Webix Jet with TypeScript appeared first on Webix Blog.

Meet Webix 5.3 with Updated Spreadsheet and Webix Jet 1.5

$
0
0

Spring work is going on with joyful enthusiasm, and the Webix team introduces updates for the UI library and for Webix Jet micro framework. Spreadsheet has been given a number of usability upgrades, and documentation is now supplied with links to live snippets. You can also choose any icon font for Webix skins, including Material design icons and Font Awesome 5. Read further to find out details about the release.

Webix 5.3 with Webix Jet 1.5

Webix Jet 1.5

Version 1.5 includes a lot of useful features for the development of large and huge applications:

1. You can compile Jet apps as app modules or standalone bundles and include them into other Webix Jet apps or directly into the page. This feature is especially useful for developing large apps, as it allows dividing applications into separate modules that can be developed and tested independently.

2. You can wrap Jet apps into Webix components and use them on a page as ordinary Webix widgets.

Webix Jet apps as Webix widgets

You can also add Jet views into dynamic Webix UI layouts. Include Jet views as panels on Dashboard, nest them as Datatable subviews and add them as new elements in Layout, Tabview, Multiview, Carousel, and other layouts with the common addView() method.

Webix Jet 1.5 Jet views as Webix widgets

Usability Enhancements of Webix SpreadSheet

SpreadSheet has extra hotkeys like Ctrl+A and backspace. The handling of copy/cut/paste operations for formulas has become more precise, and undo operations with Ctrl+Z are now more stable.

Conditional formatting has become more convenient and includes the new “not equal” operator. Values for conditions can be taken directly from cells (=A2, =C3) and can be added by clicking on cells.

Webix 5.3 Spreadsheet conditional formatting

You can use the new ‘Clear’ submenu for clearing values, styles, conditional formats, or filters.

Webix 5.3 Spreadsheet styling and clear all

For more details about SpreadSheet enhancements, visit the What’s new page.

Snippets in Documentation

Since March, apart from viewing widget samples in the documentation, you can conveniently view and change their code in the Snippet tool. All code samples are available both as snippets and in the Samples folder.

Selecting Different Icon Packs for Webix

In reply to feedback from our customers, we have decided to add the ability to choose icon packs. Now you can include Material design icons, Font Awesome v5 icons or any other icon font in Webix skins. This is only the first step, so stay tuned for improvements and updates.

For details about other updates and bug fixes, visit our What’s new page.

What’s Next

Webix team looks forward to the summer with enthusiasm and has more plans and projects that will come true with the next release. Meanwhile, you can upgrade your library via npm and Client Area or download a free trial and fully appreciate Webix 5.3.

Download Webix 5.3

The post Meet Webix 5.3 with Updated Spreadsheet and Webix Jet 1.5 appeared first on Webix Blog.


Cascading Comboboxes in Webix

$
0
0

Reading time: 3 mins

If you want to create powerful yet simple forms for complex input, join me. I will show you how to create cascading comboboxes, where the list of options of one combobox depends on the selection in the previous one. This way users can input complex hierarchical data in a convenient way.

Cascading Comboboxes in Webix

Client-side Option Filtering

If comboboxes have a few options with relatively simple dependencies, it is better to load them once and then filter out the relevant ones.

Let’s create two comboboxes with countries and towns and prepare the lists of options for them. Both lists can be linked through IDs:

// countries
[
  { "id":"1", "value":"Italy" },
  ...
]

// cities
[
  { "id":"1", "value":"Rome", "country":"1" },
  ...
]

At first, all possible ‘town’ options are loaded into the second combobox. They will be filtered depending on the value of the first combobox. I will handle the onShow event of the dependent option list and call the filtering method that will compare the IDs and return matches:

{
  view:"richselect",
  label:"Select a country",      
  id:"country",
  options:countries
},
{
  view:"richselect",
  label:"Select a city",
  id:"city",
  options:{
    data:cities,
    on:{
      onShow(){
        let country = $$("country").getValue();
        if (country){
          this.getList().filter(obj => obj.country == country)
        }
      }
    }
  }      
}

I will also need to clear the previous city selection after a new country is selected in the first combobox:

{
  view:"richselect",
  label:"Select a country",      
  id:"country",
  options:countries,
  on:{
    onChange(){ $$("city").setValue(); }
  }
}

Cascading comboboxes in Webix

Live demo >>

Reloading Options from Server

If there are too many options and they need complex filtering, it is better to filter options on the server side and reload combobox options. New cities for the second combobox will be loaded when a country is selected.

I will change the previous demo and replace filtering options with reloading:

{
  view:"richselect",
  label:"Select a city",
  id:"city",
  options:{
    on:{
      onShow(){
        let country = $$("country").getValue();
        if (country){
            this.getList().clearAll();
            this.getList().load("https://api.myjson.com/bins/"+country);
        }
      }
    }
  }
}

Live demo >>

This solution works fine. Yet, if you want to reuse it for several comboboxes, you will have to copy this code and paste it with a different ID of the master combo. There is a better way: I can create a new component that will know how to link to other combos. For example, let’s create such a component on the base of Richselect:

webix.protoUI({
  name:"dependent",
  $cssName:"richselect"
}, webix.ui.richselect);

A dependent combobox will have two extra configuration attributes:
– the ‘master’ property that will store the ID of the combobox it depends on;
– the ‘dependentUrl’ property that will store the path to the script with unfiltered options.

{
  view:"richselect",
  label:"Select a country",      
  id:"country",
  options:"https://api.myjson.com/bins/1d9x9m",
},
{
  view:"dependent",
  master:"country",
  dependentUrl:"https://api.myjson.com/bins/",
  label:"Select a city",
  id:"city",
  options:[]
}

Next I will add the option loading logic for the dependent richselect. When a country is selected in the master, the dependent combo will be reset and a new option list will be loaded. I will attach an event handler to the master combobox for this:

webix.protoUI({
  name:"dependent",
  $cssName:"richselect",
  $init:function(config){
    var master = $$(config.master);
    master.attachEvent("onChange", (newV) => {
      this.setValue();
      this.getList().clearAll();
      if (newV)
        this.getList().load(config.dependentUrl+newV);          
    });
  }
});

The same can be done with any selection widget (select, combo, multiselect, etc.), so it is a good idea to store this functionality separately and then use it for any other component:

const LinkedInputs = {
  $init:function(config){
    var master = $$(config.master);
    master.attachEvent("onChange", (newV) => {
      this.setValue();
      this.getList().clearAll();
      if (newV)
        this.getList().load(config.dependentUrl+newV);          
    });
  }
};

webix.protoUI({
  name:"dependent",
  $cssName:"richselect"
}, LinkedInputs, webix.ui.richselect);

Live demo >>

This is how you can reuse LinkedInputs described in the above code for creating cascading combo views:

webix.protoUI({
  name:"dependent",
  $cssName:"combo"
}, LinkedInputs, webix.ui.combo);

You can also create a chain of cascading comboboxes. For example, let’s add one more combo with a list of streets of the selected city:

...
{
  view:"dependent",
  master:"city",
  dependentUrl:"https://api.myjson.com/bins/",
  label:"Select a street",
  id:"street",
  options:[]
}

chain of Webix comboboxes

Live demo >>

Conclusion

It is also a good idea to hide or disable dependent comboboxes until an option is selected in the parent combobox. This can be easily done with the hide()/show() and disable()/enable() methods of Webix controls.

By linking form controls, you can create convenient forms for inputting complex data with dependencies. This can be done with practically all selection widgets and switches (all variations of selection controls, checkboxes, radio buttons, segmented buttons, etc.), with which users can input a limited number of values.

You can read more blog articles about Webix Form:

The post Cascading Comboboxes in Webix appeared first on Webix Blog.

Webix 5.4 with GraphQL support, updated SpreadSheet and FormBuilder

$
0
0

Even though the summer is in full swing, our team of developers has been working hard to bring you the new version of Webix. Webix 5.4 includes the new WJet utility that will help you start working with Webix Jet, GraphQL and Firestore support, updated SpreadSheet and Scatter chart widgets, and usability improvements for Form Builder and Snippet Tool. Check out the What’s new page for the full list of updates.

GraphQL Support

Webix 5.4 can work with GraphQL due to the new proxy. Now Webix users can make precise queries using GraphQL syntax to fetch detailed information from backend exactly as the client side requests it. The GraphQL proxy also allows saving data back, through GraphQL mutations.

Webix 5.4 GraphQl support

Data Formats for SpreadSheet

Formatting numbers in SpreadSheet has become much friendlier with the new custom format dialogue. Apart from creating arbitrary formats, users can change a built-in format by choosing from options available in the dialogue.

Webix Spreadsheet with a new custom number format dialogue

Scatter Chart: Drawing Graphs by Coordinates

Now the Scatter chart can connect points with a line. Optionally, you can close a line into an empty or filled shape. Points are drawn on the chart by their coordinates.

Webix scatter chart can draw shapes

Try it >>

Firestore Support

Following the major update of Firebase, Webix supports integration with Cloud Firestore. Now our users can enjoy real-time data synchronisation and data operations in the offline mode.

Get the demo of Webix-firebase integration >>

Bullet Graph: Dynamic Colors and Changeable Scale

You can regulate the size of the ticks on the scale of Bullet graph. You can also make Bullet change color depending on the current value.

Webix 5.4 Bullet Graph updates

Updates of Form Builder

Form Builder’s design and usability were updated:

  • more controls and options for their configuration,
  • more alignment settings for controls.

Webix Form Builder with new design and enhanced functionality

WJet Utility for Faster Prototyping in Webix Jet

Prototyping in Webix Jet has become faster with the new WJet utility. You can use the command line to create an app, configure ES6 or Typescript toolchain, enable authorization and localization, add gantt, scheduler or other supported widgets into the app. For more details, read the Webix Jet guide.

Download Webix 5.4

The new version also includes other minor updates and bug fixes, the full list of which you can find on our What’s new page. Go ahead and upgrade to the new version to fully appreciate improvements. If you are not a Webix user yet, you can download the trial version and find out how Webix can help you with development.

Download Webix 5.4

The post Webix 5.4 with GraphQL support, updated SpreadSheet and FormBuilder appeared first on Webix Blog.

Creating Apps with Live UI Editing using Webix AbsLayout

$
0
0

Reading time: 7 mins

If you want to create applications that let your users build interfaces themselves, read on and find out how you can achieve this with Webix. Building dynamic user interfaces can be partially achieved with Webix Dashboard. In some cases, like building forms, you can use Form Builder. This service uses AbsLayout as the area for UI building. I will show you how to equip AbsLayout with Drag-n-Drop and use it for rearranging, adding, and deleting UI components.

Creating Apps with Live UI Editing using Webix AbsLayout

Dragging Controls

Let’s prepare the sandbox: AbsLayout with two buttons.

webix.ui({
    view:"abslayout", id:"abs1", cells:[
        { view:"button", value:"Save", width:100, height:40, left:100, top:100 },
        { view:"button", value:"Cancel", width:100, height:40, left:200, top:100 }
    ]
});

Now the task is to make the buttons draggable. For this, I will use webix.DragControl, the module for handling drag-n-drop events. To create a drag area, I will use the addDrag() method. In a simpler case, when you want to make some UI item draggable, you can use the method with the HTML node of the item as its parameter:

const view = $$("abs1");
webix.DragControl.addDrag(view.$view);

In this case, however, I want to make any UI item on AbsLayout draggable, so the solution is more complex. addDrag() receives extra parameters for controlling all the DnD stages. I will need these:

  • $dragCreate – a method that defines the start of dragging;
  • $dragPos – a method for positioning of the dragged item relative to the mouse pointer;
  • $dragDestroy – a method that defines what happens when the item is dropped.

By default, $dragCreate returns the HTML node of the item that is dragged. I need to return the node of the control on which the drag was initiated (i.e. where the pointer is when you press the mouse key to drag). $dragCreate receives two parameters, one of which is the mouse event from which we can get to the node of the Webix component with webix.$$(event). I will also ‘fix’ AbsLayout to prevent it from dragging:

$dragCreate:function(source, ev){
    const el = webix.$$(ev);
    if (el && el !== view){
        return el.$view;
    }
    return false;
}

Now the buttons vanish once they are dropped. The default behaviour is removing the dragged element from the drag area. I need to block this, so I will redefine $dragDestroy:

$dragDestroy:function(){
    return false;
}

By default, the dragged element is moved to the lower right of the pointer. I need to fix this, because if you try dragging the buttons now, it does not look good.

Webix Abslayout with DnD step 1

Live demo >>

DragControl has one more useful method getContext() that returns the context object of DnD. The context can store:

  • the ID of the target element (source),
  • the element from which it is dragged (from),
  • the offset between the pointer and the top-left corner of the top div of the dragged element (x_offset and y_offset).

First, I need to determine the position of the mouse pointer. There is a Webix helper for that, webix.html.pos(), it returns the object with coordinates. Next, I can calculate the offsets. Besides I need to set source and from – later I will use them to change the position of the button during dragging in $dragPos.

$dragCreate:function(source, ev){
    const el = webix.$$(ev);
    if (el && el !== view){
        var pos = webix.html.pos(ev);
        var context = webix.DragControl.getContext();
       
        context.source = [el.config.id];
        context.from = view;
        context.y_offset = el.config.top - pos.y;
        context.x_offset = el.config.left - pos.x;
       
        return el.$view;
    }
    return false;
}

Let’s redefine $dragPos. I will access the context object and adjust the position of the pointer, which is one of the parameters of $dragPos, and the position of the dragged button.

$dragPos:(pos) => {  
    var context =  webix.DragControl.getContext();
    let control = webix.$$(context.source[0]);

    control.config.left = pos.x + context.x_offset
    pos.x = control.config.left - webix.DragControl.left;
    control.config.top = pos.y+context.y_offset
    pos.y = control.config.top - webix.DragControl.top;
}

webix.DragControl stores the adjustments to the position (top and left) that are needed for correct drop of the element. In this case, I had to subtract them.

Finally, I will add a control to switch the demo between two modes: edit and read-only.

webix.ui({
    type:"space", rows:[
        { view:"checkbox", labelRight:"Allow drag-n-drop", id:"mode" },
        abslayout
    ]
});
...
$dragCreate:function(source, ev){
    if (!$$("mode").getValue()) return false;
    //...
}


View code >>

Saving and Restoring Positions

Let’s make the UI ‘reload-proof’: it will restore the positions of buttons.

I will create a new component on the base of AbsLayout. “s-abslayout” will have two methods for getting and setting the positions of buttons that can be used for saving and restoring the state of the UI.

webix.protoUI({
    name:"s-abslayout",
    //returns current positions of controls
    getState:function(){ },
    //sets positions of controls
    setState:function(obj){ }
},webix.ui.abslayout);

To get the state, I will go through all child views of AbsLayout with queryView() and save their coordinates:

getState:function(){
    var state = {};
    this.queryView(function(view){
        state[view.config.id] = {
            left:view.config.left,
            top:view.config.top
        };
    });
    return state;
}

setState() will accept an object returned by getState(), set the positions of buttons and repaint Abslayout:

setState:function(state){
    view.queryView(function(view){
        let id = view.config.id;
        if (state[id]) {
            view.config.left = state[id].left;
            view.config.top = state[id].top;
        }
    });
    view.resize();
}

I will also add a property that will serve as a flag to indicate whether the layout has been changed. I will later use it for saving state.

webix.protoUI({
    name:"s-abslayout",
    defaults:{
        changed:false
    },
    ...
});
...
webix.DragControl.addDrag(view.$view, {
    $dragDestroy:function(){
        view.config.changed = true;
        return false;
    },
    ...
});

I can use getState() and setState() to save the positions of all buttons when the page is reloaded. For that, I will handle the onDestruct event of AbsLayout. Positions will be put to the local storage (or the session storage to restore them after a user closes the browser).

// saving positions of buttons
view.attachEvent("onDestruct", function(){
    var changed = this.config.changed;
    if (changed){    
        const state = this.getState();
        webix.storage.local.put("state", state);
    }
});

When the page is reloaded, AbsLayout will take the positions from the storage.

const state = webix.storage.local.get("state");
if (state){
    view.setState(state);
}

Live demo >>

Adding New Elements to UI

Users should also be able to add new controls. I will add a button that creates a new view to AbsLayout. New controls are added with abslayout.addView():

webix.ui({
    type:"space", rows:[
        {
            cols:[
                { view:"checkbox", labelRight:"Allow drag-n-drop", id:"mode" },
                { view:"button", value:"Add New", width:100, click:addNew }
            ]
        },
        //abslayout...
    ]
});

function addNew(){
    view.addView({
        view:"text", placeholder:"New input...",
        top:50, left:50, width:130
    });
};


View code >>

If you reload the page, the newly added controls do not appear. I will redefine getState() to include newly added views:

getState:function(){
    let state = [];
    this.queryView(function(view){
        let config = view.config;
        state.push(config);
    });
    return state;
}

I will also change restoring. I will use webix.ui() to rebuild AbsLayout:

setState:function(state){
    webix.ui(state,this);
}

Live demo >>

Removing Elements from UI

It is time to enable controls removal. I will do this with drag-n-drop. I will create a drop area in the corner of AbsLayout and remove controls when they are dropped there.

First, I will add an icon in the corner. As the icon will not be removed or dragged around, I will place it in another layout.

{
    view:"abslayout", cells:[
        {
            relative:true, view:"s-abslayout", id:"abs1", cells:[
                {
                    view:"button", value:"Save",
                    width:100, height:40, left:100, top:100
                },
                {
                    view:"button", value:"Cancel",
                    width:100, height:40, left:200, top:100
                }
            ]
        },
        {
                view:"icon", icon:"trash", id:"trash",
                right:60, bottom:60, width:60, height:60,
                hidden:true, css:"trash"
        }
    ]
}

The icon will be shown only in the edit mode. I will use the mode checkbox to show and hide the trash:

const trash = $$("trash");
...
{
    view:"checkbox", labelRight:"Allow drag-n-drop", id:"mode",
    on:{
        onChange(newv){
            newv ? trash.show() : trash.hide();
        }
    }
}

Controls will be removed when they are dropped on the trash. I will define a function that will check if a control is dropped over trash. webix.html.offset() will return the coordinates and sizes of the compared views. The function will return true for all controls, the borders of which overlap the borders of trash.

function intersect(aview, bview){
    const a = webix.html.offset(aview.$view);
    const b = webix.html.offset(bview.$view);
    if (a.x < b.x+b.width && a.x+a.width > b.x)
        if (a.y < b.y+b.height && a.y+a.height > b.y)
            return true;
    return false;
}

Next, I will modify $dragDestroy. If intersect() returns true, a confirmation dialogue will open and wait for permission to remove the control.

$dragDestroy:function(){
    view.config.changed = true;

    var context = webix.DragControl.getContext();
    var control = webix.$$(context.source[0]);

    //borders of dragged control
    if (intersect($$("trash"),control)){
        webix.confirm("Are you sure?",function(res){
            if (res) view.removeView(context.source[0]);
        });
    }
    return false;
}

Everything works fine, and the last thing I would like to do is to highlight the controls with red when they are over the trash. For that, I will define a function that will add a CSS class to the control if it is dragged over trash:

function markErase(control, mode){
    if (intersect($$("trash"),control) && mode !== false)
        control.$view.classList.add("will_erase");
    else
        control.$view.classList.remove("will_erase");
}

markErase will add CSS in $dragPos:

$dragPos:(pos, ev) => {  
    var context =  webix.DragControl.getContext();
    let control = webix.$$(context.source[0]);

    control.config.left = pos.x + context.x_offset
    pos.x = control.config.left - webix.DragControl.left;
    control.config.top = pos.y+context.y_offset
    pos.y = control.config.top - webix.DragControl.top;
   
    markErase(control);
}

and remove it in $dragDestroy if a user doesn’t want to remove the control:

$dragDestroy:function(){
    view.config.changed = true;

    var context = webix.DragControl.getContext();
    var control = webix.$$(context.source[0]);
   
    //borders of dragged control
    if (intersect($$("trash"),control)){
        webix.confirm("Are you sure?",function(res){
            if (res) view.removeView(context.source[0]);
            else markErase(control, false);
        });
    }
    return false;
}


View code >>

Conclusion

With Webix, you can develop apps with dynamic layouts that can be built by users themselves. You can do this with AbsLayout and DnD functionality. The same technique is used in Form Builder, which can be used not only as a service, but also as a part of an app.

For more details about custom DnD, you can read documentation articles:

The post Creating Apps with Live UI Editing using Webix AbsLayout appeared first on Webix Blog.

Dashboards: Tips for Young (and Aspiring) App-Builders

$
0
0

Reading time: 3 minutes

More tips and tricks from Webix await you today! If you want to know more about building good-looking interfaces, read on. You will learn more about creating dashboards, turning simple widgets into something more sophisticated and developing with Webix Jet.

I also have a demo for you, so grab the sources from https://github.com/webix-hub/student-dashboard-demo.

Dashboards: Tips for Young (and Aspiring) App-Builders

Why Dashboard?

What makes dashboards a good choice for a layout? Dashboards allow collecting a lot of widgets on one page to keep an eye on the current state of affairs in a project, class, process state, station, online-shop, etc. All widgets can be rearranged and resized on the fly. You can create simple static dashboards for viewing data or dynamic dashboards with which users can interact.

Webix Jet dynamic dashboard in action

View code on GitHub >>

What Widgets to Choose?

Keep it simple! Take existing widgets and change them with custom templates according to your needs. For example, that good-looking panel on the left is a simple List, visually transformed with a bit of custom styling. And if you look at the table at the bottom, you will notice nice green progress bars. Webix does not have them out of the box, but you can create them and use in any component:

template: data => (
    "<svg viewBox='0 0 140 50'><rect y='20' rx='5' ry='5' width='140' height='11' style='fill:#ccc;' />"
    +"<rect y='20' rx='5' ry='5' width='"+data.compl*1.4+"' height='11' style='fill:#aaa;' />"
    +"<rect y='20' rx='5' ry='5' width='"+data.achiev*1.4+"' height='11' style='fill:#37bc98;' />"
    +"Sorry, your browser does not support inline SVG."
    +"</svg>"
)

View code >>

Webix provides various charts that can be useful in a dashboard. If you feel that you need more, you can build your own complex widgets from existing ones. For example, look at the colorful panel on the right:

Webix Jet dashboard panel with bullet graphs

These are Bullet graphs grouped in a form. Yes, even charts can be put in a form and be treated as form controls:

{
    view:"form",
    localId:"bullets",
    type:"clean",
    padding:10,
    rows:this.bullets()
}

let values = {
    "English":47,"Arts":56,"Maths":56,
    "Geography":66,"Literature":52,"History":55
};
this.$$("bullets").setValues(values);

View code >>

Engines that Power Interaction and Data Loading

The dashboard was developed using Webix Jet, and this choice was made for a reason. Webix Jet has certain benefits. All widgets are in separate files, which makes development flexible. You can replace a widget without changing anything in the rest of the app. Same goes for changes in the data loading logic. As it is separated from the UI, you have to change the data file, and all widgets that use it will be up to date.

Let’s look under the hood and see how it works in the dashboard.

Custom events can be used to bind together widgets. For example, this is how an event is dispatched in one widget:

on:{
    onAfterSelect: id => {
        this.app.callEvent("student:select",[id]); 
    }
}

Now any part of the dashboard can listen to the event and do something in response:

init(){
    this.on(this.app,"student:select", id => {
        // do something
    });
}

For common functionality such as loading and updating data, showing tooltips, redrawing chart legends, use custom view methods. For example, in the dashboard you can see tooltips with additional info if you point at ‘question’ isons in the corner of every panel. How many tooltips are there in total?

Only one, shown with different text over different panels. This is a tooltip view with a custom method:

class TooltipView extends JetView {
    config(){
        return {
            view:"tooltip",
            template:"#value#"
        };
    }
    showTooltip(tp,pos){
        const tooltips = [
            {"id":1,"value":"Tip 1"},
            {"id":2,"value":"Tip 2"},
            {"id":3,"value":"Tip 3"},
            ...
        ];
        this.getRoot().show(tooltips[tp],pos);
    }
}

You can use this class to show tooltips in the dashboard:

init(view){
    this.tooltip = this.ui(TooltipView);
    let questions = view.$view.querySelectorAll(".question");
    for (let i = 0; i < questions.length; i++){
        webix.event(questions[i],"mouseover", e => {
            this.tooltip.showTooltip(i, webix.html.pos(e));
        });
    }
}

Hometask

Just kidding.

I hope the tips I shared with you will help you more than once and inspire good solutions for your tasks. Feel free to use the demo in your projects all you like.

You are also welcome to share your thoughts and advice on building UIs with Webix in the comments below. Drop us a line about today’s tips, your developing experience, to ask a question or just to say ‘Hi’.

The post Dashboards: Tips for Young (and Aspiring) App-Builders appeared first on Webix Blog.

Major Webix Release 6.0 with New Skin and Custom Packages

$
0
0

The long-awaited day has come: Webix 6.0 is here. And it hasn’t arrived quietly, so fasten your seatbelts and prepare for most dramatic changes. Webix now has a new default material skin. You can build your own Webix pack only with the widgets you need.

Read on to find out what awesome updates await you and how to integrate them.

Major Webix Release 6.0 with New Skin and Custom Packages

New Material Skin

Now you will be able to create applications with the new default material skin and its compact version. And oh boy it is awesome!

Webix new material skin

These are the flashiest features of the new skin:

  • light modern theme

Webix new material skin light

  • true material spirit

Webix new material skin true spirit

  • material design icons (optional)

Webix new material skin mdi icons

Webix new material skin dark and shadowy widgets

To see the new skin in action, check out the adorable new demos. By the way, they have been created with Webix Jet and the source code is available on GitHub.

The Fate of Other Skins

If you are not yet ready to appreciate the new look of Webix and would rather stick to the blue classics, don’t worry. The Flat skin is still there in the pack, and you can include it as:

<link href="../codebase/skins/flat.css" rel="stylesheet" type="text/css">

The pack now includes the following skins:

  • Material (default)
  • Mini (the compact version of the Material skin)
  • Flat
  • Compact (the compact version of the Flat skin)
  • Contrast

It is time to move on and say goodbye to some of the other outdated skins, including the old material.

Icons in New Webix

To minimize the overall size of Webix, the pack includes only those icons, that are used in widgets. If you need extra icons that are not included, you can use Material Design, Font Awesome or any other set of icons. You can read about them in our documentation.

Custom Package

Starting from version 6.0, the package includes full sources and the building toolchain. It provides the ability to customize the package – you can remove unnecessary widgets or features (and decrease the package size) as well as apply your own low-level modifications to the Webix codebase.

Third-party Components Integrations Updated

Webix integration with third-party components has been updated to the latest versions of components. The usage was simplified as well, now you need to include only the file of related component without any extra configuration. By default, all the open source components are loaded either from the official CDN or the global cdnjs. Go to the documentation for details.

SpreadSheet Updates

SpreadSheet also received some interface updates:

  • you can add comments to cells;
  • additional buttons for changing the number of digits after the floating point;
  • the ability to set the decimal delimiter of numbers for copy/paste operations between Excel and SpreadSheet.

Get, Set, Go

As always, there are a number of other minor updates and bug fixes, the full list of which you can find in the documentation. Feeling all eager to try the new Webix? Update to the latest version or get the Free Trial!

Download Webix 6.0

The post Major Webix Release 6.0 with New Skin and Custom Packages appeared first on Webix Blog.

Webix 6.0 and Icons: Painless Transition

$
0
0

It’s been about three weeks since our latest Webix release. We are very happy to have received so much feedback from our users. Among messages and comments there are questions concerning migration to Webix 6.0, and one of the popular issues is still the “Where have all the icons gone?” question. That is why I decided to deal with this issue individually and share the salvation guide.

Webix 6.0 and Icons: Painless Transition

They Just Disappeared

It must be quite disastrous to update your projects to the latest version and suddenly realise that some buttons have disappeared. Our team faced the same problem when it came to maintaining old samples and demos. Looks truly buggy if you don’t know why this has happened.

View demo >>

Why All the Trouble with Icons

Font Awesome icons are no longer bundled as a part of the pack. The benefits for this are significant:

  • now you can choose any icon set you want, while before Webix 6.0 you had to use some specific version of Font Awesome, which was not always the latest one;
  • the size of Webix package is reduced as by default it has only those icons that are used by widgets.

If you were using custom icons syntax which was introduced in Webix 5.3, well… I am very sorry, but we have discarded webix_skin_icon as well, because it wasn’t sufficient for all the problems.

Icons, Come Back!

However frightening the result seems to look, the solution is very simple and includes options depending on what you want.

Return Font Awesome Icons

If you are quite happy with the Font Awesome icon set and just want all the icons back, follow these steps:

  1. Include the Font Awesome stylesheet into your html page:
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.10/css/all.css?v=6.0.7" integrity="sha384-+d0P83n9kaQMCwj8F4RJB66tzIwOKmrdb46+porD/OvrJ+37WqIM7UoBtwHO6Nlg" crossorigin="anonymous">
  1. Find all icons in your code and add fas fa- to their names (or far fa- and any other available prefix).

Have a look, I’ve done the same with the demo and it works.

Webix with Font Awesome Icons

View code >>

Use Material Design Icons

If all this time you didn’t really like Font Awesome and were dreaming about the support of other icons, e.g. Material design, follow these steps:

  1. Include the Material Design Icons stylesheet into your html page:
<link rel="stylesheet" type="text/css" href="//cdn.materialdesignicons.com/2.7.94/css/materialdesignicons.css">
  1. Find all icons in your code and add mdi mdi- to their names. If the icons are still missing somewhere, make sure the name exists in the set.

Here is how the demo looks with this icon set.

Webix with Material design icons

View code >>

Just Do It

So, guys, the problem of disappearing icons is solved and all of you can enjoy new Webix without experiencing the shock of finding out that there are no icons. We are very sympathetic with you and are very sorry for the mess that the breaking change with icons has caused. This was the optimal answer to the fact that you may need to use different icon sets, and the change was not in vain.

There is also the article about icons in our docs, which you can visit for a more detailed instruction.

What’s Next

If you are done with the icons, please consider another breaking change that is not so obvious. The source JS files have been renamed, and if you don’t do anything about it, your production app will load the bigger JS file with all the debugging stuff like ominous error popups and warnings.

Follow these steps:

  • in all your production apps, use webix.min.js instead of webix.js;
  • during development, you can use any file, while we recommend to use webix.js.

To learn how to work with the debugging version, read this article in our blog.

The post Webix 6.0 and Icons: Painless Transition appeared first on Webix Blog.

Webix 6.1 Release Overview: New Comments Widget, Updated Kanban and All Skins Support for Complex Widgets

$
0
0

Webix team brings good news that will warm you during cold autumn days. Webix 6.1 presents a new widget for adding comments, the updated Kanban and ultimate skin support for complex widgets. Read on to find out more.

Webix 6.1 Release Overview: New Comments Widget, Updated Kanban and All Skins Support for Complex Widgets

New Comments Widget

Bring your end-users closer to each other with a new Comments widget. Comments will help working teams discuss tasks directly in the app by exchanging comments.

Webix 6.1 new Comments widget

You can use Comments as an addition for project management apps, e.g. Kanban boards, for online spreadsheets, and for any other apps where a team discussion is relevant. You can also use it to create team chats.

Webix 6.1 new Comments widget in Spreadsheet

Major Updates for Kanban

We breathed a new life into Kanban. Now you can use it as a fully featured task-management app straight out of the box. Kanban can boast the following features:

  • modern styling

Webix 6.1 Kanban new design with headers

  • a popup card editor for complete control over the tasks: you can change text, tags, statuses, assign tasks and and even attach files

Webix 6.1 Kanban editor

  • ability to add comments

Webix 6.1 Kanban with comments

  • card action menu for most common actions

Webix 6.1 Kanban with card action menus

  • a quick way to assign tasks with the help of a dropdown list

Webix 6.1 Kanban with user list

Skins Support for Complex Widgets

The long-awaited day has come: now all complex widgets fully support all the existing skins.

Webix 6.1 Spreadsheet with Contrast skin

Node JS for All Samples in Package

Now you can launch server samples without having to deploy a PHP server. Run the following commands:

npm run install
npm run server

PHP samples are still there in the 40_server/01_php folder in the package.

You can view the complete list of updates and bug fixes on the What’s new page in the documentation.

Winter is Coming

Or maybe summer, if you are from the other side of the planet. Still, we continue working to make development more and more convenient for you, so any kind of feedback is welcome. You can upgrade your package with npm or in the Client Area and download the free trial. Until next time!

Download Webix 6.1

The post Webix 6.1 Release Overview: New Comments Widget, Updated Kanban and All Skins Support for Complex Widgets appeared first on Webix Blog.


Farewell to the Old Year, Farewell to the Old Code: Looking Forward to 7.0

$
0
0

Should auld acquaintance be forgot, and never brought to mind? If this is about old code, it definitely should. Old stuff, however useful and cool it used to be, should be left to rest in peace when it becomes no longer relevant. The time has almost come. With the next large release of Webix 7.0, which will happen in the following September, we will remove outdated and seldom used API from the library. Do not worry, because these are really old-fashioned things. There are modern alternative solutions, and the old ones will still be available on GitHub. You will find the details below.

Webix 7.0 Deprecated API

No Support for Old IE Versions

Starting from 7.0, Webix will support IE11 and later versions. IE8-IE10 will not be supported anymore. Alas. If IE8 support is crucial for you, use Webix 6. We plan to backport critical fixes to the Webix 6 branch, but there will be no new features there.

Deprecated Modules

ActiveContent

The ActiveContent mixin is useful for the simplest controls and is not designed for something more complex. From now on, we stronger than ever recommend stable solutions for simple things – HTML templates for simple icons, buttons, and the like, while for complex views you can use DataLayout.

Deprecated Proxies

Offline Proxies (offline, local, cache)

Modern browsers have a native technology that deals with the same task better – Service Workers. They can be easily used with Webix widgets, so we will share a solution later on.

webix.proxy.connector

Connectors are no longer relevant, because:

  • it is much better to have a REST based solution, because they are flexible and are 100% to your requirements;
  • connector is a third-party library and has not been updated for 5 years.

webix.proxy.faye

Though the Faye project is very much alive, it is not mainstream anymore. A WebSocket-based alternative will be much better, and later we will show you how to create one.

webix.proxy.indexdb

The indexdb proxy is not among the most popular solutions, that is why it will be moved out of Webix. Anyone who needs it will be able to take it from GitHub and include it as a plugin.

Flash Upload Driver for the Uploader

Flash driver for Uploader is needed for the old IE browsers only and therefore will be deprecated.

Deprecated API

Markup – Initialization from XML and HTML

We decided to move the markup class outside the core, because JSON has become a de facto standard, and initializing UIs from XML/HTML is used in very rare cases. If you are one of those who do use markup, beginning from the next September you will have the complete power to change the functionality in any way after you get it from GitHub.

webix.history API

webix.history is a specific, Tabbar-related technique that does not cover the related task. There are the window.history API and events that you can use instead.

webix.jsonp()

webix.jsonp() is a rarely used Webix solution for the JSONP method. The fact that it is among the API that will be moved to GitHub gives you more freedom to modify it to any degree or create your own solution altogether.

webix.ui.each API

This method does the same thing as view.queryView, so we decided in favor of the latter.

View code >>

webix.ui.delay()

This is probably the least known piece of the API that survived from the older Webix versions. Please note that it is not webix.delay that will be banished from the library core.

webix.ui.hasMethod()

This is the method that checks if the abstract view class has a certain method, which is not commonly used, because you would rather check this for some existing view. This is easily done with a simple check: if (view.someMethod).

What’s Next

Though this will happen only in September, which is about 9 months away, don’t just leave the news till later 🙂 We are very sorry for all the inconveniences that may arise and very strongly advise you to start preparing for the changes now. When September comes, you will upgrade to Webix 7.0 and continue maintaining your projects without stress and panic.

Meanwhile we will be gradually marking all the API from the above list as “soon to be deprecated” in our documentation.

The post Farewell to the Old Year, Farewell to the Old Code: Looking Forward to 7.0 appeared first on Webix Blog.

Software development time saving practices: Gantt charts for project management and UI libraries

$
0
0

Managing a project in software development is a challenging task: there are always lots of issues to face, team members who need to be controlled, deadlines that should be met in a timely manner, and tons of critical details that affect the whole project development. In this environment, time-saving practices take the stage and play a critical role: the better you master them, the higher the chances to successfully complete a project.

Gantt charts in project management

One of the best ways to get full control over the entire project and save time is to visualize it on a timeline. Gantt charts make this visualization appealing as they consist of two axes – vertical and horizontal ones. The first one is designed for tasks. The second one serves as a place for time frames. As a result, in a few clicks, you can create a task that looks like a bar and defines a start and end dates.

This is the typical Gantt chart view that you will find in an online Gantt chart software.

However, most of the planning tools based on Gantt charts offer far more project management related opportunities than just task management and scheduling. Let’s figure out how a software development team can benefit from them and consequently, save time. For sure, you need to make your own research to choose the Gantt chart tool that works best for your needs.

1. Progress tracking

One of the most critical issues is monitoring the progress of each task and the entire project. As a rule, the progress is shown in percents and can be dependent on tasks’ statuses: whether they are in progress now, done or closed.

While working with the progress, just be sure that each employee or team member manually changes the values. All other calculations are made automatically.

2. Deadline management

Deadlines should be met. Period. If you fail to fulfill tasks in the specified period, it will affect the whole project taking extra efforts and time.
A robust Gantt chart creator is able to make this process painless. Once a deadline is set for a task, it will get a clear visualization on a timeline. Moreover, such software can send you reminders and keep you updated about deadlines.

3. Team collaboration

Gantt chart makers allow teams to manage tasks and fully collaborate on them. Basically, this collaboration implies comments, attachments, and notifications.
For example, if you created, say, the “QA test” task in your project, you are able to provide all the details for it right in the tool and in the task window. There is no need to switch between messengers, emails, conversations, and threads and waste time.

4. Resource management

Surprisingly but there are still Gantt chart creators that do not offer resource management. However, in 2019 no powerful project planning tool will be effective without it.
Thanks to the resource management feature, managers can allocate their resources. At a glance, they can see who is working on what and how much time each task takes. Also, it allows forecasting and avoiding risks that can lead your project the wrong way and in the end, waste tons of your time.
The market offers plenty of Gantt chart solutions. They differ in their features. However, these components are typical of most robust tools.
That should be clear about project management and Gantt charts. How can UI libraries speed up software development processes?

 

UI libraries for facilitating software development

A spectacular user interface is a crucial component of any successful application. UI libraries don’t only help create appealing UIs, but also accelerate the whole development process.
UI libraries are time-saving champions when it comes to creating software solutions. Owing to them, you don’t have to reinvent the wheel writing code from the ground up every time.
Webix is more than just a UI library. It’s a JavaScript framework with sets of UI controls, layout widgets, and online tools as a Code Snippet, Skin Builder, Form Builder for JS developers. This framework was created by JavaScript experts 5 years ago and has been regularly updated since then.

Webix arms a development team with 99+ UI controls and widgets designed in accordance with the responsive web design best practices. Such a significant number of ready-made UI elements considerably speeds up the software development process. You can save up to 30% of the whole project time on the following tasks:

– Proving concepts and prototyping
– Front-end development
– Functional and usability testing

Bottom line

Alleviating resource management and progress tracking, forgetting about endless struggling in pursuit of meeting deadlines, having more time for improving and ironing out the wrinkles – these are the main advantages that Gantt charts and Webix library provide, to name a few. The solutions like these allow project managers and software developers use their working time more productively, focus on improving their apps, and make room for creativity.

The post Software development time saving practices: Gantt charts for project management and UI libraries appeared first on Webix Blog.

Christmas mood at Webix

$
0
0

Merry Christmas and Happy New Year! We wish you to share unforgettable holiday moments with your loved ones. May 2019 bring health, success, and well-being to you and your family! Check out an amusing postcard story in the post.

Seize the opportunity to add a little bit of winter magic to your life, and it will transform the world around you. Have a look at what the holiday spirit has done to Webix! 😃

The post Christmas mood at Webix appeared first on Webix Blog.

Meet Webix 5.3 with Updated Spreadsheet and Webix Jet 1.5

$
0
0

Spring work is going on with joyful enthusiasm, and the Webix team introduces updates for the UI library and for Webix Jet micro framework. Spreadsheet has been given a number of usability upgrades, and documentation is now supplied with links to live snippets. You can also choose any icon font for Webix skins, including Material design icons and Font Awesome 5. Read further to find out details about the release.

Webix 5.3 with Webix Jet 1.5

Webix Jet 1.5

Version 1.5 includes a lot of useful features for the development of large and huge applications:

1. You can compile Jet apps as app modules or standalone bundles and include them into other Webix Jet apps or directly into the page. This feature is especially useful for developing large apps, as it allows dividing applications into separate modules that can be developed and tested independently.

2. You can wrap Jet apps into Webix components and use them on a page as ordinary Webix widgets.

Webix Jet apps as Webix widgets

You can also add Jet views into dynamic Webix UI layouts. Include Jet views as panels on Dashboard, nest them as Datatable subviews and add them as new elements in Layout, Tabview, Multiview, Carousel, and other layouts with the common addView() method.

Webix Jet 1.5 Jet views as Webix widgets

Usability Enhancements of Webix SpreadSheet

SpreadSheet has extra hotkeys like Ctrl+A and backspace. The handling of copy/cut/paste operations for formulas has become more precise, and undo operations with Ctrl+Z are now more stable.

Conditional formatting has become more convenient and includes the new “not equal” operator. Values for conditions can be taken directly from cells (=A2, =C3) and can be added by clicking on cells.

Webix 5.3 Spreadsheet conditional formatting

You can use the new ‘Clear’ submenu for clearing values, styles, conditional formats, or filters.

Webix 5.3 Spreadsheet styling and clear all

For more details about SpreadSheet enhancements, visit the What’s new page.

Snippets in Documentation

Since March, apart from viewing widget samples in the documentation, you can conveniently view and change their code in the Snippet tool. All code samples are available both as snippets and in the Samples folder.

Selecting Different Icon Packs for Webix

In reply to feedback from our customers, we have decided to add the ability to choose icon packs. Now you can include Material design icons, Font Awesome v5 icons or any other icon font in Webix skins. This is only the first step, so stay tuned for improvements and updates.

For details about other updates and bug fixes, visit our What’s new page.

What’s Next

Webix team looks forward to the summer with enthusiasm and has more plans and projects that will come true with the next release. Meanwhile, you can upgrade your library via npm and Client Area or download a free trial and fully appreciate Webix 5.3.

Download Webix 5.3

The post Meet Webix 5.3 with Updated Spreadsheet and Webix Jet 1.5 appeared first on Webix Blog.

Webix 2018 follow-up

$
0
0

The New Year has come! It was a pleasure for us to share a lot of good news with you in 2018. We will continue doing our best to keep you informed. Let’s recall the most compelling and useful articles of the past year.

Webix highlights

• Hooray! Webix UI library has been named one of the best web design and development tools of the year by the readers of Visual Studio Magazine!
• Don’t miss the big news about Webix 7.0. Get ready to say farewell to the old API.
Webix 6.1 Release Overview: New Comments Widget, Updated Kanban and All Skins Support for Complex Widgets.
• Get familiar with the major Webix Release 6.0: New Skin and Custom Packages.

Webix workshop

Learn how Webix UI library allows creating Salesforce components to improve user experience.
• You updated Webix to the latest version, and some icons disappeared. Go to this article to get back what’s missing.
• Webix can help you create convenient dashboards. The examples and tips are here.
• Meet the guidelines for developing web solutions with dynamic user interfaces.
• Learn how to create cascading combo boxes using Webix elements.
• How to use Webix Jet with TypeScript? Read the tips here.
• Explore the evolution of Webix Jet! Follow this link and check out the overview of all versions of our microframework.

The post Webix 2018 follow-up appeared first on Webix Blog.

Viewing all 246 articles
Browse latest View live