diff --git a/Gruntfile.js b/Gruntfile.js index e2c0eef..b8db7ce 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -57,7 +57,8 @@ module.exports = function (grunt) { "node_modules/infusion/src/framework/enhancement/js/ContextAwareness.js", "node_modules/infusion/src/framework/enhancement/js/ProgressiveEnhancement.js", "node_modules/infusion/src/components/tableOfContents/js/TableOfContents.js", - "node_modules/infusion/src/framework/preferences/js/Enactors.js" + "node_modules/infusion/src/framework/preferences/js/Enactors.js", + "node_modules/infusion/src/framework/preferences/js/LetterSpaceEnactor.js" ], adjustersLib: [ // jQuery @@ -101,7 +102,9 @@ module.exports = function (grunt) { "node_modules/infusion/src/framework/preferences/js/PrefsEditor.js", "node_modules/infusion/src/framework/preferences/js/Panels.js", "node_modules/infusion/src/framework/preferences/js/SelfVoicingPanel.js", + "node_modules/infusion/src/framework/preferences/js/LetterSpacePanel.js", "node_modules/infusion/src/framework/preferences/js/Enactors.js", + "node_modules/infusion/src/framework/preferences/js/LetterSpaceEnactor.js", "node_modules/infusion/src/framework/preferences/js/StarterGrades.js", "node_modules/infusion/src/framework/preferences/js/ArrowScrolling.js", "node_modules/infusion/src/framework/preferences/js/SeparatedPanelPrefsEditor.js", @@ -110,6 +113,7 @@ module.exports = function (grunt) { "node_modules/infusion/src/framework/preferences/js/AuxBuilder.js", "node_modules/infusion/src/framework/preferences/js/StarterSchemas.js", "node_modules/infusion/src/framework/preferences/js/SelfVoicingSchemas.js", + "node_modules/infusion/src/framework/preferences/js/LetterSpaceSchemas.js", "node_modules/infusion/src/framework/preferences/js/Builder.js", // from extension @@ -121,6 +125,7 @@ module.exports = function (grunt) { "node_modules/infusion/src/components/tableOfContents/html/TableOfContents.html", "node_modules/infusion/src/framework/preferences/html/PrefsEditorTemplate-textSize.html", "node_modules/infusion/src/framework/preferences/html/PrefsEditorTemplate-lineSpace.html", + "node_modules/infusion/src/framework/preferences/html/PrefsEditorTemplate-letterSpace.html", "node_modules/infusion/src/framework/preferences/html/PrefsEditorTemplate-contrast.html", "node_modules/infusion/src/framework/preferences/html/PrefsEditorTemplate-layout.html", "node_modules/infusion/src/framework/preferences/html/PrefsEditorTemplate-enhanceInputs.html", diff --git a/README.md b/README.md index bf2548e..5527029 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ The following adaptations are supported: * Text Size * Line Space +* Character Space * Contrast * Right-Click to Select * Selection Highlight diff --git a/TODO.md b/TODO.md deleted file mode 100644 index a19471e..0000000 --- a/TODO.md +++ /dev/null @@ -1,22 +0,0 @@ -# TODO list - -* Improve the high contrast css "hack" -* Since we depend on third party extensions (such as Chrome Vox), check whether they're installed or not. If an extension can't be found, disable the components that make use of this extension, alternatively ask the user for confirmation to install it and perform the installation (if possible). -* Testing - * ~~Add unit tests for the wsConnector component~~ - * Add unit/integration tests for the chromeSettings component - * Right now, the tests only run in node.js, make them run in the browser too -* Identify and evaluate the security risks and improve the implementation according to these -* More personalization features - * Simplification of content - * Add support for CSS filtering - http://www.w3schools.com/cssref/css3_pr_filter.asp -* Implement support for GPII compatible web pages -* Add notifications to interact with the user -* Include options (https://developer.chrome.com/extensions/options) such as: - * url:port of the flowManager - * try to reconnect automatically? / retry time? - -# Ongoing work - -* Notifications -* Running tests from the browser diff --git a/extension/manifest.json b/extension/manifest.json index bd78e39..cf6d3fe 100644 --- a/extension/manifest.json +++ b/extension/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "UI Options Plus (UIO+)", "short_name": "UIO+", - "version": "0.1.0.2", + "version": "0.1.0.3", "description": "User Interface Options Plus (UIO+) allows you to customize websites to match your own personal needs and preferences.", "author": "Fluid Project", "permissions": [ diff --git a/extension/messages/charSpace.json b/extension/messages/charSpace.json new file mode 100644 index 0000000..6752b85 --- /dev/null +++ b/extension/messages/charSpace.json @@ -0,0 +1,6 @@ +{ + "label": "Character Spacing", + "description": "Adjust the spacing between characters", + "increaseLabel": "increase character spacing", + "decreaseLabel": "decrease character spacing" +} diff --git a/extension/src/content_scripts/domEnactor.js b/extension/src/content_scripts/domEnactor.js index 250e287..07962cb 100644 --- a/extension/src/content_scripts/domEnactor.js +++ b/extension/src/content_scripts/domEnactor.js @@ -71,6 +71,14 @@ } } }, + charSpace: { + type: "gpii.chrome.enactor.charSpace", + options: { + model: { + value: "{domEnactor}.model.characterSpace" + } + } + }, inputsLarger: { type: "gpii.chrome.enactor.inputsLarger", options: { @@ -145,6 +153,20 @@ } }); + // Character space + fluid.defaults("gpii.chrome.enactor.charSpace", { + gradeNames: ["fluid.prefs.enactor.letterSpace"], + fontSizeMap: { + "xx-small": "9px", + "x-small": "11px", + "small": "13px", + "medium": "15px", + "large": "18px", + "x-large": "23px", + "xx-large": "30px" + } + }); + // Inputs larger fluid.defaults("gpii.chrome.enactor.inputsLarger", { gradeNames: ["fluid.prefs.enactor.enhanceInputs"], diff --git a/extension/src/lib/PrefsEditor.js b/extension/src/lib/PrefsEditor.js index 56acfc5..a96b468 100644 --- a/extension/src/lib/PrefsEditor.js +++ b/extension/src/lib/PrefsEditor.js @@ -25,6 +25,7 @@ "preferences.gpii_chrome_prefs_contrast": "settings.contrastTheme", "preferences.fluid_prefs_enhanceInputs": "settings.inputsLargerEnabled", "preferences.gpii_chrome_prefs_lineSpace": "settings.lineSpace", + "preferences.fluid_prefs_letterSpace": "settings.characterSpace", "preferences.fluid_prefs_tableOfContents": "settings.tableOfContentsEnabled", "preferences.gpii_chrome_prefs_textSize": "settings.fontSize", "preferences.fluid_prefs_speak": "settings.selfVoicingEnabled", @@ -166,7 +167,7 @@ gradeNames: ["fluid.prefs.panel.textSize"], preferenceMap: { "gpii.chrome.prefs.textSize": { - "model.textSize": "default", + "model.value": "default", "range.min": "minimum", "range.max": "maximum", "step": "divisibleBy" @@ -178,7 +179,7 @@ gradeNames: ["fluid.prefs.panel.lineSpace"], preferenceMap: { "gpii.chrome.prefs.lineSpace": { - "model.lineSpace": "default", + "model.value": "default", "range.min": "minimum", "range.max": "maximum", "step": "divisibleBy" @@ -276,6 +277,15 @@ "template": "%templatePrefix/PrefsEditorTemplate-lineSpace.html" } }, + "charSpace": { + "type": "fluid.prefs.letterSpace", + "panel": { + "type": "fluid.prefs.panel.letterSpace", + "container": ".flc-prefsEditor-char-space", + "message": "%messagePrefix/charSpace.json", + "template": "%templatePrefix/PrefsEditorTemplate-letterSpace.html" + } + }, "contrast": { "type": "gpii.chrome.prefs.contrast", "classes": { diff --git a/extension/src/lib/domSettingsApplier.js b/extension/src/lib/domSettingsApplier.js index f870975..a726113 100644 --- a/extension/src/lib/domSettingsApplier.js +++ b/extension/src/lib/domSettingsApplier.js @@ -34,6 +34,7 @@ fluid.defaults("gpii.chrome.domSettingsApplier", { // Accepted model values: // settings.contrastTheme: string, // settings.lineSpace: number, // the multiplier to the current line space + // settings.characterSpace: number, // settings.inputsLarger: boolean, // settings.selectionTheme: string, // settings.simplifiedUiEnabled: boolean, diff --git a/extension/templates/PrefsEditorPanel.html b/extension/templates/PrefsEditorPanel.html index 1facd5d..43c3b35 100644 --- a/extension/templates/PrefsEditorPanel.html +++ b/extension/templates/PrefsEditorPanel.html @@ -3,6 +3,7 @@