Closed Bug 931430 Opened 11 years ago Closed 10 years ago

[Settings] Phone lock separation and haida bridge library

Categories

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

ARM
Gonk (Firefox OS)
defect

Tracking

(tracking-b2g:backlog)

RESOLVED WONTFIX
2.0 S1 (9may)
tracking-b2g backlog

People

(Reporter: kgrandon, Assigned: kgrandon)

References

Details

(Keywords: perf, Whiteboard: [c=progress p=3 s=2014.05.09.t u=][priority])

Attachments

(2 files)

I think it could be possible to prototype a bridge between now and haida in a simple library. Once we implement haida it would be a matter of simply throwing a switch in the library or setting a pref to enable the new transitions.

I'm currently doing some work for settings, and I feel that this would be a good way forward so I don't duplicate efforts of what's needed in the future.

I will start with a simple panel in settings, then we can expand from there if folks like the approach.
Attached file Github pull request
Hey Guys,

This pull request changes two panels from settings to load in their own HTML page. The goal is that there should be no visual difference to the user, but each panel should be encapsulated with it's own logic and dependencies.

There is a new shared/js/sheet.js file which is a lightweight file to open/close iframes. Once haida rolls around it would be trivial to change this logic to proxy the necessary information to the system app.

I'm currently working on bug 922658 and there is a lot of similar concepts as to what we want to do in haida in the longrun, so I think this may be a good place to start prototyping work.

James - I've marked you as feedback? as I know you have a lot of great ideas on haida which this doesn't capture, but my hope is that we may have the chance to extend this pattern to a few other applications and start adding platform standards and shared worker libraries where possible.

Vivien - I've marked you for review as I actually want to land this for bug 922658. If we land this, or something like this - I will likely flush out the shared library a bit more as I get around to doing this for other settings panels.
Attachment #822850 - Flags: review?(21)
Attachment #822850 - Flags: feedback?(jlal)
Blocks: 922658
Keywords: perf
Summary: Prototype a haida bridge library → [Settings] Phone lock separation and haida bridge library
Whiteboard: [c= p= s= u=]
You can try this out by applying the patch and navigating to Settings -> Phone Lock. The phone lock and passcode panels will be their own iframes.
Whiteboard: [c= p= s= u=] → [c= p=3 s= u=]
Comment on attachment 822850 [details] [review]
Github pull request

It makes me really happy that you took over this stuff. I think this patch will expose some of our underlying issues! \o/

One thing which is strange imo for now is the fact that each iframes has to embed sheet.js and so each of them will contains sub-iframes. In my mind I was thinking that there will be a a kind of common window container that manages those iframes instead of nesting them.

This container will contains sheet.js and sheets will call window.parent.close(sheet) (overidden in the container window) or window.close directly (if the sheet is displayed as an inline activity and does not have a parent).

This may also let us do dirty tricks if duplicating js is too painful for load time/memory until the platform makes it better. For example the container window may be the only one to contains settings_base.js/l10n.js and child sheets may just reused it. I'm not saying this is what we want at the end but it could be an intermediate step.

I also wonder if you don't want a shared/style/sheet.css.

What do you think?
Attachment #822850 - Flags: review?(21) → feedback+
Oh and last but not least can we s/sheet/page/. Please!
(In reply to Vivien Nicolas (:vingtetun) (:21) from comment #3)
> Comment on attachment 822850 [details] [review]
> Github pull request
> 
> One thing which is strange imo for now is the fact that each iframes has to
> embed sheet.js and so each of them will contains sub-iframes. In my mind I
> was thinking that there will be a a kind of common window container that
> manages those iframes instead of nesting them.

Sounds good. it's also a bit strange to me as well - but it shouldn't really matter in the long run. I'm going to take another exploratory step in this at only loading the polyfill in at the container level.
Attachment #822850 - Flags: feedback?(jlal)
Attached file New WIP pull req
Comment on attachment 822850 [details] [review]
Github pull request

As I said I would like to r?/land that for 1.4. So lets cancel the review for now
Attachment #822850 - Flags: review?(21)
Comment on attachment 822850 [details] [review]
Github pull request

I already left my feedback but never +'ed the flag :)
Attachment #822850 - Flags: feedback?(jlal) → feedback+
blocking-b2g: --- → backlog
Whiteboard: [c= p=3 s= u=] → [c= p=3 s= u=][priority]
Seems we are going with a different approach now, so closing this one.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
Priority: -- → P3
Whiteboard: [c= p=3 s= u=][priority] → [c=progress p=3 s=2014.05.09.tracking u=][priority]
Whiteboard: [c=progress p=3 s=2014.05.09.tracking u=][priority] → [c=progress p=3 s=2014.05.09.t u=][priority]
Target Milestone: --- → 2.0 S1 (9may)
blocking-b2g: backlog → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: