Closed Bug 1002355 Opened 6 years ago Closed 6 years ago

[Stingray] A helper to wrap functions of mozApps.mgmt

Categories

(Firefox OS Graveyard :: Gaia::Homescreen, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lchang, Assigned: lchang)

References

Details

(Whiteboard: [FT:Stream3])

Attachments

(1 file)

46 bytes, text/x-github-pull-request
johnhu
: review+
GaryChen
: review+
Details | Review
This helper is responsible for:

1. get all installed apps
2. get app icon blob
3. listen to app install/update/uninstall events
4. launch an app
Assignee: nobody → lchang
Hey Luke. I'm currently planning a refactoring of this type of functionality for the new phone homescreen. Part of the thing that makes it a bit painful is that it probably needs to default the item grid and save some data to indexedDB. Anyway - as I might refactor this soon, it might be good to think if there is any shared/ library support we could create to use in both homescreens. The phone case might actually be more complex here because we need to support carrier customization and placement of icons.

We're currently doing this here: https://github.com/mozilla-b2g/gaia/blob/master/dev_apps/home2/js/sources/application.js#L18
Hi Kevin,

It sounds good if there is a shared library for both homescreens.

As you've said, this kind of library in phone case might be more complex than in stingray so my initial plan is trying to split the functionality of mozApps.mgmt into a helper (this bug) and a renderer (bug 1002358). This helper is a library which only cases about UI-independent functionality so that we can switch to any other renderers and easier to support customization. What do you think?

Here is our draft version: https://github.com/luke-chang/gaia/blob/TV_arch1/test_apps/homescreen-tv-arch1/js/applications.js
No longer blocks: 1002341
Attached file Pull Request 19089
A simple wrapper for mozApp.mgmt. Please help to review it when you're available. Thanks a lot.
Attachment #8419870 - Flags: review?(johu)
Attachment #8419870 - Flags: review?(gchen)
Attachment #8419870 - Flags: review?(ehung)
Comment on attachment 8419870 [details] [review]
Pull Request 19089

Nice work. I don't have any concern about this patch.
Attachment #8419870 - Flags: review?(johu) → review+
Don't forget to rebase the code and move tests to _test_ folder.
Comment on attachment 8419870 [details] [review]
Pull Request 19089

Nice work, r=me after using manifest URL instead of app origin.
Attachment #8419870 - Flags: review?(gchen) → review+
travis passed:
https://travis-ci.org/mozilla-b2g/gaia/builds/24948333

merged in gaia master branch:
https://github.com/mozilla-b2g/gaia/commit/6318565c4d6869ace6f2478a1e8282bf3979cb2c

Gary, John, Thanks a lot!
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Comment on attachment 8419870 [details] [review]
Pull Request 19089

Clear review flag since this patch already got two r+.
Attachment #8419870 - Flags: review?(ehung)
Whiteboard: [FT:Stream3]
You need to log in before you can comment on or make changes to this bug.