orbeon / orbeon-forms

Orbeon Forms is an open source web forms solution. It includes an XForms engine, the Form Builder web-based form editor, and the Form Runner runtime.
http://www.orbeon.com/
GNU Lesser General Public License v2.1
514 stars 220 forks source link

Form Builder to support cumulative appearances #4370

Open avernet opened 4 years ago

avernet commented 4 years ago

A "cumulative" appearance is one implemented by an XBL component that in the view outputs the component itself without the appearance it handles, in addition to some "decoration around it". The character counter and autosize text area are exemples thereof.

This RFE calls for Form Builder to produce a checkbox for such appearance in the Control Settings dialog, so form authors can pick those appearances in addition to some other appearance. Components that support this will need to indicate they do explicitly in their descriptor.

+1 from customer

ebruchez commented 4 years ago

Comments we have for BindingDescriptor:

CSS selectors can be very complex but we only support a small subset of them for the purpose of binding controls to elements. Namely, we can bind:

  • by element name only
  • by element name and datatype (with the xxf:type() )
  • by element name and a single appearance attribute
  • by a single appearance attribute
  • by element name, a datatype, and a single appearance attribute

BindingDescriptor is a minimal CSS selector descriptor able to hold the combinations above. It can in fact hold more than that, such as:

  • binding by datatype only
  • binding via attributes which are not appearance

But those are not used or supported as of 2015-06-05.

ebruchez commented 4 years ago

See also:

ebruchez commented 4 years ago

For this issue (#4370), #333 and #2585 we don't appear to need the ability to bind to multiple appearances. If correct, that's good.

The control settings calls possibleAppearancesByControlNameAsXML(). This returns information about which appearances are available, a label, and icon.

We could add to that whether the appearance is "independent". But we need a way to specify that. Two options:

ebruchez commented 4 years ago

What would distinguish a "primary" appearance, like full, a secondary one, like xxf:horizontal, and a decorator, like character-counter?

Right now, we have:

fr|autosize-textarea,
xf|textarea[appearance ~= 'xxf:autosize']

and:

fr|character-counter,
xf|input[appearance ~= character-counter],
xf|textarea[appearance ~= character-counter],
xf|secret[appearance ~= character-counter],
fr|tinymce[appearance ~= character-counter]

In the second case, we are currently explicit as to which controls support it.

I was thinking that maybe we could use [appearance = foo] vs [appearance ~= foo], but I am not sure how much sense that makes.