[ALOY-612] Make raw styles available at runtime

GitHub Issuen/a
Resolution Date2013-05-24T19:32:29.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.2.0, 2013 Sprint 11
ComponentsRuntime, Styling
Labelsnotable, qe-testadded
ReporterTony Lukasavage
AssigneeTony Lukasavage


Right now styles are only available at compile time. We need to make the styles available at runtime so that they can be manipulated due to user interactions or other runtime information. This will involve converting some of the most complex code in alloy's node.js code into Titanium compatible code. Fortunately most of it should be pure JS, but undoubtedly this will take some time. The generated, ordered style arrays created during the alloy compile phase should be made available in runtime modules. The modules should simply make these ordered arrays available at runtime and a separate API will be used to operate on them in order to do runtime styling of UI components. The style modules should correspond in name to their runtime controllers and will be housed in the "Resources/alloy/styles" folder. For example, the runtime style module for the index controller woud be found at "Resources/alloy/styles/index.js"


  1. Tony Lukasavage 2013-05-24 PR: https://github.com/appcelerator/alloy/pull/135 Test: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-612 Functional testing:

    Go to cloned repo

    jake app:run dir=testing/ALOY-612

    Click the label at the top of the app

    Check the console log output and assert that the runtime style entry that is output corresponds to the label

    Repeat steps 3-4 for all buttons in the app

    If clicking the UI elements results in printing the runtime style object for that ID, then the ticket is verified.
  2. Federico Casali 2013-08-23 Verified working as expected with the provided sample case. Titanium SDK 3.1.2.GA Alloy 1.2.1-cr2 Appcelerator Studio CLI 3.1.2.GA Node 0.10.13 Windows and Mac OS X. Closing.

JSON Source