I'm proposing that we formalize a list of fields that can be stored in Volto blocks and they'd be automatically transformed server-side, or have other positive benefits.
For example: block values could have a field called "searchableText". Filling in the value of this field would be done in the Block code, client-side. Then, on the server side, a block text indexer doesn't have to be created for all new block types, the existing block indexer could generically look for this field in the block value.
The same, any "url" field would be transformed through "resolveuid" (and this was already implemented in this PR: plone/plone.restapi#870 ). (Sorry @cekk , now I see the light).
So, the idea is: ok, let's have this smart behavior in block values, but we should document it and block authors need to be aware that naming a block field value will have side-effects.
I'm proposing that we formalize a list of fields that can be stored in Volto blocks and they'd be automatically transformed server-side, or have other positive benefits.
For example: block values could have a field called "searchableText". Filling in the value of this field would be done in the Block code, client-side. Then, on the server side, a block text indexer doesn't have to be created for all new block types, the existing block indexer could generically look for this field in the block value.
The same, any "url" field would be transformed through "resolveuid" (and this was already implemented in this PR: plone/plone.restapi#870 ). (Sorry @cekk , now I see the light).
So, the idea is: ok, let's have this smart behavior in block values, but we should document it and block authors need to be aware that naming a block field value will have side-effects.