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.jsfile in thekernelmodule.Added
datamodule, 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.DataListandenyo.DataGridList, both subkinds of the abstractenyo.DataRepeaterkind.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.Routeris defined in the newRouter.jsfile in thekernelmodule.Significantly expanded
kernelmodule, adding new filesBinding.js,Controller.js,ViewController.js, anddev.js(in addition to the aforementionedApplication.jsandRouter.js). Also made major additions to existinglang.jsandObject.jsfiles.Added new
extmodule, which contains several subkinds ofenyo.Binding, as well asmacroize.js(previously found in thekernelmodule).Added new file
ready.jsin thebootmodule.Added
enyo.Viewas 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 ofmyPropwas 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'snoDeferproperty 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 thekindproperty 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
componentOverridesproperty simplifies the creation of subkinds by letting developers alter items in the superkind'scomponentsblock 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 tochangedevents until all of your work is complete.Added special handling for notifications originating from
addComponent().To reduce startup time, deferred creation of
__jobshash 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.jsand additions offullscreen.jsand "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.Mediaandenyo.Audio. Also addedenyo.Anchor, which implements an HTML anchor (<a>) tag;titleandhrefare available as published properties.Moved code for drawers, previously in
onyx.Drawer, into the core Enyouilibrary as the new kindenyo.Drawer. Also added newonDrawerAnimationEndevent, which may be used to detect changes in the drawer's open/closed status.Moved
focus()andblur()methods fromenyo.Inputtoenyo.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.rtlshould be set totruefor 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.jsfile, which definesenyo.version, a string that indicates the framework version (currently,2.3.0-pre.10-dev). Then, addedversion.jsto list of boot scripts inenyo.js(so thatenyo.versionis 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.jsFinally, in
set()method, added documentation for optionalforceparameter; 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 foranimationEndandwebkitAnimationEndevents.Renamed
phonegap.jsascordova.jsand modifiedenyo.ready()to add listener fordevicereadyevent before setting up signals for other Cordova events. Also added Enyo support for thelocalechangeevent supplied by cordova-webos (i.e., signals will be sent).In
loader.jsandboot.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.jsand 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, changedcontentTypecheck from exact string match to regular expression, to allow values such as'application/json; charset=utf-8'. Also, fixed improper retention offailedstate between calls togo()and removed check for webOS platform when determining whether synchronous (blocking) AJAX requests are allowed.Added
overrideCallbackproperty 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.jsandPopup.js, modifiedenyo.FloatingLayerso it recreates itself whendocument.bodyis 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.allowOverrideflag 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 theaddBeforeproperty could update thechildrenarray but not update thecontrolsarray 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 fordisabledproperty, including newdisabledChanged()method.Modified
enyo.Scrollerto 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.jsto 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.Controlto 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 takeforceparameter 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.Drawerand "GestureSample" to stop propagation of animation events.
Onyx
Added new
onyx.Submenukind, which enables the creation of nested menus. Instances are meant to live alongsideonyx.MenuItemobjects within anonyx.Menu.Added
version.jsfile, which specifies current version of Onyx library (enyo.version.onyx). Initial value is2.3.0-pre.10-dev. Also addedversion.jsto 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.jsand is discoverable viapackage.js.Added library manifest file,
deploy.json.Moved
onyx.Drawerfrom Onyx library into Enyo core, asenyo.Drawer, withonyx.Drawernow 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 setontaphandlers for the action buttons.Tweaked the
Button,IconButton, andSlidercontrols 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 nullis24HrModeproperty 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.FittableColumnsLayoutin 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.Listto 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.GridListto display an image gridenyo.GridFlyweightRepeater, which extendsenyo.FlyweightRepeaterto display items in a grid pattern
Added
version.jsfile, which specifies current version of Layout library (enyo.version.layout). Initial value is2.3.0-pre.10-dev. Also addedversion.jsto list of dependencies inpackage.js.Added
layout.design, which contains information on the layouts available in the Layout library; it replacesdesign.jsand 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.Arrangerto 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.jsfile, which specifies current version of Canvas library (enyo.version.canvas). Initial value is2.3.0-pre.10-dev. Also addedversion.jsto 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-deprecatedg11nlibrary.Fixed
deploy.shto not create duplicate subdirectories.
Bootplate
Introduced new
bootplate-mvcrepo, 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
samplerrepo's.gitmodulesfile, replaced absolute URL paths to github.com with relative paths to allowing forking of the project.In Sampler app's
App.jsfile, 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
.pngfile instead of.icofile 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
.jshintrcfiles to the root folder of most repos; these are now used when writing new code and validating old code. Set"es3": trueso 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.3anduglify-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.jsandtools/deploy.js. When this switch is activated (by specifying-Bon 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.jsandminify.jsoutside of the source tree.In
deploy.js, added support for manifest file (deploy.json). Also added-T/--testswitch to generate a build directory in the source tree for testing.Addressed problems with asset paths in
deploy.jsandminify.jsseen when deploying apps that don't follow the Bootplate pattern.In
minify.js, updatedconcatCSS()to handle CSS rules such asurl(""),url(), andurl('').Modified
walker.jsto keep package name in re-mapped sources, to allow deployment of multiple themes in a single library.Updated
lessc.jsto work with multiple.lessfiles inpackage.js; also added-wflag, 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.FlexLayoutand related kinds
Onyx
onyx.TabBar,onyx.TabBar.Item, andonyx.TabPanels