Can we move the clock app into the apps directory so we can build it? Apps in the dead_apps directory can't be build right now.
The build system on the kanikani branch of Gaia currently packages the apps in the apps/ folder as chrome. That isn't what we want for the apps we want to turn into web content. I think we may need to figure out a new deployment model for web apps which enables us to host them on the web somewhere rather than package them up. This is probably a wider topic we should discuss in the B2G meeting tomorrow.
Okay I understand that. But right now we need a solution to import shared scripts. How can we achieve that? The clock app relies on some scripts from the shared/js folder.
One option might be to just directly link to scripts in ../../shared/ and deploy all the web apps and shared folder to mozilla-b2g.github.io (like http://benfrancis.github.io/gaia/). I wonder how much we could get working as static web content without the build system. This would work because all the web apps would share the same origin with the shared folder, that isn't a great long term solution for security purposes but could allow us to get started.
okay I will give that a try.
So I looked into changing the paths to "../../shared/js/*" but the clock app is using requireJS, which seems to be unable to resolve the paths. it just concats the basepath "dead_apps/clock/js" with e.g. "../../shared/js/accessibility_helper.js". What can we do to avoide this?
I don't know why, but I can't set the review flag in the autolander patch... Can you check this and tell me if it's okay? With this paths I can load all the resources now.
Comment on attachment 8750453 [details] [review] [gaia] TitanNano:fix_1270736 > mozilla-b2g:kanikani With this patch it is possible to load all required resources for the clock app. I'm not sure if L10n also works correctly but I addjusted the paths for the language files in the same way as all other paths. I know this is not a ideal solution, but until we split the shared resources into npm packages, we can use it to test and fix the clock app.
This approach looks good to me. Alberto has been experimenting with the clock app as an example of a web app outside of the main Gaia repository that we can ship as a default app. You can see it mostly working here https://albertopq.github.io/gaia-clock/ I don't necessarily think we should move the Clock app itself out of the Gaia repository, but you two should discuss the approach he took to do this.
Alberto, how about we merge your work into the gaia repo. since Bug 1270532 landed we can distribute it through gh-pages. Your current repo seems to work pretty well and I'd like to help fixing the remaining problems. What do you think about that?
Yeah, that makes sense. I'm still not sure how to resolve the '/shared' issue. Pointing to '../shared' seems like the easiest way, but in the long term we should externalize those files in external libraries. Jovan, would you mind to apply the work done in my repo to the dead_apps/clock folder? We can probably skip the shared/bower stuff right now, and fix that issue in the future. Thanks!
Alberto, I updated my PR, can you review it?
Comment on attachment 8750453 [details] [review] [gaia] TitanNano:fix_1270736 > mozilla-b2g:kanikani Left a couple of comments in github, but r=me as soon as those are fixed. Thanks a lot, Jovan! Nice work!
Hey Jovan, how is it going with this bug? Do you want me to help? Thanks!
No I think it's no problem. I just don't have time at the moment. Maybe I can fix the patch on the weekend :)
Hey Jovan! Why are input_areas.css and buttons.css added to this commit? Shouldn't we just point to the shared ones? At the other hand, I still don't see a comment with the bug number in . I'm happy to r+ this as soon as that gets fixed. Thanks!  https://github.com/mozilla-b2g/gaia/pull/34298#discussion-diff-64186734R24
I updated the PR.
Comment on attachment 8750453 [details] [review] [gaia] TitanNano:fix_1270736 > mozilla-b2g:kanikani Thanks Jovan!
are you going to merge the PR?