Skip to content

1.3.0

Compare
Choose a tag to compare
@romaninsh romaninsh released this 08 Nov 01:49
· 2889 commits to develop since this release

This version is focused on dynamic interaction between the browser and your PHP apps. It contains 3
new Components and 3 new Actions and a new Form Field Decorator.

Loader (#246, #250) is a component that calls itself back to load its content. While the content is being generated, your user will see a spinner animation:

$loader = $app->add('Loader');

$loader->set(function($p) {
    sleep(2);  // or any other slow-loading code.
    $p->add('LoremIpsum');
});

There are also ways to trigger and reload the contents as well as passing some arguments in. We include 2
demos for the loader: basic loader demo and
practical use example. For additional information,
look into Loader Documentation

Next we thought - why not also load content dynamically inside a Modal dialog, so we added this:

$modal = $app->add(['Modal', 'title' => 'Lorem Ipsum load dynamically']);

$modal->set(function ($p) {
    sleep(2);  // or any other slow-loading code.
    $p->add('LoremIpsum');
});

Code is very consistent with the Loader or dynamic definition of Tabs but would open in a modal window. However we wanted to go even further.

What if it would take several seconds for content to load? We used Server-Sent-Events for streaming updates from your PHP code in real-time (#258 #259). Yet it's just as simple to use as anything else in Agile UI:

// see SSE demo for $bar implementation

$button->on('click', $sse->set(function () use ($sse, $bar) {

    sleep(0.5);
    $sse->send($bar->js()->progress(['percent' => 40]));
    sleep(2);
    $sse->send($bar->js()->progress(['percent' => 80]));
    sleep(1);
    return $bar->js()->progress(['percent' => 100]);
}));

In the next release we will include 'ProgressBar' and 'Console' classes that rely on event streaming.

Other additions include:

We also added AutoComplete "Plus" mode. It's a button next to your AutoComplete field which you can click to add new element inside a referenced entity which will then be automatically filled-in. Super-useful!

Lastly - a lot of new documentation and minor fixes. #240 #244 #248 #256 #257

Our Test-suite now includes broser testing. #262 #263