Closed Bug 1267680 Opened 8 years ago Closed 8 years ago

Homescreen uses datastore and mozApps

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: cwiiis, Assigned: cwiiis)

References

Details

Attachments

(1 file)

Homescreen still uses the deprecated mozApps and datastore APIs to access apps and pinned sites/places respectively.

After the transition, we will only have pinned sites and pages and no proprietary apps API. We should modify homescreen to stop using these interfaces.
(In reply to Autolander from comment #1)
> Created attachment 8745390 [details] [review]
> [gaia] Cwiiis:homescreen-places-idb > mozilla-b2g:kanikani

This is still WIP, we currently don't have a change signalling mechanism hooked up for places, so this isn't hugely useful. It does work, though.
hey Chris, 
I'm interested to help you to get the homescreen working again. 
I'd be glad if you could tell me how I can help.
Flags: needinfo?(chrislord.net)
(In reply to Jovan Gerodetti from comment #3)
> hey Chris, 
> I'm interested to help you to get the homescreen working again. 
> I'd be glad if you could tell me how I can help.

Hi Jovan, great to hear you're interested in helping out! The missing part now is really outside of homescreen - we need a way of signalling when the places database has changed (and the nature of the change and pertinent information, to make sure we can handle the change efficiently).

Ben Francis had some ideas about how to do that and is more heavily involved than me in this transition project, so I'll pass my needinfo to him.
Flags: needinfo?(chrislord.net) → needinfo?(bfrancis)
Hi Jovan,

We need to broadcast messages to let the homescreen know when a pinned site or pinned page changes so it can update itself. I've filed bug 1270102 for that, let's take the discussion there.
Flags: needinfo?(bfrancis)
Comment on attachment 8745390 [details] [review]
[gaia] Cwiiis:homescreen-places-idb > mozilla-b2g:kanikani

- Fixes a couple of small bugs in the system places code (could cause non-blocking infinite loops)
- Removes mozApps code
- Removes sites/pages datastore code
- Adds system places IDB code

After this commit, pinning/unpinning sites and pages works as expected. Note that unpinning has no broadcast message, so unpinning outside of the homescreen will not currently update the homescreen.
Attachment #8745390 - Flags: review?(apastor)
Comment on attachment 8745390 [details] [review]
[gaia] Cwiiis:homescreen-places-idb > mozilla-b2g:kanikani

LGTM after fixing the JShint errors:

Running jshint...
apps/homescreen/js/pinnedplaces.js: line 16, col 28, 'BroadcastChannel' is not defined. (ERROR)
apps/system/js/places.js: line 309, col 16, Missing semicolon. (ERROR)
shared/js/places_helper.js: line 29, col 7, 'asyncStorage' is not defined. (ERROR)

Thanks!
Attachment #8745390 - Flags: review?(apastor) → review+
Fixed and merged, cheers: https://github.com/mozilla-b2g/gaia/commit/846e1c6b2ed3c45756bee3233e84b5a41141c52d
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: