Closed Bug 898330 Opened 11 years ago Closed 11 years ago

Prototype replaceable Homescreen

Categories

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

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: vingtetun, Assigned: olav)

References

Details

(Whiteboard: [d-watch])

Attachments

(1 file)

47 bytes, text/x-github-pull-request
vingtetun
: review+
Details | Review
Offering third party developers a way to replace the homescreen is a must have. The homescreen is currently tied to a setting. 

Having an interface in the Settings app to manage homescreens and choose the one you want to use based on the 'role: 'homescreen' attribute of the manifest sounds like the first step.

This is mostly settings UI but it will involve some System work as well to replace the homescreen on the fly.
Hi!

I begun working on this.

Currently it lists all app of role=homescreen and allows you to pick one of them. The new homescreen will currenly be ready on reboot.

Will look into system app changes before making the UI sane.

Progress at https://github.com/comoyo/gaia/commits/replaceable_homescreen
Assignee: nobody → olav
I have been told that michalbe has a patch for it as well. Sounds like it will be a race to see who can put a patch first. Better would be that Olav and Michal to share knowledge and create the best patch possible together.
We work together with :olav on merging our patches now.
(In reply to Michal Budzynski (:michalbe) from comment #3)
> We work together with :olav on merging our patches now.

\o/
Attached file github_pointer
Hi! We've merged relevant parts.

The code is heavily inspired by apps/settings/js/apps.js . Could potentially make something generic there. If not it might make sense to duplicate the CSS as well.
Attachment #783182 - Flags: feedback?(kaze)
We need something similar for keyboards as well... https://bugzilla.mozilla.org/show_bug.cgi?id=891672
Olav, Michal,
I made some comments on the code. The 2 big concerns I have is localization and the this._apps code that seems overidden in renderHomescreens.

Kaze would probably have some other comments but it should be good to address those already.
(In reply to Jan Jongboom [:janjongboom] from comment #6)
> We need something similar for keyboards as well...
> https://bugzilla.mozilla.org/show_bug.cgi?id=891672

Until Keyboards are OOP enabled I don't think we enable third party keyboards. But this is a different story.
This goes pretty off topic but: Third party keyboards need a list in settings as well that's what I was pointing to.

More offtopic: OOP is being worked on (https://bugzilla.mozilla.org/show_bug.cgi?id=816874). See the storyboard at https://bugzilla.mozilla.org/showdependencytree.cgi?id=891678&hide_resolved=1
Whiteboard: [d-watch]
Hello, I've commented on this PR
https://github.com/mozilla-b2g/gaia/pull/11251/files#L1R109
Suggesting that we can give 3rd party developers more options by linking the default apps' icons to their app directory.
What do you guys think ? :)
Thanks for the reviews.

Addressed the comments so far.

Still, in settings we need to list apps for app permissions, homescreens and soon keyboards. Should listing apps in those cases duplicate code?

Ahmed Nefzaoui: This bug only lists homescreen apps inside the settings app. It does not affect the third party homescreens themselves in any way. I didn't quite understand your comment.
(In reply to Ahmed Nefzaoui from comment #10)
> Hello, I've commented on this PR
> https://github.com/mozilla-b2g/gaia/pull/11251/files#L1R109
> Suggesting that we can give 3rd party developers more options by linking the
> default apps' icons to their app directory.
> What do you guys think ? :)

The PR is trying to use the icon of the application as provided in the manifest. This icon is what helps the user to make a mental link between what they installed from a marketplace and what they will activate. I think this is good enough. A good marketplace should always check the icon of the application itself in the manifest so I'm not concerned about that.

This is assuming I understand correctly your comment :)
Comment on attachment 783182 [details] [review]
github_pointer

Code looks good to me. Let's go with that and thanks guys for collaborating together.
Attachment #783182 - Flags: feedback?(kaze) → review+
I also opened bug 899995 as a followup in order to hide the section if there is only one homescreen app.
Olav can you edit your commit message to something like: "Bug 898330 - Add a panel in the Settings app in order to switch homescreens. r=vingtetun"
Renamed PR.
I'm working on moving most homescreen management logic out of Window Manager. I will modify this change since:
* It uses mozSettings API twice in retrieveHomescreen.
* It doesn't consistently use |SettingsListener.observe| as other modules in system. This results in low code readability and confuse.
* It displays homescreen app once the settings is changed, is this necessary? I don't think so...

My patch would be in https://bugzilla.mozilla.org/show_bug.cgi?id=905116

Thanks.
BTW, why this patch is landed but the bug status is still NEW?
Hi!

>I'm working on moving most homescreen management logic out of Window Manager
Great!

>* It uses mozSettings API twice in retrieveHomescreen.
I don't think retrieveHomescreen was touched by this change.

>* It displays homescreen app once the settings is changed, is this necessary? I don't think so...

In that case we'd need to give some sort of visual feedback indicating that a homescreen has been "applied". We could use a toggle in the homescreen listings, but then where would the app description go? Should we involve UX?

> BTW, why this patch is landed but the bug status is still NEW?
Vivien is away and I don't have Bugzilla privileges to mark it fixed :)
(In reply to Olav Nymoen [:olav] from comment #19)
> >* It uses mozSettings API twice in retrieveHomescreen.
> I don't think retrieveHomescreen was touched by this change.
> 

Yes, but retrieveHomescreen again calls settings API
https://github.com/comoyo/gaia/blob/dc4254df90efd57f92aaf1190332d4bfdf0731b0/apps/system/js/window_manager.js#L672

> >* It displays homescreen app once the settings is changed, is this necessary? I don't think so...
> 
> In that case we'd need to give some sort of visual feedback indicating that
> a homescreen has been "applied". We could use a toggle in the homescreen
> listings, but then where would the app description go? Should we involve UX?

I think we need UX input but this reason sounds sane. I just wonder we display homescreen in the wrong timing.

> 
> > BTW, why this patch is landed but the bug status is still NEW?
> Vivien is away and I don't have Bugzilla privileges to mark it fixed :)

Marking.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Attachment mime type: text/plain → text/x-github-pull-request
Depends on: 1000305
Depends on: 1000313
Depends on: 1000315
Depends on: 1003242
Depends on: 1042797
No longer depends on: 1042797
Depends on: 1042807
No longer depends on: 1042807
Depends on: 1092726
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: