[ALOY-612] Make raw styles available at runtime
GitHub Issue | n/a |
---|---|
Type | Sub-task |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-05-24T19:32:29.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.2.0, 2013 Sprint 11 |
Components | Runtime, Styling |
Labels | notable, qe-testadded |
Reporter | Tony Lukasavage |
Assignee | Tony Lukasavage |
Created | 2013-04-08T20:48:39.000+0000 |
Updated | 2013-08-23T19:44:26.000+0000 |
Description
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"
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.Verified working as expected with the provided sample case. Titanium SDK 3.1.2.GA Alloy 1.2.1-cr2 Appcelerator Studio 3.1.2.201308091728 CLI 3.1.2.GA Node 0.10.13 Windows and Mac OS X. Closing.