[ALOY-652] Preprocess style for runtime
GitHub Issue | n/a |
---|---|
Type | Sub-task |
Priority | High |
Status | Resolved |
Resolution | Fixed |
Resolution Date | 2013-06-03T21:27:35.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.2.0, 2013 Sprint 11 |
Components | Runtime, Styling, Titanium SDK |
Labels | notable, qe-testadded |
Reporter | Tony Lukasavage |
Assignee | Unknown |
Created | 2013-05-01T17:38:37.000+0000 |
Updated | 2018-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.
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:
but it should now fully translate to the values relevant to the current platform with no additional processing necessary, like this for ios: