Closed Bug 1002345 Opened 6 years ago Closed 6 years ago
[Stingray] widget life-cycle management
The widget iframe should be created at homescreen instead of system app, unlike 2-layered approach. This issue may handles: 1. widget creation 2. widget deletion 3. iframe management 4. widget show/hide
Assignee: nobody → rexboy
WIP https://github.com/rexboy7/gaia/tree/widget_factory.js Added classes: * Widget factory * Widget manager * Widget window I copied several files from system app. Let me explain some detail: * application.js: Manage installed apps. * browser_config_helper.js: Manage application manifest. * browser_frame.js: Manage application iframe. * I also tried to copy only required codes from AppWindow of system app so that we can remove dependency of AppWindow and related stuff.
(In reply to KM Lee [:rexboy][:蠟蠟蠟蠟] from comment #1) > * application.js: Manage installed apps. I guess it may be replaced with ours and depend on Bug 1002355. WIP version is here: https://github.com/luke-chang/gaia/blob/TV_arch1/test_apps/homescreen-tv-arch1/js/applications.js
Agree with Luke's opinion. Since this is newly added to homescreen, we may discuss and leverage the existing modules and redesign the API to support widget manager.
First workable patch. I'll put it into reviewing after making some confirmation.
You application may be conflicted with Luke's bug 1002355.
Comment on attachment 8419975 [details] Patch Ok, I come up a version based on the latest code base. Here are some details for the patch: * Add widget_manager, widget_window, widget_factory to manage widgets. widget_window no longer depends on appWindow of system app. * But I still make use of browser_frame.js and browser_config_helper.js of system app, and made appropriate modification to apply them on our new Application.js. John and Evelyn, would you help review the patch?
Comment on attachment 8419975 [details] Patch Adding Tzu-lin.
Attachment #8419975 - Flags: review?(tzhuang)
Comment on attachment 8419975 [details] Patch Please find my comments at PR.
Comment on attachment 8419975 [details] Patch Updated. Thanks a lot for the suggestions.
Comment on attachment 8419975 [details] Patch No important issues here, I think. There are few thing needing to check: 1. the staff about system message should be reconsidered. It can be kept here or removed, I think. 2. the testing code should be removed. 3. few nits. Please update the PR before merge.
Attachment #8419975 - Flags: review?(johu) → review+
Comment on attachment 8419975 [details] Patch r+ with nits, thanks for the patch
Attachment #8419975 - Flags: review?(tzhuang) → review+
already landed to master: https://github.com/mozilla-b2g/gaia/commit/995bc8a785411871aaef261de58a1479f68dd811
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.