First, we'd like to point out, that we have improved homepage of IMA.js and written a more complex documentation. Some of following change logs points to the new documentation.
Changelog
-
Introduced PageManagerHandlers that allows you to step into page management process by writing custom handlers. With this feature you can modify or cancel page transition process before it happens and react to it after it has happened. → PageManagerHandlers documentation.
-
Moved scroll position saving and restoration to dedicated PageManagerHandler. It's called PageNavigationHandler and you can see how it's used on a documentation page. This handler sets
window.history.scrollRestoration
property.
if ('scrollRestoration' in browserWindow.history) {
browserWindow.history.scrollRestoration = 'manual';
}
-
Extensions can obtain partial state from controller and preceding extensions. Whenever a
getState()
method is called in extension'sload
method it returns most recent page state. → Partial state documentation -
Added utility for executing asynchronous jobs in various ways. For now only
SerialBatch
is implemented. In near futureParallelBatch
andPipeline
execution methods will be implemented.
import SerialBatch from 'ima/execution/SerialBatch';
const serialBatch = new SerialBatch([asyncFunc, MyClass.staticAsync, myInstance.memberAsync]);
serialBatch.append(asyncFunc3);
serialBatch.execute(argument, argument2).then(results => {
// results = array of results from each function in the same order they were added to SerialBatch
});
-
Router passes an action object to PageManager carrying infomation about event that triggered the routing. This object also appears in
BEFORE_HANDLE_ROUTE
andAFTER_HANDLE_ROUTE
events and in PageManagerHandler callbacks. -
Using new React context API in ViewAdapter. #137
-
Allowed to override default
cache: false
option for requests withPOST
,PUT
,PATCH
orDELETE
method. 198be8c -
Added validation to EventBus listener to check if the event is actually an IMA_EVENT. #148
-
Fixed: Http options withCredentials is set to false by default.
-
Fixed bug that caused a blank error page to appear when an error in react component was thrown.
componentDidCatch
method was added to ViewAdapter. 603789e -
Fixed bug that caused
undefined
appearing in URL when callingWindow.pushState
orWindow.replaceState
in IE11 without the url argument specified (undefined). 8cd8f86 -
Fixed EventBus
unlistenAll
method to remove proper listeners. #148 -
Fixed Cookies bug - ensuring that cookies from server response are always in array before being set on client side. #154
-
Updated dependencies:
- babel-eslint:
^3.3.0
→^3.6.0
- eslint:
^4.19.1
→^5.4.0
- gulp:
github:gulpjs/gulp#c120a94
→^4.0.0
- gulp-babel:
^7.0.1
→^8.0.0
- jest:
^23.1.0
→^23.6.0
- prettier:
^1.13.5
→^1.14.3
- react:
16.2.0
→16.6.3
- react-dom:
16.2.0
→16.6.3
- babel-eslint: