I’m not sure what you mean. If you use style:table with a long text you need to scroll down a bit to edit the other fields. I think style:items is a better fit for long vertical fields.
Do I understand you correctly? Do you have another idea in mind?
I just added a screenshot of a “long” text. It pushes down the next row naturally.
It’s like any html table. It will try to squeeze the fields in as good as it can. Ten fields/columns is probably too much for style:table. The fields are listed directly in Engineer, without the entry layer (that the structure field uses).
It could be possible to add a new feature to make an overflow-x: scroll if it’s a common need, with many fields in one row. Then the table would be scrollable left/right.
I should have thought of that. I have now added a sentence that says that there are some extra fields in the style:items example. I wanted to show that style: items is better suited for many fields, because you can add grids like width: 1/2 etc.
I’ve started working on a new much bigger version, but in the meantime I release a minor version that just fixes some of the major bugs: https://github.com/jenstornell/field-engineer
Changelog
Fixed bug with th position
Fixed bug with table sort jumping
Fixed bug with checkboxes option: children
Fixed bug with textarea autosize after adding new item
Fixed bug frontend crasch. Only run plugin in the panel
What do you want to see first in the next release of the plugin?
Duplicate/clone field
Unlimited nesting
More than one kind of fieldset, just like the Kirby Builder
Switch to compact view (called entry in the structure field)
It already have html5 validation. If you for example use type: number and write letters, it will prevent you from saving and the browser will tooltip you on which field is wrong.
Is it html5 validation you mean, or is it javascript validation you have in mind?
Ahh, that’s a tricky one, because I run everything on the client side. Maybe I will figure something out, but I don’t think it will be the in the next version.
Docs - Separated field plugins that works “out of the box” from the “supported” ones.
Docs - Troubleshooting steps added.
Blueprint
The above example as blueprint. Be aware, you need to install the Hero field plugin for it to work because that field is used in the example this time.
It might be a nag to answer the question “Do you really want to delete this entry?”, but it’s much safer, especially for people with butterfingers. It’s especially important for the Engineer field because removing an item will remove every sub item as well.
I clicked an item and on the trash icon (that will hide on delete):
It’s much easier now when you have the visual preview of what will be deleted.
Tests
If engineer.debug is enabled in the config it will register a set of blueprints that can be used for debugging. For you as a user it can be used as a inspiration to get started. So far there is just one blueprint and it will list all fields. Be aware that it only works for Kirby 2.5.2 because of a bug.
Breaking changes
engineer.label.fallback is no longer available or needed.
width from the previous version has been changed to rowWidth to not collide with the native width.
From the changelog:
Feature - Delete warning message.
Feature - Delete area preview.
Breaking change - The width option for rows is renamed rowWidth instead. It will make it more future proof and prevent collisions with width on the root of the engineer field.
Breaking change - The option engineer.label.fallback is removed. No good reason for a label fallback.
Bug fixes - Minor issues.
Docs - Because of some recent Panel bugs I pushed the requirement to Kirby 2.5.2.
I was about to include support for the list field, but a last minute DOM bug with that field prevented me from support it with this release.
I’m getting the following error in the backend-panel:
Parse error: syntax error, unexpected 'default' (T_DEFAULT), expecting identifier (T_STRING) in *X*/site/plugins/field-engineer/lib/presentation-array.php on line 52
Kirby Version: 2.5.8
Blueprint-code:
title: Projekt
pages: false
options:
template: false
status: true
url: false
delete: true
preview: false
files:
type:
- image
- video
fields:
my_engineer:
type: engineer
fields:
first:
label: Text
type: text
second:
label: Image
type: image
This also happens if there’s no field-engineer-call in the blueprint-code.