First Discovery Editor
Overview
Component Name: gpii.firstDiscovery.firstDiscoveryEditor
File: firstDiscoveryEditor.js
The First Discovery Editor component is the core component of the First Discovery Tool: It coordinates other major architectural functionality, such as navigation, text-to-speech, language management, etc.
Using the First Discovery Editor component
The First Discovery Editor component is an instance of a fluid.prefs.prefsEditorLoader
.
To use the component, specify it as the loader grade in the
Auxiliary Schema:
fluid.defaults("my.auxSchema", {
auxiliarySchema: {
"loaderGrades": ["gpii.firstDiscovery.firstDiscoveryEditor"],
// more not shown
}
});
To instantiate the resulting
preferences editor,
use the auxiliary schema in a call to
fluid.prefs.create()
:
fluid.prefs.create(container, {
build: {
gradeNames: ["my.auxSchema"]
}
};
Grades
This component uses the following base grades:
fluid.prefs.prefsEditorLoader
Model
This component supports the following model properties:
Path | Description | Values | Default |
---|---|---|---|
currentPanelNum |
The panel currently displayed | Panel ID (Number) | 1 |
Supported Events
This component supports the following events:
Event | Type | Description | Parameters |
---|---|---|---|
onPrefsEditorReady |
default | Fired when the internal prefsEditor, containing all of the panels, is ready |
|
onCreateNav |
default | Fired after onPrefsEditorReady, which is when all of the necessary markup is in place |
|
onPanelShown |
default | Fired each time a panel becomes visible |
|
Methods
Method | Description | Parameters |
---|---|---|
showPanel |
Sets the visibility of the panels. The panel which is identified as the current panel in the model is made visible, the rest are hidden. | none |
Subcomponents
This component has the following subcomponents:
Name | Description | Values | Default |
---|---|---|---|
selfVoicing |
Specifies the Text-to-Speech engine to use for self voicing. | "gpii.firstDiscovery.selfVoicing" |
|
selfVoicingToggle |
Specifies the type of Text-to-Speech button to mute/unmute self voicing that results in the text-to-speech preference to be turned on/off accordingly. | "gpii.firstDiscovery.selfVoicingToggle" |
|
helpButton |
Specifies the type of help button to use. The current help button is mostly a placeholder, as it only sets the text. | "gpii.firstDiscovery.helpButton" |
|
prefsEditor |
Specifies the underlying prefs editor used. This is the part that contains all of the adjuster panels. | "fluid.prefs.prefsEditor" |
|
nav |
Specifies the component to use to handle the navigation between panels, and the set of panel icons. | "gpii.firstDiscovery.nav" |
|
messageLoader |
Specifies the component and means for loading in the JSON message bundle files. | "fluid.prefs.resourceLoader" |
|
Options
This component can be configured using the following options:
Name | Description | Values | Default |
---|---|---|---|
defaultLocale |
The language code to use, for selecting the correct message bundle, when no language has been provided in the preferences. | A valid language code such as: "en-US" , "fr-FR" , "es-MX" , "de-DE" , "nl-NL" , "sv-SE" |
This resolves to "en-US":
|
tooltipOptions |
The options to be used by any descendant tooltip components. |
|
|
selectors |
Javascript object containing selectors for various fragments of the markup, including the containers for the subcomponents. | See Selectors | |
styles |
Specific class names used to achieve the look and feel. |
|
|
modelListeners |
JavaScript object containing model paths and the listeners that are activated when changes happen to those paths. | Keys in the object are event names, values are functions or arrays of functions. | See Model |
Selectors
One of the options that can be provided to Infusion components is a set of CSS-based selectors identifying where in the DOM different elements can be found. Components use a DOM Binder to access the named elements.
The value for the selectors
option is itself a Javascript object containing name/value pairs:
selectors: {
selector1Name: "selector 1 string",
selector2Name: "selector 2 string",
...
}
Selector Name | Description | Default |
---|---|---|
prefsEditor |
The container to use for the internal prefsEditor, which contains all of the adjuster panels. | ".gpiic-fd-prefsEditor" |
panel |
Passed down to internal prefsEditor to use as its panel selector. | ".gpiic-fd-prefsEditor-panel" |
selfVoicingToggle |
The container for the selfVoicingToggle subcomponent. | ".gpiic-fd-selfVoicingToggle" |
helpButton |
The container for the help button. | ".gpiic-fd-help" |
nav |
The container for the navigation subcomponent. | ".gpiic-fd-nav" |
Dependencies
<link rel="stylesheet" href="src/lib/infusion/src/lib/normalize/css/normalize.css" />
<link rel="stylesheet" href="src/lib/foundation/css/foundation.min.css" />
<link rel="stylesheet" href="src/css/style.css" />
<link rel="stylesheet" type="text/css" href="src/lib/infusion/src/framework/preferences/css/Enactors.css" />
<link rel="stylesheet" type="text/css" href="src/lib/infusion/src/framework/preferences/css/PrefsEditor.css" />
<script type="text/javascript" src="src/lib/infusion/infusion-custom.js"></script>
<script type="text/javascript" src="src/schemas/schemas.js"></script>
<script type="text/javascript" src="src/js/keyboardShortcut.js"></script>
<script type="text/javascript" src="src/js/ttsHookup.js"></script>
<script type="text/javascript" src="src/js/tooltip.js"></script>
<script type="text/javascript" src="src/js/msgLookup.js"></script>
<script type="text/javascript" src="src/js/selfVoicing.js"></script>
<script type="text/javascript" src="src/js/stickyKeysAssessment.js"></script>
<script type="text/javascript" src="src/js/keyboardInput.js"></script>
<script type="text/javascript" src="src/js/stickyKeysAdjuster.js"></script>
<script type="text/javascript" src="src/js/panels.js"></script>
<script type="text/javascript" src="src/js/enactors.js"></script>
<script type="text/javascript" src="src/js/navButtons.js"></script>
<script type="text/javascript" src="src/js/navIcons.js"></script>
<script type="text/javascript" src="src/js/helpButton.js"></script>
<script type="text/javascript" src="src/js/stepCount.js"></script>
<script type="text/javascript" src="src/js/nav.js"></script>
<script type="text/javascript" src="src/js/firstDiscoveryEditor.js"></script>