Titanium JIRA Archive
Alloy (ALOY)

[ALOY-612] Make raw styles available at runtime

GitHub Issuen/a
TypeSub-task
PriorityHigh
StatusClosed
ResolutionFixed
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
Created2013-04-08T20:48:39.000+0000
Updated2013-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"

Comments

  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 3.1.2.201308091728 CLI 3.1.2.GA Node 0.10.13 Windows and Mac OS X. Closing.

JSON Source