Skip to content
Romans Malinovskis edited this page Dec 19, 2016 · 8 revisions

HI.

I have created this document to list all your possible scenarios for the UI framework. Please contribute by adding your own scenario with

> should feed my cat

and I'll comment and schedule the feature to my development cycle.

Forms

translations

Labels should be translatable.

Forms read caption from field->caption property and pass it through $app->localize($label);

I guess the language of names of values in select lists/checkboxes is out-of-scope for your project?

Either field->setModel() to populate from the database or it will be done automatically if form is bound with a model. Developer can adjust $title to a different field based on $app->language setting.

Layout

Form blocks (or fieldsets)

Form can contain multiple models and when saved all the individual models will be saved. It should be possible to also create relations, for instance create "user" and his first "order" in the same form.

Form should be able to arrange fields into 2 columns automatically

Multi-record entry

I need to be able to create multiple records through repeating sets of fields

possibly a different view, other than form that still relies on fields. This can also be a mix between Grid, instead of read-only values, the values will be inserted.

Allow dragging records up/down, store order

Should be possible for read-only and editable rows. I think we should make it possible for Lister to contain fields on per-record basis capable of submitting.

A single repeating set of fields may be removed

A chosen value in one select list/checkboxes may filter/alter values in a different select list/checkboxes

i was planning to implement this with dynamic field reload, e.g. f1.onChange - reload f2 with relevant values. If someone want to do filtering in java-script that could be done through a different approach.

A select list/checkbox may trigger state change somewhere else, like checking box "A" hides all fields Y, also when Y is in a repeating set of fields. Adding a new set with field Y, must know that A is checked and also hide Y in the new form set. States may be hidden, mandatory... probably more... refresh maybe, to handle filter/alter values above.

I have been looking for various javascript libraries that handle field hide/show/disable logic. I previously had a handy javascript routine, but tehre should be something better out there. I'll keep looking but i agree this must be implemented.

Embed arbitratry forms within other forms with a combined save button.

agreed. especially if they are across multiple tabs. Only one

would be added that wraps everything. Not sure how deep i want to go with default functionality, but it will be extendable.

Checkbox tables: rows and columns are text, checkboxes in every cell to create pairs/coordinates.

my current plan on checkbox tables is to have form someplace else and pass on selection on the table as a hidden field. Perhaps table itself could do some interaction but that wouldn't be through a form. Alternatively one should be able to add table into a form and add fields as a part of render routine.

I don't use this, but some people really like multistep forms.

for this i've planned to store form data inside session persistence and when all the steps are completed, then data would be collected and stored inside datbase. This way we can avoid JS magic. It should be doable with JS also.

Layouts

Layouts can be built from top-down or from bottom-up.

Implemented through delayed init().

CSS Frameworks

Should be possible to use with Bootstrap CSS (even if some features wouldn't work)

Will have to find a way how this is doable.

Quotes from Drupal

Learning more about Vue components, it is getting clearer to me what we are missing / what is hard for our theme system:

  • Input validation and definition of required vs. optional things
  • Default values
  • A clear definition of data flow and data dependencies

https://github.com/basic-web-components/basic-web-components/

https://vuejs.org/v2/guide/components.html#Scoped-Slots