This repository has been archived by the owner on Oct 30, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 214
ReleaseNotes0_6_0
Drew Folta edited this page May 22, 2013
·
18 revisions
Mojito 0.6.0 is now tagged and available on npm. List of changes between 0.5.9pr1 and 0.6.0 here.
- Mojito is now using
Y.Model.Vanilla
class on the server side forac.data
andac.pageData
, while usingY.Model
on the client side. This is a performance optimization, and while the API is still the same, on the server we do not support events on those model instances, while in the client, you might want to listen for changes in the model from the binder. In the future, Mojito will useY.Model.Base
instead ofY.Model.Vanilla
(when it becomes available in YUI) to restore support for events.
- If you modify the object returned by
ac.config.getAppConfig()
then those changes will be seen by all other mojits. This is becauseac.config.getAppConfig()
was reworked to improve performance by computing the app config once per request, and reuse across all the mojit instances in the same page using themojito-config-addon
. This might have unintended consequences on those other mojits so be careful. - Similarly, if you modify the object returned by
ac.config.getRoutes()
then those changes will be seen by all other mojits. This might have unintended consequences on those other mojits so be careful. - Due to a known issue, tunnel calls initiated via
mojitProxy.invoke()
ormojitProxy.refreshView()
to a server-only affinity controller (controller.server.js
) for child mojits now fails. (Child mojits are mojits that are inline children of composite mojits, includingHTMLFrameMojit
). See "Changed Tunnel Call Support" below for more details.
Since we no longer ship the instance configuration from server to client (since it is a security issue), deeply-nested specs will not have the children configured on the client. This affects mojits which have binders that call mojitProxy.invoke()
or mojitProxy.refreshView()
and a server-side-only controller (controller.server.js
). As a workaround you can define your child mojits as separate top-level specs (in application.json
) and refer to them using {base: 'new-name'}
.
If you where doing this in your application.json
:
"specs": {
"home": {
"type": "HTMLFrameMojit",
"config": {
"child": {
"type": "Foo",
"config": {
"color": "blue"
}
}
}
},
"container": {
"type": "Container", // controller which uses ac.composite
"config": {
"children": {
"a": {
"type": "Foo",
"config": {
"color": "blue"
}
},
"b": {
"type": "Bar",
"config": {
"size": "x-large"
}
}
}
}
}
}
You can change it to this:
"specs": {
"home": {
"type": "HTMLFrameMojit",
"config": {
"child": {
"base": "home_child"
}
}
},
"home_child": {
"type": "Foo",
"config": {
"color": "blue"
}
},
"container": {
"type": "Container", // controller which uses ac.composite
"config": {
"children": {
"a": {
"base": "container_a"
},
"b": {
"base": "container_b"
}
}
}
},
"container_a": {
"type": "Foo",
"config": {
"color": "blue"
}
},
"container_b": {
"type": "Bar",
"config": {
"size": "x-large"
}
}
}
- PR [#1103] Droping support for
nodejs
0.6. -
ac.staticAppConfig
was a private API used by Mojito to allocate static config for the app, and this is now removed. If you need access to the config, you can usemojito-config-addon
to accessac.config.getAppConfig()
.
- PR [#1103] Bringing
windows
to the front row by adding partial support for Mojito on windows. We plan to consolidate this going forward, but until after travis-ci.org supportswindows
environment as part of the build process to do sanity check, we cannot guarantee that everything will work onwindows
. -
mojito-composite-addon
andmojito-partial-addon
supportac.flush
from child mojits. - Command
npm test
is added to run all Mojito unit and functional tests with Phantomjs. Test results can be found under<mojitosrcdir>/artifacts/arrowreport
by default.npm run unit
,npm run func
,npm run doc
,npm run lint
are also added.