We are approaching the final release of Tabris.js 2.0 and today we are happy to announce Tabris.js 2.0 RC2. While we put the final touches on the Tabris.js features and apis, there have been several changes to the Tabris.js codebase since RC1. We also deliver some nifty new features, performance improvements and a whole slew of bugfixes.
Updated launcher experience
In an ongoing effort to modernize the Tabris.js app, we have restyled the UI in a shiny blue tint. Additionally we now allow to scan a barcode containing an URL to a Tabris.js app. However, when building an app on tabrisjs.com we will not bundle the launcher app anymore but instead you should use the URL input in the developer console.
Support for JSX
Support for a declarative UI is one of the most requested features for Tabris.js. Therefore we added support for declerative UI via the JSX syntax. JSX is an embeddable XML-like syntax supported by TypeScript.
When using TypeScript, support for JSX requires no extra dependencies, simply generate a new TypeScript project using
tabris init and create a file with the .tsx file extension. The TypeScript compiler handles all the processing for you. The following snippet demonstrates its usage in Tabris.js:
Since the XML markup is based on the TypeScript definitions, a decent IDE is able to provide auto completion and docs on the elements and attributes. For more details on the JSX integration check the Tabris.js RC2 release notes and the converted input example.
Initial API for file system access
Reading and writing local files is a common scenario in many apps. Starting with this release, we are introducing a native file system API via
tabris.fs. The API allows to read, write and remove files from the two storage locations cache and files.
let data = new Uint8Array([1, 2, 3]); tabris.fs.writeFile(fs.filesDir + '/test.data', data) .then(() => console.log( data.byteLength + ' bytes written')) .catch(err => console.error(err));
As of now we only support to interact with files in the base directory of the storage locations. We will expand the file system API with support for directories in the coming releases.
Improvements on CollectionView
We introduced a new method
CollectionView that replaces the current items with new ones. To load new data into a
CollectionView, use this method instead of setting the
itemCount property. The reasoning behind the method call is to make it clear that the call will always change the content of the
Renamed properties on Slider and ProgressBar
The color of the indicator on Slider and ProgressBar widgets can now be controlled by the new property
tintColor. The previously supported
textColor served the same purpose but is now removed.
Windows adds support for various APIs
The windows client has made great progress by adding support for various existing Tabris.js APIs. We now have full support for websockets,
tabris.app events like
tabris.app properties like
version and more. See the Tabris.js RC2 release notes for details.
There are even more changes coming with Tabris.js RC2. If you’d like to know more, have a look at the Tabris.js GitHub project release page. And if you are just starting out with Tabris.js, check out the Tabris.js ‘Getting Started’ ebook.
We are rapidly approaching a final Tabris.js 2.0 release so all feedback is welcome.