PDA

View Full Version : Strange behaviour when working with Themer themes and Architect



kevin.flueckiger
14 Feb 2017, 1:16 AM
Hi there,

First of all, I'm on Architect 4.1.1 and Ext 6.2.1

I'm trying to set-up a workspace with a theme, which will be shared amongst apps in the workspace. So I created a workspace and a theme with SenchaCmd, then edited the theme with Themer. So far so good. I can now save an Architect project in this workspace and it shares the ext folder, still everything as expected. Then I took two approaches trying to get the theme into my Architect project:

Via Project Inspector -> Resources -> Sencha Themer Resource, I specified the path where my theme resides ( [workspace]->packages->local->mytheme ). Architect then copies the theme into the project directory and applies the theme to the project. Or at least it tries to apply it. In Architect I then see everything styled in the default Triton theme even if it shows my custom theme as being applied. When I preview the application, the correct theme is used. Is this expected? Furthermore, when you close Architect and open the project again it throws the following error: Uncaught TypeError: Path must be a string. Received undefined. If you ignore this error everything works as described before.
I exported the theme with Themer, unzipped it into [projectDir]->packages->local. Again I added the Sencha Themer Resource via Project Inspector but this time specified the theme in the projectDir. But the behaviour is the same as described above. Theme shows as applied, sencha shows default Triton theme, correct theme is shown in preview. Furthermore, when I close Architect and open the project again, no styling at all is applied (I just see some black text beeing my panel titles etc.). Architect then shows the following errors in Cmd Output:
[ERR] failed to download path : C:/Develop/infra3dportal_tests/ext/theming/test/build/temp/development/test/sass/_test-all.scss
[ERR] failed to download path : C:/Develop/infra3dportal_tests/ext/theming/test/build/temp/development/test/sass/__test-all.scss
test is my application name here, theming is the workspace folder. I just found out that I can then load a different project, switch back to the test project and the error is gone. However, default styling is shown, not my own.



Sorry for this long excursion, but I think you should be able to reproduce this behaviour with the provided description.
Am I doing this right or what is the correct way to share a theme amongst multiple sencha architect projects?

Help would be much appreciated!

Regards,
Kevin

petr.vecera
14 Feb 2017, 7:26 AM
Hi Kevin

[ERR] failed to download path : C:/Develop/infra3dportal_tests/ext/theming/test/build/temp/development/test/sass/_test-all.scss
[ERR] failed to download path : C:/Develop/infra3dportal_tests/ext/theming/test/build/temp/development/test/sass/__test-all.scss

Is known issue DSGNR-7587, when you have your SA 4.1.1 project inside the workspace. Unfortunately there is no known workaround - just to move the project outside of the workspace.

Sorry for the troubles
Petr

kevin.flueckiger
14 Feb 2017, 8:55 AM
Hi Petr

Thanks for your answer.
Moving the project out of the workspace copies the theme, which is not what I'm trying to achieve.
Is having a theme in a workspace shared with multiple Architect projects something that is planned to be supported? I mean sharing a theme works perfetcly when not using Architect but plain Ext and Cmd, shouldn't it also work like this with Architect?

Regards,
Kevin

petr.vecera
20 Feb 2017, 4:56 AM
Hi Kevin

Share of one theme in the workspace in not planned to be supported any time soon. (It's quite complicated due to metadata and other SA project files set-up).

The other issue with workspace will be fixed in the next patch release.

Regards
Petr