Proposal - New UIO API

Proposal - New UIO API

This page is NOT documentation of the UI Options API. It is a working document. The UI Options API is currently undergoing revision, and there is no API documentation as yet.

 

This page presents a proposal for a new API for User Interface Options. It lays out what we would like to expect of an integrator.

Guiding Principles

  • A schema exists to define the settings, their defaults, ranges, etc.

  • Any options that might be set should be top-level.

    • Option names should make sense.

  • Integrators should not have to create both a page enhancer and the fat panel individually; If they want the fat panel, the page enhancer would be assumed and should be instantiated on the page automatically.

  • Integrators should be able to create a page enhancer without UIO (in the case of a full-page UIO available elsewhere, through a link).

The options shown here represent the minimal options that an integrator would have to provide. Other options will also be available.

Basic API

If no grade names are specified, the default state of the components would be no panels, no settings. It's unlikely anyone would ever use it without grade names.

Use Case: 2nd Parties (Infusion-provided "starter-set" of panels and settings)

Add the "starter-set" of panels and settings included in Infusion using the starter grades.

Use Case: 3rd Parties Adding Panels To The Starter Set

Note: 3rd parties will have to define their own grades for new settings, panels, enactors.

Note: All further examples will only use the "UIO + Page Enhancer" version: fluid.uiOptionsPlusPageEnhancer(). The pattern holds.

Alternatively, the extra grades could be added using demands:

Use Case: 3rd Parties Wanting A Subset Of The Starter Set

There are three possible ways to do this:

  1. Cut-and-paste: Copy the code that defines the "starter" grades, rename the grades, delete the parts you don't want, and use these new grades instead of the starter grades (not really recommended).

  2. Empty subcomponents: Use the starter grades and override the excluded subcomponents with fluid.emptySubcomponent

  3. Individual grades: Use the individual settings grades desired instead of the starter set.

The last two of these methods will be shown here, excluding the colour-and-contrast setting and the layout setting.

Use Case: 4th Parties (users of customized UIOs)