pageboard / client

Web site building system - client packages
MIT License
4 stars 0 forks source link

clarify confusion between block.data.action.parameters and block.expr in fetch/api_form #111

Open kapouer opened 4 years ago

kapouer commented 4 years ago

The fetch and api_form elements (coupled with query/form api) are a powerful way to configure api read/write, because their data.action.parameters allows ($query, $user)-dependent api calls.

The block.expr configuration, on the other hand, allows merging a fetch's response into template blocks - it distinguishes the template blocks'data static, value-typed, configuration, from blocks'expr, mergeable, object-typed (all values can be strings) response-dependent configuration. It also allows to merge expr using corresponding value from data like [$default]?id=[$item.id].

Currently, the same tool (the semafor expr mode) is used to declare:

The problem is that the semafor expr mode is applied to all the data of the fetch/api_form schema, while it is actually meant to adapt only the service part (data.action.parameters, which depends on the value of data.action.method).

So it is quite simple to fix this: