Enyo 2.4 Release Notes
Welcome to Enyo 2.4! The following items have changed since the 2.3.0-pre.10 public preview release. (Note that this list is not comprehensive; see the commit history in GitHub for a complete list of changes.)
New Libraries
The 2.4 release marks the public introduction of Moonstone, Enyo's UI library for TV apps, and Spotlight, a library for managing focus states. Also new are the repos bootplate-moonstone
, a Moonstone-specific version of the Bootplate starter template, and enyo-webos
and enyo-cordova
, which provide support for development on webOS for TV and a range of popular third-party platforms, respectively.
Detailed Release Notes
enyo
Enyo now supports the W3C pointer events recommendation and will use these events instead of mouse events when available. The existing support for MSPointer events is now enabled only when W3C pointer events aren't detected, which fixes a touch-recognition problem in Internet Explorer 11.
Enyo provides support for the W3C Page Visibility API in the new file
page_visibility.js
, under thedom
package. This normalizesvisibilitychange
events, as well as thedocument.hidden
anddocument.visibilityState
properties. Fallbacks are used to support older browsers.Added
enyo.Video
. Also updated base kindenyo.Media
to support different playback states (fast forward, rewind, slow forward, slow rewind).Added
keymap.js
todom
package. This adds a new key mapping feature to the dispatcher; key events gain a new keySymbol property based on a global key mapping. To map a keyCode to a keySymbol, callenyo.dispatcher.registerKeyMap()
and pass in the mapping as a simple hash.Note that all key events are now dispatched via Signals.
Added
rendered.js
toboot
module.enyo.rendered()
registers callbacks to be called whenrenderInto()
finishes rendering root component tree.Added
scrollToIndex()
API method toenyo.DataList
andenyo.DataGridList
.Deprecated
enyo.GridList
. Developers should useenyo.DataGridList
instead.Made several changes to
enyo.Collection
:enyo.Collection
is once again a subkind ofenyo.Component
.The
filtered
,filters
,filterProps
, andactiveFilter
properties have been removed, and thefilter()
method no longer can be used to clear the active filter. The whole filtering mechnanism is being rewritten for greater flexibility and improved performance.Added support for destroying all local records. The
destroyAll()
method now accepts alocal
parameter; pass intrue
to destroy local records viadestroyLocal()
. Alternatively, you may use the new convenience methoddestroyAllLocal()
.Also added convenience method
fetchAndDestroyLocal()
, which fetches the data for the collection before destroying local records.Added
isFetching
property, whose value is a boolean indicating whether data is currently being fetched. Typically used to show/hide an "in-progress" spinner control.
In
enyo.Application
, removed thecontrollers
property and madeenyo.Controller
thedefaultKind
. Controllers should be declared as normal components.In a related change, added support for
global
property toenyo.Controller
.Made numerous changes to
enyo.Binding
:Removed
dirty
property, which was found to be not worth supporting.Added
allowUndefined
property, which defaults totrue
, allowing propagation of theundefined
object. If set tofalse
,undefined
will not be propagated without the use of a transform or an overloaded binding kind.You may now call
stop()
from within a binding'stransform
function to stop propagation based on user-defined conditions.enyo.Binding
now registers for an entire path, and will update in response to changes anywhere in the path.
Made several updates to
enyo.DataRepeater
:controller
is no longer a special property; this affects DataRepeater, DataList, DataGridList, UiComponent (and its child kinds), and Application. DataRepeater, DataList, and DataGridList should use thecollection
property instead. For all other kinds, there is no direct replacement for the previous functionality. Instead, use a binding from the path to the desired local property.The
length
property is no longer bound. Developers are advised to check for the existence of thecollection
property, and then check the length of the collection (if it exists). This change affects DataList and DataGridList as well as DataRepeater.Fixed issue causing DataRepeater not to render in response to collection changes.
Added new
selectionEvents
property to enable mapping of events other thanontap
to the selection process.
Made several updates to
enyo.Model
:enyo.Model
now employs the defaultenyo.ObserverSupport
andenyo.BindingSupport
; as a result, it shares the limitation of working only with theattributes
of a data record.Added support for
force
parameter inset()
method. Setting the value totrue
forces change notifications to fire, even if the new value is the same as the old one.Added support for
opts.success
callback indidDestroy()
(which is itself an internal callback, called before any user-provided callbacks when a record is successfully destroyed).Made changes to improve Model initialization time.
Fixed issue in
setObject()
that could result in failure to detect whether a model has changed. Added related unit test toDataModelingTest.js
.Fixed issue in which calling
destroy()
on previously fetched models would destroy the models locally, but not in the remote data source.
Reworked the registered event system used by
enyo.Model
andenyo.Collection
, creating a new mixin file,RegisteredEventSupport.js
. The new system no longer depends onenyo.Store
; thus, the API methods previously available viaenyo.Store
no longer exist.In
enyo.TouchScrollStrategy
, added published propertiesfixedTime
andframe
, which facade theScrollMath
properties with the same names. Also added change handler methodsfixedTimeChanged()
andframeChanged()
.In
enyo.UiComponent
, removed the base methodmodelChanged()
and deprecatedcontrollerChanged()
; as a result, any developer code callingthis.inherited(arguments)
from within an overloadedmodelChanged()
method will fail, and should be removed.Updated XHR references in
xhr.js
to avoid potential circular references. Also implementeddestroy()
method inenyo.Ajax
andenyo.Async
for improved reference cleanup.In
BindingSupport.js
, addressed issue preventingdestroy()
from completely destroying component bindings when called on a component. Added related unit test toBindingTest.js
.In
boot.js
, updatedenyo.load()
to work properly at load time.Made multiple updates to
enyo.Collection
:Updated
add()
to monitorchange
anddestroy
events from instantiated models.Added ability to call
filter()
with no parameters to easily apply the active filter.Fixed issue preventing records from being added at index 0.
In
enyo.Component
, addedtriggerHandler()
method, a public API for triggering the handler for a particular type of event. Also modifiedtoString()
to returnid
as well askindName
.In
ComputedSupport.js
, added default value support to computed properties. Simply provide a configuration object with a key nameddefaultValue
and any value (evenundefined
). Also updated associated unit tests.Made several updates to
enyo.Control
:Added
detectTextDirectionality()
, which determines the control's script orientation (i.e., left-to-right or right-to-left) based on its content.Added
getDomCssText()
, used internally inenyo.Control
.Added
invalidateStyles()
, called byenyo.dom.transformsToDom()
intransform.js
.Added
sendShowingChangedEvent()
, which waterfalls anonShowingChanged
event when a control'sshowing
value is modified; also addedshowingChangedHandler()
as default handler for the event. If the control is not showing, the handler will stop propagation of the event.showingChangedHandler()
may be overloaded to provide additional handling for theonShowingChanged
event.Modified
getAbsoluteShowing()
so that it now accepts an optional boolean parameter. Iftrue
is passed in, computed bounds will not be retrieved to force a layout; instead, the method will rely on the return value ofgetShowing()
. Also fixed issue preventing focus from entering a popup if its owner is a hidden control.Addressed issue that could cause focus to be lost when all items are removed from a list.
Fixed deprecated warnings triggered by calls to
getAbsoluteBounds()
.Updated documentation for
hasNode()
.
Made multiple updates to
enyo.DataList
Added public property
fixedChildSize
, used to optimize performance when the items in a list have fixed dimensions. This property should be set for any list whose items are of uniform height or width.Added overload version of
showingChangedHandler()
.Added overload version of
destroy()
method to address problems withscrollToIndex()
.Deprecated the
controlsPerPage
property because it was not being used properly, leading to problems in some apps; in its place, addedpageSizeMultiplier
property, which now dynamically determines the optimal number of controls for a given page. Apps should not need to modifypageSizeMultiplier
except in very rare circumstances.Modified
rendered()
to give overloaded kinds the opportunity to respond to thefinished
event, even when it is delayed.Reworked code to delay certain actions until the list is showing.
Updated
didScroll()
anddidResize()
to avoid firing events if no collection is available.Fixed issue causing layout problems in DataLists with horizontal orientation.
Removed misleading documentation.
In
enyo.DataList
andenyo.DataRepeater
, renamedgetChildForIndex()
aschildForIndex()
and made sure that it returnsundefined
when that value is expected.In
enyo.DataList
andVerticalDelegate.js
, fixed issue preventing proper updating of properties; also fixed code for determining scrolling threshold in horizontal orientation.In
enyo.dispatcher
, addedenyo.getPosition()
, a new API for retrieving the coordinates of the last known mouse/cursor position (or touch, if applicable). Also added related sample, "PositionSample".In
dom.js
, added methodenyo.dom.getAbsoluteBounds()
, which takes into account translateX, translateY, and matrix3d transforms. The existingenyo.Control.getAbsoluteBounds()
API is unchanged, but its implementation now utilizes the new method onenyo.dom
.In
gesture.js
, introducedconfigureHoldPulse()
method, used indown()
to configure subsequentholdpulse
events.configureHoldPulse()
accepts a hash of options that may include values for"delay"
,"moveTolerance"
,"endHold"
, and"resume"
. Default values are defined inenyo.gesture.drag.holdPulseDefaultConfig
.In
enyo.Group
, added published propertyallowHighlanderDeactivate
. A value oftrue
means that an active highlander item may be deactivated (default isfalse
). The value may be changed at runtime by sending the group anonActivate
event with the desired value set on the event'sallowHighlanderDeactivate
property.In
hooks.js
, modfiedenyo.updateLocale()
so that it is the emitter of theonLocaleChange
event.In
HorizontalDelegate.js
andVerticalDelegate.js
, modifiedinitList()
to allow scroller settings to be overridden by a subkind or instance. Also added new propertyposProp
, part of reworked support for right-to-left scripts.Made several changes to
enyo.Image
:Added published properties
sizing
andposition
. Whensizing
is set, the image is rendered as a<div>
withbackground-image
. Valid values are"cover"
and"constrain"
. Whensizing
is used,position
determines the positioning of the image within its bounds (default is"center"
).Modified
srcChanged()
to guard against regex failure ifsrc
property is null.Fixed issue in which some browsers could not read placeholder image data.
In
enyo.Input
, modifiedvalueChanged()
to manually update the cached value to ensure we have the correct value the next time the attribute is requested or the control is re-rendered.Made several updates to
lang.js
:Added
enyo.perfNow()
, a high-precision, high performance monotonic timestamp, which is independent of changes to the system clock and safer for use in animation, etc.enyo.perfNow()
falls back toenyo.now()
(based on the JavaScriptDate
object) on platforms wherewindow.performance.now()
is not available. Also modified numerous kinds across the framework to useenyo.perfNow()
instead ofenyo.now()
for tracking duration.Added methods
enyo.toUpperCase()
andenyo.toLowerCase()
. These should be used to replace calls toString.toUpperCase()
andString.toLowerCase()
in code that needs to be locale-aware.Modified
enyo.asyncMethod()
to accept an anonymous function as the lone parameter. The previous signature is still valid, as well.Addressed problems with
enyo.getPath()
,enyo.getPath.fast()
,enyo.setPath()
, andenyo.setPath.fast()
when dealing with computed properties.
In
loader.js
, updateddecodePackagePath()
to properly handle URLs that begin with//
.In
log.js
, addedvalidateArgs()
to prevent (or gracefully handle) circular reference errors when stringifying objects.In
modal.js
, modified theenyo.dispatcher.capture()
API so that it no longer bubbles all captured events through the normal event chain, but rather notifies the captureTarget when specific events occur, according to a map of callbacks passed as a parameter tocapture()
.While this is, technically, a breaking change to the
enyo.dispatcher.capture()
API, the API has not been publicized and is fairly difficult to use. Among the set of controls developed by the Enyo team, it was only used inenyo.Popup
, so we assume this change will have minimal impact on the general public.Fixed problem affecting initialization of
model
property inenyo.ModelController
and added unit test toControllerTest.js
. Also addressed a similar situation involvingcontroller
property inenyo.UiComponent
.In
msevents.js
, added pointer event support for IE11 and fixed handling of touch events in IE10.Updated
enyo.platform
to includeplatformName
. Also updated platform detection for Silk 3.x.In
enyo.Object
, madedestroyed
flag observable and updated documentation forset()
.In
enyo.Popup
, addedallowDefault
flag. Default value isfalse
. Setting this totrue
will stoppreventDefault()
from being called on captured events. Also, improved centering code inupdatePosition()
.Updated
ready.js
so that it no longer uses other Enyo code.In
enyo.Repeater
, updated documentation forbuild()
method.Optimized
RepeaterChildSupport.js
to avoid claiming node until necessary.In
enyo.RichText
, modifieddisabledChanged()
to bubbleonDisabledChange
event. This is needed becausedisabledChanged()
doesn't call the parent method inenyo.Input
.Made several modifications to
enyo.Scroller
:Added overload version of
resized()
that only propagatesresize
events to children if theshowing
property istrue
. This is part of a fix for issues seen while scrolling or paging inenyo.DataList
orenyo.DataGridList
.Rewrote
cacheScrollPosition()
to address caching bug.Modified
setScrollLeft()
andsetScrollTop()
to update the cached scroll position when the scroller is hidden or re-rendered.Set
noDefer: true
for API compatibility.Set the touch strategy to "TranslateScrollStrategy" (instead of "TouchScrollStrategy") for webOS version 4 and later.
Updated
enyo.Scroller
andenyo.ScrollStrategy
to normalize new properties returned bygetScrollBounds()
.In
enyo.ScrollMath
, updatedmousewheel()
to allow horizontal scrolling frommousewheel
event.In
enyo.ScrollMath
andenyo.TouchScrollStrategy
, addressed issue that could cause touch scrolling to get stuck in overscroll at the bottom of a DataGridList.Modified
enyo.Store
to throw an error (instead of a warning) when unique records in the same store are found to have the sameprimaryKey
.In
enyo.Store
, fixed context binding inaddListener()
, adding related unit test toDataModelingTest.js
. Also fixed issues seen when callingfindLocal()
with no previous entry of data for the record kind.In
touch.js
, fixed issue causingdocument.ongesturechange
event to not fire on iOS 7.In
enyo.UiComponent
, addressed issue in whichaddBefore()
did not work correctly if the container had a control parent; added related unit test toControlTest.js
.Made several updates to
VerticalDelegate.js
:Fixed problems with item selection.
Fixed issue causing display of truncated list after deletion of an item.
Added check to refresh page only if it actually has children.
Modified
didScroll()
to update scroll bounds before comparing bounds to scroll threshold.Modified
setScrollThreshold()
to better handle case in which a DataGridList has a small data set and page 2 has no controls.
In
VerticalGridDelegate.js
, modifiedlayout()
to add support for right-to-left positioning of grid items. Also rounded values used for positioning and sizing to avoid floating point positioning glitches in WebKit.Made several changes to
enyo.xhr
:Added support for boolean request parameters
mozSystem
andmozAnon
. SetmozSystem
totrue
to create a cross-domain XHR; setmozAnon
totrue
to create an anonymous XHR that does not send cookies or authentication headers. Both parameters are currently supported on Firefox OS only.Updated previous change to
simplifyFileURL()
that disabled use of local file access when fetching a page from a Windows file share. With this update, the hostname is now only omitted for devices running webOS 3 or earlier.Modified
request()
to callenyo.path.rewrite()
on passed-in URL before callingsimplifyFileURL()
. This fixes the loading of$
-prefixed paths fromfile://
URLs.
Added samples for Enyo core UI controls.
Updated "DataRepeaterSample" to show how
index
property may be used to get item number. Also removed"enyo-fit"
CSS class, which was causing the DataRepeater not to scroll on initial upward swipe.In "GroupSample", fixed issue with grouping in Firefox.
In "ImageSample", fixed issue causing placeholder image to be stretched.
Updated
AjaxText.js
to limit cache control test to iOS 6 only.In
enyo/tools
, updated npm dependencies (nopt
andshelljs
packages).Updated
lessc.js
andminify.js
to use relative URLs when compiling LESS files, to be compatible with the bootplateTheme.less
scheme for importing and then overriding library variables.In
minify.js
, fixed handling of non-relative paths, alternatepackage.js
files, and CSS/LESS assets with spaces in their filenames. Also fixed extra quote in external URLs that caused problems external CSS in Firefox.In
package.json
, reformatted dependencies as a hash map to match npm documentation specifications.Updated Travis CI configuration to use npm cache and PHP 5.5. Temporarily disabled AJAX tests' ability to affect Travis pass/fail status due to problems with PHP server.
Updated
enyo.design
file, used by the Ares IDE.
onyx
Updated components and samples to support the
iLib
localization library (viaenyo-ilib
).Updated
onyx.Button
to prevent pressed state from appearing when button is disabled.In
onyx.ContextualPopup
, modified action buttons so they behave like standard Enyo buttons.In
onyx.IconButton
, added code to verify that the IconButton is not disabled before firing events.In
onyx.Popup
, madedefaultZ
a published property.In
onyx.TabBar
, fixed several issues related to changing or removing tabs.In
onyx.TabBar.Item
, removed unnecessary call torender()
.Fixed issue with delayed
:active:hover
button styling in response to touch.Updated
.less
files to ensure that<script>
tag content isn't visible.Removed
:active:hover
button styling, instead applying or removingpressed
class in response to appropriate events. Also fixed issues withpressed
state as applied to sliders.Updated "DatePickerSample" and "TimePickerSample" to set locale on picker initialization.
In "InputSample", fixed "alwaysLookFocused" checkbox so that unchecking the box actually results in the expected action.
In "ListPulldownSample", added CSS
overflow
property.In "PickerSample", replaced
onyx.PickerButton
withonyx.Button
in the "Picker with Static Button". Also replaced one-off date picker with generic name picker based ononyx.FlyweightPicker
.Updated
onyx.design
file, used by the Ares IDE.
layout
Removed
enyo.GridList
, the supporting kindenyo.GridFlyweightRepeater
, and "GridListSample". Developers should use the newenyo.DataGridList
kind instead.In
enyo.Arranger
, disabled translation for any panel containing video.In
enyo.ContextualLayout
, fixed miscalculation inapplyHorizontalPositioning()
that could cause contextual popups to bleed off the screen.In
enyo.FittableLayout
, added overloadconstructor()
method to ensure that correct CSS class is applied if control is explicitly marked as not right-to-left.In
enyo.GridListImageItem
, fixed documentation foruseSubCaption
property.In
enyo.ImageView
, fixed issue in which image would not render on initial load in Safari, but would after resize.In
enyo.List
, modified behavior of persistent swipeable items so that thepersistentItemVisible
flag is only set totrue
if a swipe has completed. Previously, it had been set totrue
on incomplete swipes as well, leading to unexpected behavior on the subsequent swipe.Also, reworked handling of right-to-left scripts.
Made several changes to
enyo.Panels
:Updated
isScreenNarrow()
to support Android Chrome browser and Android version 4.4 and higher.Modified
setIndex()
so that, whenwrap
istrue
, the index value wraps to its initial value when moving forward from the last index, and to its last value when moving backward from the initial index.Also in
setIndex()
, ensured that observers are sent the correct index value when value is clamped.Removed
disableTranslation
hack, as the webOS bug it worked around has been fixed.
In
enyo.PanZoomView
, fixed ownership of unscaled components.Updated
layout.design
file, used by the Ares IDE.
enyo-ilib
Updated
iLib
to version20140409-build-5.0-012
.Made numerous updates to
glue.js
:Updated
enyo.updateI18NClasses()
to apply theenyo-locale-non-latin
CSS class to the<body>
tag for languages having missing glyphs in either the Miso or Museo Sans fonts. This lets us avoid the "ransom note" effect, in which multiple fonts are used in the same word.Added the class
<enyo-locale>-non-italic
for locales that use scripts that do not commonly use italic fonts. This may be used in the Enyo CSS classes to determine whether or not to turn on italics for some parts of the UI.Added support for passing a locale string as an argument to
enyo.updateLocale()
.Added support for locale-safe string case-changing.
Restored code that updates locale settings at library load time.
Allowed caching of JSON files.
Added override to display Latin characters in Korean.
Added Croatian and Bosnian to list of languages using characters that have glyphs missing from Miso/Museo (
nonLatinLanguageOverrides
).Fixed ISO code for Polish language.
Minor updates for IE8 compatibility.
Restored Onyx-based samples.