Skip to content

Commit

Permalink
Merge branch 'main' into FLUID-6754
Browse files Browse the repository at this point in the history
  • Loading branch information
jobara committed Dec 13, 2022
2 parents 3554fa0 + 1f41b40 commit a309c00
Show file tree
Hide file tree
Showing 12 changed files with 114 additions and 77 deletions.
34 changes: 23 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,24 @@ Infusion from v2.0.0 onwards adheres to [Semantic Versioning](https://semver.org

### More Info

## [4.6.0] - 2022-12-08

### Fixed

* [FLUID-6758](https://issues.fluidproject.org/browse/FLUID-6758) Selection reading continues from where page reading
stopped
* [FLUID-6757](https://issues.fluidproject.org/browse/FLUID-6757) Rendering and other methods for the selection reader
are not invokers
* [FLUID-6756](https://issues.fluidproject.org/browse/FLUID-6756) regenerateCursor function defined in the global scope
in both Fluid.js and FluidIoC.js

## [4.5.0] - 2022-10-21

### Fixed

* [FLUID-6749](https://issues.fluidproject.org/browse/FLUID-6749) Stop using iframe to render preferences editor
* [FLUID-6753](https://issues.fluidproject.org/browse/FLUID-6753) Framework error messages which attempt to dump the
entire component are unreadable
entire component are unreadable
* [FLUID-6749](https://issues.fluidproject.org/browse/FLUID-6749) Stop using iframe to render preferences editor

## [4.4.0] - 2022-09-27

Expand Down Expand Up @@ -57,23 +68,23 @@ entire component are unreadable

### Fixed

* [FLUID-6741](https://issues.fluidproject.org/browse/FLUID-6741) Workflow failure when constructed lensed component
from asynchronous resource
* [FLUID-6742](https://issues.fluidproject.org/browse/FLUID-6742) Race condition in IoC Testing Framework tests
exposed by upgrade to Chrome 103
* [FLUID-6741](https://issues.fluidproject.org/browse/FLUID-6741) Workflow failure when constructed lensed component
from asynchronous resource

## [4.1.0] - 2022-05-12

### Fixed

* [FLUID-6727](https://issues.fluidproject.org/browse/FLUID-6727) Improve documentation (retrospectively) about changes
in DataSource API in the 3.0.0 release
* [FLUID-6728](https://issues.fluidproject.org/browse/FLUID-6728) A sourcePath into the first element of an array fails
to resolve in contexts where expandImmediate is used
* [FLUID-6729](https://issues.fluidproject.org/browse/FLUID-6729) References into local record such as {source} and
{sourcePath} can't be resolved in interpolated relay segments
* [FLUID-6730](https://issues.fluidproject.org/browse/FLUID-6730) Removed some obsoleted utilities - fluid.accumulate,
fluid.contains, fluid.add, fluid.stableSort
* [FLUID-6729](https://issues.fluidproject.org/browse/FLUID-6729) References into local record such as {source} and
{sourcePath} can't be resolved in interpolated relay segments
* [FLUID-6728](https://issues.fluidproject.org/browse/FLUID-6728) A sourcePath into the first element of an array fails
to resolve in contexts where expandImmediate is used
* [FLUID-6727](https://issues.fluidproject.org/browse/FLUID-6727) Improve documentation (retrospectively) about changes
in DataSource API in the 3.0.0 release

## [4.0.0] - 2022-03-17

Expand Down Expand Up @@ -977,7 +988,8 @@ A pre-release of [0.3.0].
* [Issues addressed in 0.1.0](https://issues.fluidproject.org/projects/FLUID/versions/10000)
* [Changes in 0.1.0](https://github.com/fluid-project/infusion/commits/v0.1.0)

[Unreleased]: https://github.com/fluid-project/infusion/compare/v4.0.0...HEAD
[Unreleased]: https://github.com/fluid-project/infusion/compare/v4.6.0...HEAD
[4.6.0]: https://github.com/fluid-project/infusion/releases/tag/v4.6.0
[4.5.0]: https://github.com/fluid-project/infusion/releases/tag/v4.5.0
[4.4.0]: https://github.com/fluid-project/infusion/releases/tag/v4.4.0
[4.3.0]: https://github.com/fluid-project/infusion/releases/tag/v4.3.0
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ below.

##### -i, --include

__value__: "module(s)" (String)
**value**: "module(s)" (String)
_only available to custom builds_

The `--include` option takes a comma-separated string of the [Modules](#modules) to be included in a custom package.
Expand All @@ -155,7 +155,7 @@ npm run build:pkg:custom -- -i "fluid-inline-edit, fluid-ui-options"

##### -e, --exclude

__value__: "module(s)" (String)
**value**: "module(s)" (String)
_only available to custom builds_

The `--exclude` option takes a comma-separated string of the [Modules](#modules) to be excluded from a custom package.
Expand All @@ -170,7 +170,7 @@ npm run build:pkg:custom -- -e jquery

##### -n, --name

__value__: "custom suffix" (String)
**value**: "custom suffix" (String)
_only available to custom packages which have specified an include and/or exclude option_

By default, custom packages are given a name in the form _infusion-custom-{version}.zip_ and the concatenated JavaScript
Expand Down
42 changes: 24 additions & 18 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
# Release Notes for Fluid Infusion 4.5.0
# Release Notes for Fluid Infusion 4.6.0

[Fluid Project](https://fluidproject.org)

[Infusion Documentation](https://github.com/fluid-project/infusion-docs)

## What's New in 4.6.0

* Maintenance release which resolves
* [FLUID-6758](https://issues.fluidproject.org/browse/FLUID-6758) Selection reading continues from where page reading
stopped
* [FLUID-6757](https://issues.fluidproject.org/browse/FLUID-6757) Rendering and other methods for the selection reader
are not invokers
* [FLUID-6756](https://issues.fluidproject.org/browse/FLUID-6756) regenerateCursor function defined in the global scope
in both Fluid.js and FluidIoC.js

## What's New in 4.5.0

* Maintenance release which resolves
* [FLUID-6749](https://issues.fluidproject.org/browse/FLUID-6749) Stop using iframe to render preferences editor
* [FLUID-6753](https://issues.fluidproject.org/browse/FLUID-6753) Framework error messages which attempt to dump the
entire component are unreadable
* [FLUID-6749](https://issues.fluidproject.org/browse/FLUID-6749) Stop using iframe to render preferences editor

## What's New in 4.4.0

Expand All @@ -20,32 +30,32 @@
## What's New in 4.3.0

* Maintenance release which resolves
* [FLUID-6744](https://issues.fluidproject.org/browse/FLUID-6744) Failure distributing to gradeNames for component
which has undefined options
* [FLUID-6745](https://issues.fluidproject.org/browse/FLUID-6745) Improve TextNodeParser so that it can be configured
with a free hash of selectors to ignore
* [FLUID-6748](https://issues.fluidproject.org/browse/FLUID-6748) Remove the auto save of panel index in separated
panel UIO
* [FLUID-6745](https://issues.fluidproject.org/browse/FLUID-6745) Improve TextNodeParser so that it can be configured
with a free hash of selectors to ignore
* [FLUID-6744](https://issues.fluidproject.org/browse/FLUID-6744) Failure distributing to gradeNames for component
which has undefined options

## What's New in 4.2.0

* Maintenance release which resolves
* [FLUID-6741](https://issues.fluidproject.org/browse/FLUID-6741) Workflow failure when constructed lensed component
from asynchronous resource
* [FLUID-6742](https://issues.fluidproject.org/browse/FLUID-6742) Race condition in IoC Testing Framework tests
exposed by upgrade to Chrome 103
* [FLUID-6741](https://issues.fluidproject.org/browse/FLUID-6741) Workflow failure when constructed lensed component
from asynchronous resource

## What's New in 4.1.0

* Maintenance release which resolves
* [FLUID-6727](https://issues.fluidproject.org/browse/FLUID-6727) Improve documentation (retrospectively) about changes
in DataSource API in the 3.0.0 release
* [FLUID-6728](https://issues.fluidproject.org/browse/FLUID-6728) A sourcePath into the first element of an array fails
to resolve in contexts where expandImmediate is used
* [FLUID-6729](https://issues.fluidproject.org/browse/FLUID-6729) References into local record such as {source} and
{sourcePath} can't be resolved in interpolated relay segments
* [FLUID-6730](https://issues.fluidproject.org/browse/FLUID-6730) Removed some obsoleted utilities - fluid.accumulate,
fluid.contains, fluid.add, fluid.stableSort
* [FLUID-6729](https://issues.fluidproject.org/browse/FLUID-6729) References into local record such as {source} and
{sourcePath} can't be resolved in interpolated relay segments
* [FLUID-6728](https://issues.fluidproject.org/browse/FLUID-6728) A sourcePath into the first element of an array fails
to resolve in contexts where expandImmediate is used
* [FLUID-6727](https://issues.fluidproject.org/browse/FLUID-6727) Improve documentation (retrospectively) about changes
in DataSource API in the 3.0.0 release

## What's New in 4.0.0?

Expand Down Expand Up @@ -154,10 +164,6 @@ Infusion 4.0.0 is tested with the latest versions of the following desktop brows
* [Firefox](https://mozilla.org/firefox/)
* [Safari](https://apple.com/safari/)

Additional testing is performed with the following mobile browsers:

* [Safari](https://apple.com/safari/) (iOS 15.3.1)

The Fluid Project also maintains a [shareable configuration](https://github.com/fluid-project/browserslist-config-fluid)
for [Browserslist](https://github.com/browserslist/browserslist). In the future, this configuration will be used within
Fluid Infusion.
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "infusion",
"description": "Infusion is an application framework for developing flexible stuff with JavaScript",
"version": "4.5.0",
"version": "4.6.0",
"author": "Fluid Project",
"bugs": "http://issues.fluidproject.org/browse/FLUID",
"homepage": "http://www.fluidproject.org/",
Expand Down Expand Up @@ -98,10 +98,10 @@
"browserslist-config-fluid": "0.1.0",
"cpy-cli": "3.1.1",
"dayjs": "1.10.7",
"eslint-config-fluid": "2.0.0",
"eslint-plugin-jsdoc": "37.0.3",
"eslint-config-fluid": "2.1.1",
"eslint-plugin-jsdoc": "39.6.2",
"fast-glob": "3.2.11",
"fluid-lint-all": "1.1.5",
"fluid-lint-all": "1.2.3",
"fluid-testem": "2.1.15",
"hypher": "0.2.5",
"jquery": "3.6.0",
Expand Down
47 changes: 33 additions & 14 deletions src/components/orator/js/Orator.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ fluid.defaults("fluid.orator.controller", {
modelListeners: {
"playing": {
listener: "fluid.orator.controller.setToggleView",
args: ["{that}", "{change}.value"]
args: ["{that}", "{change}.value"],
namespace: "toggleController"
},
"enabled": {
"this": "{that}.container",
Expand Down Expand Up @@ -321,8 +322,9 @@ fluid.defaults("fluid.orator.domReader", {
},
addToParseQueue: {
funcName: "fluid.orator.domReader.addToParseQueue",
args: ["{that}", "{arguments}.0"]
args: ["{that}", "{arguments}.0", "{that}.retrieveActiveQueue"]
},
retrieveActiveQueue: "fluid.orator.domReader.retrieveActiveQueue",
resetParseQueue: {
funcName: "fluid.orator.domReader.resetParseQueue",
args: ["{that}"]
Expand Down Expand Up @@ -585,9 +587,11 @@ fluid.orator.domReader.retrieveActiveQueue = function (that, lang) {
*
* @param {fluid.orator.domReader} that - an instance of the component
* @param {TextNodeData} textNodeData - the parsed information of text node. Typically from `fluid.textNodeParser`
* @param {Function} retrieveActiveQueue - a function, usually, `fluid.orator.domReader.retrieveActiveQueue`, retrieves
* and manages the parseQueue.
*/
fluid.orator.domReader.addToParseQueue = function (that, textNodeData) {
var activeQueue = fluid.orator.domReader.retrieveActiveQueue(that, textNodeData.lang);
fluid.orator.domReader.addToParseQueue = function (that, textNodeData, retrieveActiveQueue) {
var activeQueue = retrieveActiveQueue(that, textNodeData.lang);
var lastParsed = fluid.peek(activeQueue) || {};

var words = textNodeData.node.textContent.split(/(\s+)/); // split on whitespace, and capture whitespace
Expand Down Expand Up @@ -887,12 +891,11 @@ fluid.defaults("fluid.orator.selectionReader", {
namespace: "render"
}],
"play": [{
func: "fluid.orator.selectionReader.queueSpeech",
funcName: "fluid.orator.selectionReader.queueSpeech",
args: ["{that}", "{change}.value", "{fluid.textToSpeech}.queueSpeechSequence"],
namespace: "queueSpeech"
}, {
func: "fluid.orator.selectionReader.renderControlState",
args: ["{that}", "{that}.control", "{arguments}.0"],
func: "{that}.renderControlState",
excludeSource: ["init"],
namespace: "renderControlState"
}],
Expand Down Expand Up @@ -920,7 +923,24 @@ fluid.defaults("fluid.orator.selectionReader", {
funcName: "fluid.orator.selectionReader.togglePlay",
args: ["{that}", "{arguments}.0"]
},
selectionFilter: "fluid.textNodeParser.hasGlyph"
selectionFilter: "fluid.textNodeParser.hasGlyph",
calculatePosition: "fluid.orator.selectionReader.calculatePosition",
createControl: {
funcName: "fluid.orator.selectionReader.createControl",
args: ["{that}"]
},
renderControlState: {
funcName: "fluid.orator.selectionReader.renderControlState",
args: ["{that}", "{that}.control"]
},
adjustForVerticalCollision: {
funcName: "fluid.orator.selectionReader.adjustForVerticalCollision",
args: ["{that}.control", "{arguments}.0", "{arguments}.1", "{arguments}.2"]
},
adjustForHorizontalCollision: {
funcName: "fluid.orator.selectionReader.adjustForHorizontalCollision",
args: ["{that}.control", "{arguments}.0"]
}
}
});

Expand Down Expand Up @@ -1154,29 +1174,28 @@ fluid.orator.selectionReader.renderControl = function (that, state) {
if (state) {
var selectionRange = window.getSelection().getRangeAt(0);
var controlContainer = selectionRange.startContainer.parentNode.offsetParent || selectionRange.startContainer.parentNode;
var position = fluid.orator.selectionReader.calculatePosition(selectionRange);
var position = that.calculatePosition(selectionRange);

that.control = that.control || fluid.orator.selectionReader.createControl(that);
that.control = that.control || that.createControl();

// set the intial position
that.control.css({
top: position.offset.top,
left: position.offset.left
});

fluid.orator.selectionReader.renderControlState(that, that.control);
that.renderControlState();
that.control.appendTo(controlContainer);

// check if there is space to display above, if not move to below selection
fluid.orator.selectionReader.adjustForVerticalCollision(
that.control,
that.adjustForVerticalCollision(
position,
that.options.styles.below,
that.options.styles.above
);

// adjust horizontal position for collisions with the viewport edge.
fluid.orator.selectionReader.adjustForHorizontalCollision(that.control, position);
that.adjustForHorizontalCollision(position);

// cleanup range
selectionRange.detach();
Expand Down
2 changes: 0 additions & 2 deletions src/components/textToSpeech/js/TextToSpeech.js
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,6 @@ fluid.textToSpeech.cancel = function (that) {
}

that.invokeSpeechSynthesisFunc("cancel");
// clear any paused state.
that.invokeSpeechSynthesisFunc("resume");
};

/*********************************************************************************************
Expand Down
Loading

0 comments on commit a309c00

Please sign in to comment.