API Changes from 2.0 to 3.0

This page contains a list of the features, APIs, and etc. that have changed in Infusion 3.0.

Framework Changes

Core Framework Changes

This section describes major APIs that were in common use. For information about less widely-used features removed in 3.0, consult Deprecations in 2.0.

Model Transformations

  • fluid.transforms.round can take in scale and method options for rounding numbers to a decimal value. Additionally, numbers round away from 0 (i.e 0.5 -> 1, -0.5 -> -1).
  • fluid.transforms.valueMapper takes an defaultInput option to provide the model data directly. This also provides a location for adding nested transformations.

Preferences Framework

Model Changes

Reset

By default, reset will only reset the preferences model path. Other model values will remain unchanged. If you'd like to also have these paths changed, add a listener to the beforeReset event to execute a fireChangeRequest for the model paths you need to reset. (See: ArrowScrolling.js)

listeners: {
    "beforeReset.resetPanelIndex": {
        listener: "{that}.applier.fireChangeRequest",
        args: {path: "panelIndex", value: 0, type: "ADD", source: "reset"}
    }
}
Model Paths

Any prefsEditor using the fluid.prefs.arrowScrolling grade, such as the one contained in fluid.prefs.separatedPanel, will contain the following new model paths.

Model Path Default Description
panelIndex 0 The index of the panel to scroll to in the small screen responsive view.
panelMaxIndex A number representing the index of the last panel The maximum index that panelIndex can take. It is calculated from the total number of panels present.

Panel Changes

The "Links and Buttons" adjusters and enactors are collapsed to a single preference called "Enhance Links".

Selectors

All panels must supply a header selector, which will be used by the fluid.prefs.arrowScrolling grade to provide the clickable arrows for navigating between adjusters in the small screen responsive view.

Message Bundle Keys
Additions
  • enhanceInputs.json
    • "label"
    • "description"
    • "switchOn"
    • "switchOff"
  • speak.json
    • "switchOn"
    • "switchOff"
  • tableOfContents.json
    • "switchOn"
    • "switchOff"
Removals
  • inputsLarger.json
  • emphasizeLinks.json
  • linksControls.json
Changes
Message Bundle In 3.0.0 In 2.0.0
speak.json "label" "speakLabel"
"description" "speakDescr"
tableOfContents.json "label" "tocLabel"
"description" "tocDescr"