[ALOY-754] Alloy: Add theme-support for config.json
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2014-04-11T19:09:08.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Alloy 1.4.0, 2014 Sprint 07 |
| Components | Styling, Tooling |
| Labels | qe-testadded |
| Reporter | Fokke Zandbergen |
| Assignee | Tim Poulsen |
| Created | 2013-07-22T14:36:18.000+0000 |
| Updated | 2014-04-23T23:37:37.000+0000 |
Description
Alloy's theming-feature is awesome when it comes to branding white-label apps.
However, these white-label apps often also require some contact information and stuff like that to change for each distribution. The most logical place to put these, would be the
config.json file. And even for styling, setting some base colors in config.json to use in the TSS is often more efficient then overwriting each color using themed .tss files.
The problem however is... config.json does not support themes.
How about adding support to put a config.json in your /app/themes/myTheme folder, which then would (deep-)extend the base config.json file?
As a workaround, you can copy the compiled
Resources/alloy/CFG.jsto yourapp/themes/myTheme/assets/alloy/CFG.jsand make any changes there. But of course this would require you to sync changes inconfig.jsonto the themedCFG.jsfiles.PR: https://github.com/appcelerator/alloy/pull/246
PR needs work, detailed in this comment: https://github.com/appcelerator/alloy/pull/246#issuecomment-25405595
The PR as it stands now is causing failures with existing apps and test. Specifically, advanced/themes sample app, and tests ALOY-577 and ALOY-629 fail when built using this PR.
[~skypanther] fixed it in the PR.
The latest PR passes all tests except ALOY-887 which deliberately includes an unclosed comment. That was fixed in PR 312, which must not be present in your branch.
Are you saying it is OK or needs another fix?
It should be handled fine when Tony merges your PR. I think it's OK as-is.