Closed Bug 1002345 Opened 11 years ago Closed 11 years ago

[Stingray] widget life-cycle management

Categories

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

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: johnhu, Assigned: rexboy)

References

Details

(Whiteboard: [FT:Stream3])

Attachments

(1 file)

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
Depends on: 1002377
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.
Attached file Patch
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?
Attachment #8419975 - Flags: review?(johu)
Attachment #8419975 - Flags: review?(ehung)
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.
Attachment #8419975 - Flags: review?(johu)
Blocks: 1009444
Comment on attachment 8419975 [details] Patch Updated. Thanks a lot for the suggestions.
Attachment #8419975 - Flags: review?(johu)
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+
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [FT:Stream3]
Attachment #8419975 - Flags: review?(ehung)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: