Closed
Bug 1020152
Opened 10 years ago
Closed 10 years ago
Generate pre_installed_collections.json in build time
Categories
(Firefox OS Graveyard :: Gaia::Everything.me, defect)
Tracking
(b2g-v2.0 fixed, b2g-v2.1 fixed)
RESOLVED
FIXED
2.0 S4 (20june)
People
(Reporter: crdlc, Assigned: albert)
References
Details
(Whiteboard: [systemsfe])
Attachments
(1 file)
363 bytes,
text/html
|
yurenju
:
review+
bajaj
:
approval-gaia-v2.0+
|
Details |
Algorithm
1) Extract pre-defined collections from "homescreens.json" file
2) Create a file called "pre_defined_collections.json" with the descriptors for those pre-defined collections
E.g. Pre-defined collections: tv and social
pre_defined_collections.json:
{"collections": [
{
"name": "Tv",
"categoryId": "213",
"pinned": [
["app://video.gaiamobile.org/manifest.webapp"]
],
"icon": "/collections/tv/icon_90.png",
"background": "/collections/tv/background_480x800.jpg"
},
{
"name": "Social",
"categoryId": "289",
"pinned": [
["app://communications.gaiamobile.org/manifest.webapp", "dialer"],
["app://communications.gaiamobile.org/manifest.webapp", "contacts"],
["app://sms.gaiamobile.org/manifest.webapp"],
["app://email.gaiamobile.org/manifest.webapp"]
],
"icon": "/collections/social/icon_90.png",
"background": "/collections/social/background_480x800.jpg"
}
]}
The data will be taken from https://github.com/mozilla-b2g/gaia/tree/master/apps/collection/collections
Obviously, the generation process should calculate the best icon and background for the target device and also the manifest paths to apps within collections
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → acperez
Reporter | ||
Comment 1•10 years ago
|
||
Sorry pre_predefined_collections -> pre_installed_collections
Reporter | ||
Updated•10 years ago
|
Summary: Generate pre_defined_collections.json in build time → Generate pre_installed_collections in build time
Reporter | ||
Updated•10 years ago
|
Summary: Generate pre_installed_collections in build time → Generate pre_installed_collections.json in build time
Assignee | ||
Comment 2•10 years ago
|
||
Generate at build time init.json with collections for apps/verticalhome, pre_installed_collections.json for apps/collections and clear resources of collections in the stage folder (unused collections, icons and backgrounds) to avoid pushing them to the device because application.zip size increases a lot.
As code to generate both json is almost the same and it has been used by both application and verticalhome apps, I created a new script in build folder.
Attachment #8438213 -
Flags: review?(yurenju.mozilla)
Comment 3•10 years ago
|
||
Hi Albert, could you give more context for reviewing this pr?
1. what the purpose of collection app is? I try to long press on homescreen to add smart collection but it does not work.
2. why do we need pre_installed_collections.json?
3. looks you extract homescreen-manager from verticalhome to another module, we should also update horizontal homescreen.
Flags: needinfo?(acperez)
Assignee | ||
Comment 4•10 years ago
|
||
(In reply to Yuren [:yurenju] from comment #3)
> Hi Albert, could you give more context for reviewing this pr?
> 1. what the purpose of collection app is? I try to long press on homescreen
> to add smart collection but it does not work.
The purpose of collection app is to externalize collections from the homescreen app to enable collections from third-party. The whole functionality of collections is not already landed, so is normal that you couldn't add smart collections.
> 2. why do we need pre_installed_collections.json?
pre_installed_collections.json is used to preload collections in a datastore in order to share them between the collections app and the vertical homescreen. On the first boot, collections are stored in the datastore. Then, when homescreen app find a collection to be painted it request the metadata for the collection to the datastore.
> 3. looks you extract homescreen-manager from verticalhome to another module,
> we should also update horizontal homescreen.
Collections in horizontal and vertical homescreens work in a different way. However, horizontal homescreen is going to be removed, for that reason I didn't modified the horizontal home, do you think we should apply changes to horizontal home also?
Flags: needinfo?(acperez)
Comment 5•10 years ago
|
||
because we still use horizontal on tablet :)
Comment 6•10 years ago
|
||
but you are right, we don't need to modify horizontal homescreen if we have no plan to support this feature on horizontal homescreen
Comment 7•10 years ago
|
||
Comment on attachment 8438213 [details]
Patch
I left comments on github, please check it, there are two major issues:
1. some path looks doesn't work on Windows
2. we should have a integration or unit test case for this change especially for GAIA_DEVICE_TYPE.
Attachment #8438213 -
Flags: review?(yurenju.mozilla)
Assignee | ||
Updated•10 years ago
|
Attachment #8438213 -
Flags: review?(yurenju.mozilla)
Assignee | ||
Comment 8•10 years ago
|
||
Some errors fixed.
Added some test.
Removed GAIA_DEVICE_TYPE because vertical home is only for phone, it will be added if needed in the future.
Comment 9•10 years ago
|
||
Comment on attachment 8438213 [details]
Patch
r=yurenju and I also test it on Windows, looks we can get correct pre_install_collections.json with this pr.
please fix typo on your pr which I mentioned on github.
Attachment #8438213 -
Flags: review?(yurenju.mozilla) → review+
Assignee | ||
Comment 10•10 years ago
|
||
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Comment 11•10 years ago
|
||
Comment on attachment 8438213 [details]
Patch
This is needed for the vertical homescreen smart collections work. It's also npotb, so it should generally be safe to uplift. Thanks!
Attachment #8438213 -
Flags: approval-gaia-v2.0?(bbajaj)
Updated•10 years ago
|
Attachment #8438213 -
Flags: approval-gaia-v2.0?(bbajaj) → approval-gaia-v2.0+
Comment 12•10 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•