Enyo 2.3.0-pre.10 Release Notes
Welcome to Enyo 2.3.0-pre.10, a pre-release version of Enyo 2.3.0. The following items have changed since the Enyo 2.2 release. (Note that this list is not comprehensive; see the commit history in GitHub for a complete list of changes.)
Enyo
This release adds support for the MVC model of application development. This includes changes to properties to support bindings, computed properties, and property change observers; highlights are called out below.
Added
enyo.Application
, a new kind to include non-visible elements and rendered components. It is defined in the newApplication.js
file in thekernel
module.Added
data
module, which houses code used for manipulating data in an MVC environment. This module includes the following kinds:enyo.Model
, a special object whose properties define the schema (i.e., set of attributes) for a data record; it is not derived from any other Enyo kindenyo.Collection
, used for working with groups of modelsenyo.ModelController
, used in data bindingenyo.Store
, a runtime database of data recordsenyo.Source
, used for retrieving data from external services
Added data layer components (under
ui/data
)enyo.DataList
andenyo.DataGridList
, both subkinds of the abstractenyo.DataRepeater
kind.Added
enyo.Router
, a new kind that acts as an application controller that responds to changes in the Web page URL. This allows developers to modify application state on startup based on the initial URL, as well as track the current state by updating the URL as the application runs.enyo.Router
is defined in the newRouter.js
file in thekernel
module.Significantly expanded
kernel
module, adding new filesBinding.js
,Controller.js
,ViewController.js
, anddev.js
(in addition to the aforementionedApplication.js
andRouter.js
). Also made major additions to existinglang.js
andObject.js
files.Added new
ext
module, which contains several subkinds ofenyo.Binding
, as well asmacroize.js
(previously found in thekernel
module).Added new file
ready.js
in theboot
module.Added
enyo.View
as an alias forenyo.Control
.Under
tools
, added unit tests for new MVC functionality.
Introduced new API for getting and setting object property values.
The existing getter and setter methods,
getProperty()
andsetProperty()
, have been replaced by the simplerget()
andset()
. To retrieve a property's value, instead of callinggetProperty("<propertyName>")
on an object, you should now callget("<propertyName>")
.Likewise, when setting a property's value, instead of calling
setProperty("<propertyName>", <value>)
on a given object, you should now callset("<propertyName>", <value>)
.The framework's automatic support for
propertyName<Changed>
methods for published properties has not changed. So, for example, a call toset("myProp", 5)
will still automatically call themyPropChanged()
method (assuming that you've defined such a method, and that the value ofmyProp
was not already5
).In
Oop.js
, changedenyo.kind()
to delay most of its work until the kind is used for the first time. This behavior is enabled by default for named kinds with no static members; it may be turned off by setting the kind'snoDefer
property to a truthy value, as is done inenyo.Object
,enyo.Component
,enyo.Control
, andenyo.Signals
.In a related development, kinds may now define "protected statics". These are static members designed for use only within the given kind and its subkinds. The presence of protected statics will not prevent the deferral of kind creation, whereas the presence of regular statics will.
Finally, as a result of these modifications, in the configuration object passed into
enyo.kind()
, the value of thekind
property will need to be quoted (e.g.,kind: "enyo.Control"
). Previously, the quotation marks were optional.To improve performance, modified internal code in Enyo Core so that override methods use
enyo.inherit()
, following the double function pattern outlined by dcl.js. Application code will continue to use the existingthis.inherited()
syntax.In
enyo.Component
, added new functionality and addressed outstanding issues:New
componentOverrides
property simplifies the creation of subkinds by letting developers alter items in the superkind'scomponents
block without having to copy all of the block's contents into the subkind.New methods
startJob()
andstopJob()
are used to manage job methods that should be associated with a specific component; they are automatically stopped if the component is destroyed.New
throttleJob()
method allows you to execute a method immediately and then prevent the method from being called again for a specified period of time.New
silence()
andunsilence()
methods are used to stop and restore event propagation through the component. This is useful when you're changing a lot of properties and want to keep observers from reacting tochanged
events until all of your work is complete.Added special handling for notifications originating from
addComponent()
.To reduce startup time, deferred creation of
__jobs
hash until it's actually used.Fixed event dispatching so that delegated events are only dispatched to the immediate owners; added related test case to
ComponentDispatchTest.js
.
Added support for progress events during asynchronous activities. Progress events are sent by
enyo.Async.sendProgress()
and handled byenyo.Ajax.updateProgress()
. Also added associated unit test.Added HTML5 fullscreen support to Enyo controls. Changes include modification of
Control.js
and additions offullscreen.js
and "FullscreenSample". (This is temporarily disabled for webOS because it isn't working yet on the OS side.)Added support for loading framework source from embedded on-device location.
Added new kinds
enyo.Media
andenyo.Audio
. Also addedenyo.Anchor
, which implements an HTML anchor (<a>
) tag;title
andhref
are available as published properties.Moved code for drawers, previously in
onyx.Drawer
, into the core Enyoui
library as the new kindenyo.Drawer
. Also added newonDrawerAnimationEnd
event, which may be used to detect changes in the drawer's open/closed status.Moved
focus()
andblur()
methods fromenyo.Input
toenyo.Control
, since they are generally useful for any DOM node. Also inenyo.Control
, fixed behavior ofgetStyle()
and added protected propertyrtl
, which indicates direction of layout.rtl
should be set totrue
for right-to-left scripts (default isfalse
). This property will typically only be used by developers who are creating their own subkinds ofenyo.Control
.Added
enyo.design
, which is used to specify design information for the Ares designer tool.Added new
version.js
file, which definesenyo.version
, a string that indicates the framework version (currently,2.3.0-pre.10-dev
). Then, addedversion.js
to list of boot scripts inenyo.js
(so thatenyo.version
is available to non-minified files) and to list of dependencies inpackage.js
.Added
CHANGELOG.md
, which is intended to be a continuously-updated list of changes that affect existing APIs.Added
jobs.js
, which definesenyo.jobs
, a low-level mechanism for queueing tasks and sorting them by priority. Normally, it will not be used by application code. Also added related sample, "AnimatorSample".In
enyo.Object
, added newbindSafely()
method, which acts likeenyo.bind()
, but handles the case in which the bound method is called after the object has been destroyed.In addition, removed
enyo.Object.overload()
and rewroteenyo.Object.addGetterSetter()
to make use ofenyo.getPath.fast()
andenyo.setPath.fast()
, which were added tolang.js
Finally, in
set()
method, added documentation for optionalforce
parameter; if true, the property whose value is being set will be updated (and notifications will be sent) even if the passed-in value is the same as the existing value.In
job.js
, addedenyo.job.throttle()
, which enables job throttling outside the context of a specific component.In
dispatcher.js
, addedenyo.dispatcher.stopListening()
, which removes listeners for a particular kind of event, andenyo.unmakeBubble()
, which stops listening for events bubbled byenyo.makeBubble()
. Also added support foranimationEnd
andwebkitAnimationEnd
events.Renamed
phonegap.js
ascordova.js
and modifiedenyo.ready()
to add listener fordeviceready
event before setting up signals for other Cordova events. Also added Enyo support for thelocalechange
event supplied by cordova-webos (i.e., signals will be sent).In
loader.js
andboot.js
, fixed issue causingenyo.load()
to not wait until all files have loaded before calling the callback function.In
boot.js
, changedenyo.ready()
to callenyo.asyncMethod()
instead ofrun()
, to guarantee that all callbacks are asynchronous. Also added "charset"` to the generated script elements for Internet Explorer.Added new method
enyo.easedComplexLerp()
inanimation.js
and put it to use inAnimator.next()
. The new method allows for more complex animations than are possible with the existingenyo.easedLerp()
.In
enyo.Async
, fixed issue causing exceptions when setting properties on the subkindenyo.Ajax
. (Theconstructor()
method was missing a call tothis.inherited(arguments)
.)In
enyo.Ajax
, changedcontentType
check from exact string match to regular expression, to allow values such as'application/json; charset=utf-8'
. Also, fixed improper retention offailed
state between calls togo()
and removed check for webOS platform when determining whether synchronous (blocking) AJAX requests are allowed.Added
overrideCallback
property toenyo.JsonpRequest
, along with inline documentation and associated unit test.In
xhr.js
, fixedrequest()
to only apply cache-control code to iOS 6, not to iOS versions greater than 6.In
modal.js
, updatedrelease()
to search for a passed-in target to release from the list of captured events, instead of simply releasing the last captured event. This fixes an issue in which popups could close unexpectedly.In
FloatingLayer.js
andPopup.js
, modifiedenyo.FloatingLayer
so it recreates itself whendocument.body
is wiped out by a fresh render.Added detection of webOS 4/Open webOS, Tizen, BlackBerry PlayBook, and Internet Explorer 11 platforms to
platform.js
.In
Oop.js
, fixed issue inenyo.kind.features.push()
that could allow feature mixins to be run more than once, overwriting the custom subclass method. Also addedenyo.kind.allowOverride
flag for use in Ares; it allows flagged kinds to be redefined.In
UiComponent.js
, modifiedgetBubbleTarget()
to allow events to bubble properly from a control to an owning component that is not a UiComponent. Also fixed issue in which setting theaddBefore
property could update thechildren
array but not update thecontrols
array with the same ordering.In
Repeater.js
, updateddecorateEvent()
to prevent index value from being overwritten when dealing with nested repeaters.In
RichText.js
, updatedvalueChanged()
to prevent scroll reset on keypress. Also added proper support fordisabled
property, including newdisabledChanged()
method.Modified
enyo.Scroller
to provide current scroll bounds in generated events. Also, updated documentation forgetScrollBounds()
.In
enyo.TouchScrollStrategy
, added published propertyinterval
, which facades the animation time step fromenyo.ScrollMath
.In
enyo.TransitionScrollStrategy
, added stub version ofintervalChanged()
.In
enyo.ScrollMath
, modifiedstop()
to avoid unnecessary calls to system timer code.In
enyo.Image
, added new published propertyalt
, which corresponds to the"alt"
attribute of an HTML<img>
tag.Updated
msevents.js
to include button status info in generated events.Modified core code so that IE8 passes unit tests. Also, fixed positioning issues affecting IE8 in
dom.js
.Also in
dom.js
, added methodsenyo.dom.hasClass()
,enyo.dom.addClass()
, andenyo.dom.removeClass()
. Put the new methods to use inenyo.Control
to prevent duplication of effort across multiple renders.In
drag.js
, reworked code for cloning events inbeginHold()
, as it was causing crashes inImageView
.Made several changes to
lang.js
:Added fast implementations of
enyo.setPath()
andenyo.getPath()
that only work with local property names. These are used internally by a new unit test for published properties; they are not for public use.Modified
enyo.setPath()
to takeforce
parameter into account when deciding whether to send change notifications to observers, and fixedenyo.getPath()
to return null if path is not defined.Updated
enyo.trim()
to use JavaScript's built-intrim()
method when available.
In
langTest.js
, added tests forenyo.isObject()
andenyo.isArray()
.In
ready.js
, added legacy WebKit support forenyo.ready()
.Fixed
enyo.Drawer
and "GestureSample" to stop propagation of animation events.
Onyx
Added new
onyx.Submenu
kind, which enables the creation of nested menus. Instances are meant to live alongsideonyx.MenuItem
objects within anonyx.Menu
.Added
version.js
file, which specifies current version of Onyx library (enyo.version.onyx
). Initial value is2.3.0-pre.10-dev
. Also addedversion.js
to list of dependencies inpackage.js
.In
onyx.Menu
, added support for specifying a menu's scroll strategy.Added
onyx.design
, which is used by libraries to specify their associated design information. It replacesdesign.js
and is discoverable viapackage.js
.Added library manifest file,
deploy.json
.Moved
onyx.Drawer
from Onyx library into Enyo core, asenyo.Drawer
, withonyx.Drawer
now aliased toenyo.Drawer
.Cleaned up code for better compatibility with JSHint 2.1, which is used in Travis CI tests.
In
Popup.js
, modifiedgetScrimZIndex()
to ensure selection of proper z-index values for popups that should appear on top of other popups. Also made static fields protectedStatic to hide their internal state.In
ContextualPopup.js
, added ability to setontap
handlers for the action buttons.Tweaked the
Button
,IconButton
, andSlider
controls to work better on FirefoxOS.In
DatePicker.js
, fixed issue causing DatePicker controls to be unusable inside a Repeater.In
IntegerPicker.js
, fixed issue inselectedChanged()
causing two-way data bindings to not work properly. Also fixed max/min validation invalueChanged()
.In
MoreToolbar.js
, fixed issue that could cause a crash when resizing a window.In
TimePicker.js
, fixed issues causing two-way data bindings to not work properly. Also moved check for nullis24HrMode
property after globalization/localization code.In "SliderSample", fixed issues preventing proper updating of values on slider movement.
Layout
Added several new layout-related kinds:
enyo.ContextualLayout
, a layout strategy intended for use in a popup in a decorator/activator scenario, where the popup is positioned relative to the activating controlenyo.FittableHeaderLayout
, a subkind ofenyo.FittableColumnsLayout
in which items are laid out in a set of naturally-sized vertical columns, with one column designated to expand horizontally to fill any leftover spaceenyo.GridList
, which extendsenyo.List
to display items in a grid pattern, with multiple items per row based on the available container widthenyo.GridListImageItem
, a convenience component that may be used inside anenyo.GridList
to display an image gridenyo.GridFlyweightRepeater
, which extendsenyo.FlyweightRepeater
to display items in a grid pattern
Added
version.js
file, which specifies current version of Layout library (enyo.version.layout
). Initial value is2.3.0-pre.10-dev
. Also addedversion.js
to list of dependencies inpackage.js
.Added
layout.design
, which contains information on the layouts available in the Layout library; it replacesdesign.js
and is loaded by default.Added library manifest file,
deploy.json
.In
enyo.List
, added support for horizontal layouts; also removed unnecessary call toinEvent.preventDefault()
and fixed issue causing horizontal lists to not have a scrollbar until they are resized.In
enyo.Panels
, added methodselectPanelByName()
, which selects a pane based on its name instead of its index. Also, fixedremoveControl()
to correctly update the active panel if you remove the one that's currently selected, as well as addressing issue causing problems with panel transition animations.Modified
enyo.Arranger
to allow panels to opt out of acceleration/transform on a per-instance basis. Also allowed sliding panel acceleration to be set toauto
.In
FittableLayout.css
, added special case for tables in a FittableColumnsLayout. Also added special case for locales with right-to-left text alignment.Updated "ListPulldownSample" to use Flickr search API instead of Twitter API.
Canvas
Added
Line.js
, which definesenyo.canvas.Line
, a Canvas control that draws a line according to the developer's specifications.Added documentation for existing Canvas controls.
Added
version.js
file, which specifies current version of Canvas library (enyo.version.canvas
). Initial value is2.3.0-pre.10-dev
. Also addedversion.js
to list of dependencies inpackage.js
.Added library manifest file,
deploy.json
.
Globalization/Localization
Introduced
enyo-ilib
, a wrapper for the ilib globalization/internationalization library. This is a replacement for the now-deprecatedg11n
library.Fixed
deploy.sh
to not create duplicate subdirectories.
Bootplate
Introduced new
bootplate-mvc
repo, an application template using the new MVC pattern.In
deploy.sh
, fixed issue causing problems when development path name contains whitespace.In
.gitmodules
, replaced absolute URL paths to github.com with relative paths to allowing forking of the project.
Samples
Added new samples "DataListSample", "DataRepeaterSample", and "ComponentOverrideSample".
Removed obsolete "Playground" sample.
In
sampler
repo's.gitmodules
file, replaced absolute URL paths to github.com with relative paths to allowing forking of the project.In Sampler app's
App.js
file, added platform checks for improved compatibility with Windows 8 and Windows Phone 8. Also made fix to not clobber existing namespaces.Updated samples with "no telephone number detection" and "no translation" meta tags.
In "ButtonSample", modified sample control to use
.png
file instead of.ico
file for improved compatibility with Windows Phone 8 browser.In "PlatformSample", modified
updateWindowSize()
for improved compatibility with IE8.In "RepeaterSample", modified
setupItem()
to stop event propagation.Fixed "ListPulldownSample" to work properly as a Windows 8 application.
In "ContextualPopupSample", fixed double-inclusion of Onyx source.
Revised "PopupSample" to test fix for unexpected dismissal of popups.
Tools
Added support for Travis CI continuous integration system, which uses JSHint and PhantomJS to run tests on repos after each commit.
Added
.jshintrc
files to the root folder of most repos; these are now used when writing new code and validating old code. Set"es3": true
so that JSHint detects trailing commas. (Subsequently removed trailing commas from a number of source files.)Updated minifier support in Enyo to use
less 1.3.3
anduglify-js 2.2.5
. Flag tweaks should result in ~5% reduction in gzipped-file size.Added support for new
"beautify"
option in minification and deployment scripts,tools/minify.js
andtools/deploy.js
. When this switch is activated (by specifying-B
on the command line), the scripts will create output files in which line breaks are not removed from code. The improvement in human-readability makes the beautified files useful for debugging.Made numerous changes to enable use of
deploy.js
andminify.js
outside of the source tree.In
deploy.js
, added support for manifest file (deploy.json
). Also added-T
/--test
switch to generate a build directory in the source tree for testing.Addressed problems with asset paths in
deploy.js
andminify.js
seen when deploying apps that don't follow the Bootplate pattern.In
minify.js
, updatedconcatCSS()
to handle CSS rules such asurl("")
,url()
, andurl('')
.Modified
walker.js
to keep package name in re-mapped sources, to allow deployment of multiple themes in a single library.Updated
lessc.js
to work with multiple.less
files inpackage.js
; also added-w
flag, which watches the file and any dependencies, and recompiles if changes are detected.
Work in Progress
The following components are considered "Work-in-Progress" (WIP), meaning code has been committed but is still under development and should not be considered API-stable.
All WIP components are included in a wip-package.js
rather than the standard package.js
, so apps will not have access to these kinds by default. If you need to use them, you may include the relevant wip-package.js
file in your app, but be aware that breaking changes are likely.
Layout
enyo.FlexLayout
and related kinds
Onyx
onyx.TabBar
,onyx.TabBar.Item
, andonyx.TabPanels