atk4/ui
Agile UI (atk4/ui) is a server-side rendered PHP UI framework with 50+ reusable components for building admin/back-office web apps fast. Connects to abstract data models (SQL/NoSQL/APIs), auto-adapts to schema changes, and supports interactive JS events and Vue.js extensibility.
Form::setModel() method to Form::setEntity() (#2239) @mvorisekint type for ID for View::setSource() when the data is list (#2238) @mvorisekText (#2043) @mvorisekbigint DBAL type for ID fields by default (#2208) @mvorisek$class param from View constructor (#1791) @mvorisek$class param from View constructor (#1791) @mvorisekinteractive/popup.php cart demo (#1793) @mvorisekfloat and atk4_money DBAL types (#1703) @mkrecek234This release brings a lot of focus code-sense and hinting. If you are using modern PHP IDE, you will feel benefit of autocompletion almost everywhere.
The hintable support is another major game changer in sense of cleaness and maintainability. Annotate model fields and used them magically as a real properties.
Usage add Model class phpdoc:
/**
* [@property](https://github.com/property) string $name [@Atk4](https://github.com/Atk4)\Field()
* [@property](https://github.com/property) int $age [@Atk4](https://github.com/Atk4)\Field()
* [@property](https://github.com/property) Standard $mother [@Atk4](https://github.com/Atk4)\RefOne()
*/
class X extends Model
{ ...
Use the properties either as standard value property:
$model->age // instead of $model->get('age')
$model->age = 25 // instead of $model->set('age', 25)
You will also notice that adding fields in examples is using a different syntax:
$this->addField($this->fieldName()->age); // instead of addField('age');
FC for NS case update II.
FC for NS case update
Fix versioning
Fix dependencies and versioning
Please see 2.1 release announcement here: https://forum.agiletoolkit.org/t/atk-ui-2-1-release/834
Revert breaking namespace-related commit
The change in the namespace use didn't go that well, so we reverted it from 1.7.1 (revert https://github.com/atk4/ui/pull/702)
In 1.7 we now rely on VueJS for new components and the first component to make use of VieJS is the MultiLine edit.
$f = $app->add('Form');
// Add multiline field and set model.
$ml = $f->addField('ml', ['MultiLine', 'options' => ['color' => 'blue']]);
$ml->setModel($inventory);
For more information see demos/multiline.php.
Also we continue to improve documentaiton and work on bugs. Full list of changes below:
Closed issues:
Merged pull requests:
Closed issues:
Merged pull requests:
Merged pull requests:
Closed issues:
Merged pull requests:
Closed issues:
Merged pull requests:
Adding new form layouts, toast and switching to selenium for UI tests. Fixed readonly fields, added many tests and upgraded Fomantic-UI version.
Closed issues:
Merged pull requests:
Our 1.6 release signifies a switch from a stale Semantic UI CSS framework to a community-supported Fomantic UI fork, version 2.6.2. Calendar widget is now supported natively, various other issues are addressed but, more importantly, Fomantic UI is open for collaboration. We are working with their core maintainers hammy2899, prudho and ColinFrick to implement new modern UI features.
Also now have ability to resize any table, Grid or CRUD:
// Enable reizable columns on the table
$table->resizableColumn();
// Also supports custom callaback (on-resize) and ability to pre-set the width:
$table->resizableColumn(function($j, $w){
$columnWidths = json_decode($w);
// store widths somewhere
return;
}, [200,300,100,100,100]); // default widths
[$table->resizableColumns();](https://agile-ui.readthedocs.io/en/latest/table.html?highlight=table#resizable-columns)
// For Grid or CRUD:
$crud->table->resizableColumn
We also introducing a somewhat experemental "Lookup" field. It is identical to AutoComplete and can work as a stand-in replacement, but supports "filters". For now we are looking for ways to make this field more compact before it becomes part of AutoComplete.
$form = $app->add(new \atk4\ui\Form(['segment']));
$form->add(['Label', 'Add city', 'top attached'], 'AboveFields');
$l = $form->addField('city',['Lookup']);
// will restraint possible city value in droddown base on country and/or language.
$l->addFilter('country', 'Country');
$l->addFilter('language', 'Lang');
//make sure country and language belong to your model.
$l->setModel(new City($db));
Closed issues:
Merged pull requests:
How can I help you explore Laravel packages today?