πŸ”– Release 7.244

πŸ”– Release 7.244

December 11, 20243 minutes

Freebox integration improvement, animations and transitions with CSS renderer, cleaning... Everything you need to know about 7.244 version

✨ What’s new ?

Core

Removal of getKeyByName and getKeyByKeyConst inside AbstractKeyMapping

Those 2 methods were implying to store 2 indexed map of key whereas there was no real use cases for it.

On the other side, a new method getKeyByEvent has been created. It requires to be implemented and should allow mapping between native key event and Dana key mapping system.

Removal of non-cubic bezier easing

Non-cubic easing like “elastic” or “bounce” have been removed from AbstractEasing. There are not supported on all rendering engine and are not intended to.

Add letter spacing support

You can now define a letterSpacing property to describe spacing between letters. See property documentation.

CSS

Supports animations and transitions

You can now enable animation and transitions when using CSS renderer. To do so, add enableAnimation: true to deviceobject. For more information, see profiles documentation.

Danger

Animations and transitions can have an impact on performance perception, in particular on low-end device. Always ensure that quality is good enough on the device before activating this flag.

Android

QT / QML

Simplify deployment and debug on Freebox

Options --deploy and -ip= are now available during grunt serve command. Some extra parameters will be required to be filled inside freebox profiles. Logs are automatically retrieve from the STB and available in a file. Look at instructions during grunt serve to retrieve them.

Linter

Prevent rename on import

A new rule as been added to prevent rename of import.

For example, those examples are incorrect :

import $MyView from "@View";
import View from "@View";

The correct notation should be as follows :

import $View from "@View";

Globals added at linter level

The following globals have been added inside our custom linter :

  • Android,
  • TVOS,
  • Xbox,
  • Qt,
  • Native,
  • DEV_MODE,
  • RTL_MODE,
  • defineImplementation

If you currently have those globals defined in your .eslintrc, you can remove then.

Global tooling

It is now possible to develop with Dana on Windows !

🐛 What’s fixed ?

VAST stabilization

Many fixes have been made to VAST support. It impacts all devices that currently support VAST (Android, TVOS and shaka player use cases).

CSS

Many fixes have been made to CSS renderer including but not exhaustively :

  • issues with LG pointer
  • errors when deleting child or interacting with deleted child
  • colors (background, text color) not displayed on older browser

Lightning

An alignment with other renderer engine have been made regarding max-width property. Until text reach max-width value, width of the TextPrimitive should match minimal size that wrap the text. Once max-width is reach, width of the TextPrimitive should always match max-width.

⬆️ Migration guide

Update AndroidTV template

Create a MainApplication

Create a MainApplication.java next to your MainActivity.java with following content :

import android.graphics.Color;

import com.dana.androidtv.v8_runtime.DanaApplication;
import com.dana.androidtv.v8_runtime.ProjectBuildConfig;

public class MainApplication extends DanaApplication {
    @Override
    public void onCreate() {
        ProjectBuildConfig.setEntrypoint(BuildConfig.ENTRYPOINT);
        ProjectBuildConfig.setBackgroundColor(Color.WHITE);
        ProjectBuildConfig.setRoot(R.id.rendererView);
        ProjectBuildConfig.setDebugMode(BuildConfig.DEBUG);
        ProjectBuildConfig.setInspectorEnabled(BuildConfig.INSPECTOR_ENABLED);
        ProjectBuildConfig.setInspectorBreakOnFirstLine(BuildConfig.INSPECTOR_BREAK_FIRST_LINE);
        ProjectBuildConfig.setHomeRailsJobPeriodMS(BuildConfig.HOMERAILS_JOB_PERIOD_MS);

        super.onCreate();
    }
}

Do not forget to set up the package name at the top of the file.

In MainActivity.java, remove constructor or at least all calls to ProjectBuildConfig.

In your AndroidManifest.xml, fill the application name with .MainApplication :

 <application
        android:name=".MainApplication"

📝 Further reading