Titanium JIRA Archive
Alloy (ALOY)

[ALOY-652] Preprocess style for runtime

GitHub Issuen/a
TypeSub-task
PriorityHigh
StatusResolved
ResolutionFixed
Resolution Date2013-06-03T21:27:35.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.2.0, 2013 Sprint 11
ComponentsRuntime, Styling, Titanium SDK
Labelsnotable, qe-testadded
ReporterTony Lukasavage
AssigneeUnknown
Created2013-05-01T17:38:37.000+0000
Updated2018-03-07T22:25:44.000+0000

Description

Styles are currently placed in the runtime style modules as the JSON-safe version used at compile time. This is because during compilation things like the Titanium and Alloy namespace, L(), WPATH(), etc... are all invalid. They are only valid in an Alloy Titanium environment. Since this will obviously be the case at runtime and we need styles to run as quickly as possible, the styles should be pre-processed before being put into the runtime modules. This will ensure that no unnecessary processing is performed at runtime.

Comments

  1. Tony Lukasavage 2013-06-03

    PR: Test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-612 To pass the functional test for this app, we can use the ALOY-612 app which tested exposing the raw styles at runtime. With the addition of the code in the accompanying PR, these styles should output fully processed with runtime values now. Prior to this PR, a height may have looked like this:
       height: '__ALLOY_EXPR__--Ti.UI.SIZE'
       
    but it should now fully translate to the values relevant to the current platform with no additional processing necessary, like this for ios:
       height: "SIZE"
       

JSON Source