Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1035] Themes: Assets images not being applied as expected

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2014-06-03T14:34:14.000+0000
Affected Version/sAlloy 1.4.0
Fix Version/sAlloy 1.4.0
ComponentsStyling, Tooling
Labelsqe-3.3.0, qe-testadded, regression
ReporterFederico Casali
AssigneeTim Poulsen
Created2014-06-02T21:13:25.000+0000
Updated2014-06-06T22:01:32.000+0000

Description

Problem description

Themes Assets images are not properly used when the image files are put in the "themes//assets" folder instead that in platform specific folder "themes//assets/" Reproducible on iOS, Android and MobileWeb. Works fine using Alloy 1.3.1 (so is a regression).

Steps to reproduce

Get the code from https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-577 1. Run the App on iOS, Android or MobileWeb Result: two Alloy Icons are displayed (on a red background, as correctly applied from the themes/red/styles/app.tss). Icons are the red.png and blue.png icons inside "app/assets/" folder. See screenshot_140_red.png Expected result: a different icon should be displayed on top (the one in "app/themes/red/assets/red.png"). See screenshot_131_red.png 2. Change config.json file:
"theme":"red"
to
"theme":"blue"
then build and run. Result: same two Alloy Icons are displayed (on a blue background, as correctly applied from the themes/blue/styles/app.tss) . Icons are the red.png and blue.png icons inside "app/assets/" folder. See screenshot_140_blue.png Expected result: a different icon should be displayed on bottom (the one in "app/themes/blue/assets/blue.png"). See screenshot_131_blue.png

Further steps

As explained in the description, the issue seems to be reproducible only when the Assets image files are put in the "app/themes/assets/" folder. If put in a specific platform folder, for example iphone, android or mobileweb, they work as expected. 3. After step #2, create a platform folder, for example: "app/themes/blue/assets/mobileweb". Run on MobileWeb. Result: Image in "app/themes/blue/assets/mobileweb/" folder is correctly displayed (just like screenshot_131_blue.png)

Attachments

FileDateSize
screenshot_131_blue.png2014-06-02T21:13:25.000+000041083
screenshot_131_red.png2014-06-02T21:13:25.000+000066176
screenshot_140_blue.png2014-06-02T21:13:25.000+000035076
screenshot_140_red.png2014-06-02T21:13:25.000+000058734

Comments

  1. Tim Poulsen 2014-06-03

    PR: https://github.com/appcelerator/alloy/pull/424 Merged to master and 1_4_X Functional test: Test using the steps to reproduce above. You can also use the ALOY-577 test app. Build and check the Resources/iphone directory for the asset images. Then, change the theme name in config.json and build again. The theme assets have been replaced correctly and no orphan assets remain.
  2. Federico Casali 2014-06-06

    Verified fixed also using latest Alloy 1.4.0-beta2 TiSDK 3.3.0.v20140605150555 Alloy 1.4.0-beta2 Appcelerator Studio 3.3.0.201405271647 CLI 3.3.0-beta2 Closing.

JSON Source