Closed Bug 926169 Opened 11 years ago Closed 11 years ago

[DSDS][Gaia] MobileConnection webapi will be changed for DSDS, so all relevant Apps has to be modified accordingly.

Categories

(Firefox OS Graveyard :: Gaia, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(blocking-b2g:1.3+)

RESOLVED FIXED
1.3 Sprint 5 - 11/22
blocking-b2g 1.3+

People

(Reporter: hsinyi, Assigned: eragonj)

References

Details

Attachments

(1 file)

46 bytes, text/x-github-pull-request
ranbena
: review+
borjasalguero
: review+
ferjm
: review+
davehunt
: review+
arthurcc
: review+
timdream
: review+
alive
: review+
arthurcc
: feedback+
ferjm
: feedback+
davehunt
: feedback+
Details | Review
Naming changes: the way to get mobileconnection object differs.

Before:
var mobileconn = navigator.mozMobileConnection;
var voiceinfo = mobileconn.voiceInfo;

After:
var mobileconn = navigator.mozMobileConnections[0];
// The same below ...
var voiceinfo =mobileconn.voiceInfo;
Depends on: 814629
Blocks: b2g-dsds-1.3
Component: Gaia::Settings → Gaia
Summary: [DSDS][Gaia] MobileConnection webapi has changed for DSDS, so all relevant Apps has to be modified accordingly. → [DSDS][Gaia] MobileConnection webapi will be changed for DSDS, so all relevant Apps has to be modified accordingly.
arthur, can you take this bug?
Flags: needinfo?(arthur.chen)
Assignee: nobody → arthur.chen
Flags: needinfo?(arthur.chen)
Blocks: 918553
Blocks: 918533
Blocks: 926352
No longer blocks: b2g-dsds-1.3
Blocks: 926355
Blocks: 926350
Looks like a 1.3+ bug.
blocking-b2g: --- → 1.3+
We need to figure out a good way to address changes brought by bug 814629 so that Gaia could handle both old and new APIs well. Otherwise, we will be getting complaints about breaking the tests and functionalities...

See https://bugzilla.mozilla.org/show_bug.cgi?id=887699#c77 for some discussion.
Arthur, may I know what's the target milestone in your mind for this bug? Thanks.
Flags: needinfo?(arthur.chen)
Flags: needinfo?(arthur.chen)
Target Milestone: --- → 1.3 Sprint 4 - 11/8
Assignee: arthur.chen → ejchen
Some notes :

Because there are some overlapping part that Arthur is currently working on, this patch has to be landed after Bug 928325.
Attached file WIP 1
This is just a quick preview of changes to make sure we are on the right direction.
Comment on attachment 823886 [details] [review]
WIP 1

Hi Arthur, Fernando and Borja, 

this is a WIP patch focusing on Gecko API change. Can you guys give me some feedbacks about code change in your app so that I can make sure I am on the right direction :)

(Settings app for Arthur, dialer app for Fernando and FTU for Borja :D)
Attachment #823886 - Flags: feedback?(ferjmoreno)
Attachment #823886 - Flags: feedback?(arthur.chen)
Attachment #823886 - Flags: feedback?(borja.bugzilla)
Comment on attachment 823886 [details] [review]
WIP 1

Looks good to me.
Attachment #823886 - Flags: feedback?(arthur.chen) → feedback+
Blocks: 814629
No longer depends on: 814629
Comment on attachment 823886 [details] [review]
WIP 1

Hi Cristian and Dave, can you give me some feedbacks about related changes in your apps ? thanksss !
Attachment #823886 - Flags: feedback?(dave.hunt)
Attachment #823886 - Flags: feedback?(crdlc)
Comment on attachment 823886 [details] [review]
WIP 1

Please Ran take a look to give your feedback because this patch is touching an evme file js
Attachment #823886 - Flags: feedback?(crdlc) → feedback?(ran)
Comment on attachment 823886 [details] [review]
WIP 1

(In reply to EJ Chen [:eragonj] from comment #9)
> Comment on attachment 823886 [details] [review]
> WIP 1
> 
> Hi Cristian and Dave, can you give me some feedbacks about related changes
> in your apps ? thanksss !

I think you may have the wrong Dave, I don't work on any Gaia apps.
Attachment #823886 - Flags: feedback?(dave.hunt)
(In reply to Cristian Rodriguez (:crdlc) PTO (10-24 to 10-27) from comment #10)
> Comment on attachment 823886 [details] [review]
> WIP 1
> 
> Please Ran take a look to give your feedback because this patch is touching
> an evme file js

Thanks Cristian !
(In reply to Dave Hunt (:davehunt) from comment #11)
> Comment on attachment 823886 [details] [review]
> WIP 1
> 
> (In reply to EJ Chen [:eragonj] from comment #9)
> > Comment on attachment 823886 [details] [review]
> > WIP 1
> > 
> > Hi Cristian and Dave, can you give me some feedbacks about related changes
> > in your apps ? thanksss !
> 
> I think you may have the wrong Dave, I don't work on any Gaia apps.

Dave, I blamed gaia/tests and I found you have committed a lot there. 

Should I find the others to give me some feedbacks for this part ?
Flags: needinfo?(dave.hunt)
Comment on attachment 823886 [details] [review]
WIP 1

Ah, I thought you were asking me to review app changes. Looking through the test changes, these look good to me.
Attachment #823886 - Flags: feedback+
Flags: needinfo?(dave.hunt)
Attachment #823886 - Flags: feedback?(ferjmoreno) → feedback+
Thanks all, it seems this change is OK to most of you. I will request r? instead. Thanks :P
Comment on attachment 823886 [details] [review]
WIP 1

Hi all, 

because this bug fix will affect lots of files using mozMobileConnection, I need your review for your own apps / files.

In the PR, I have divided my code change into several part to help you find your related part quickly ( and also help you review my code easily haha )

Thanks all :)
Attachment #823886 - Flags: review?(ran)
Attachment #823886 - Flags: review?(kaze)
Attachment #823886 - Flags: review?(ferjmoreno)
Attachment #823886 - Flags: review?(dave.hunt)
Attachment #823886 - Flags: review?(borja.bugzilla)
Attachment #823886 - Flags: review?(arthur.chen)
Attachment #823886 - Flags: review?(alive)
Attachment #823886 - Flags: review?(21)
Attachment #823886 - Flags: feedback?(ran)
Attachment #823886 - Flags: feedback?(borja.bugzilla)
Attachment #823886 - Flags: feedback?
Attachment #823886 - Flags: feed
I dislike we do this everywhere in the code.
Could we have a helper like ICC to help us on this?
(In reply to Alive Kuo [:alive][11/4-11/8 at SFO ww.] from comment #17)
> I dislike we do this everywhere in the code.
> Could we have a helper like ICC to help us on this?

Hi Alive, 

this is a temporary patch and will be totally removed after using latest Web API. 

The reason why we need ICC helper before is because the wrong API design so that we have to add more check for backward compatibilities. After landing Gecko's patch, we will all use newest API and update old codes.

And there is also a discussion on dev-gaia talking about the shared/helpers problems. If we need helpers so shortly after implementing new features (maybe new API), it may reveal something about our problematic API design.

After some discussions, we make a conclusion that we will all use newest API and discard backward compatibility check to make code base more clean and focus on the future. 

Hope this comment helps and kindly review this patch again. Thanks :)
> Hope this comment helps and kindly review this patch again. Thanks :)
Typo : you can kindly .. *
Comment on attachment 823886 [details] [review]
WIP 1

r=me for the settings part.
Attachment #823886 - Flags: review?(arthur.chen) → review+
Why do we need to put us in an intermediate state? The thing in the patch doesn't obey what you say about discarding backward compatibility.

(In reply to EJ Chen [:eragonj] from comment #18)
> (In reply to Alive Kuo [:alive][11/4-11/8 at SFO ww.] from comment #17)
> > I dislike we do this everywhere in the code.
> > Could we have a helper like ICC to help us on this?
> 
> Hi Alive, 
> 
> this is a temporary patch and will be totally removed after using latest Web
> API. 
> 
> The reason why we need ICC helper before is because the wrong API design so
> that we have to add more check for backward compatibilities. After landing
> Gecko's patch, we will all use newest API and update old codes.
> 
> And there is also a discussion on dev-gaia talking about the shared/helpers
> problems. If we need helpers so shortly after implementing new features
> (maybe new API), it may reveal something about our problematic API design.
> 
> After some discussions, we make a conclusion that we will all use newest API
> and discard backward compatibility check to make code base more clean and
> focus on the future. 
> 
> Hope this comment helps and kindly review this patch again. Thanks :)
(In reply to Alive Kuo [:alive][11/4-11/8 at SFO ww.] from comment #21)
> Why do we need to put us in an intermediate state? The thing in the patch
> doesn't obey what you say about discarding backward compatibility.

Hi Alive, thanks for your ask. The reason why we need this patch is to make sure Gecko API works well and no Gaia apps are broken due to this change. And after that, this will totally be removed and use the newest API. 

This is a group decided workflow to make sure there is no API broken and no one gets hurt due to this change. 

Hope this comment will make you know more clearly about what we are doing now. 

Thanks again for your ask :)
Comment on attachment 823886 [details] [review]
WIP 1

Looks good. The Travis-CI build failed but I retriggered it and it passed. I've also been able to run tests successfully on device (Hamachi) with this patch applied.
Attachment #823886 - Flags: review?(dave.hunt) → review+
Comment on attachment 823886 [details] [review]
WIP 1

Seems like it miss a 'navigator' somewhere. This is ugly but as a temp solution to not break anything it sounds good.
Attachment #823886 - Flags: review?(21)
Comment on attachment 823886 [details] [review]
WIP 1

All works great
Attachment #823886 - Flags: review?(ran) → review+
Comment on attachment 823886 [details] [review]
WIP 1

I already stated my concern.
you will automatically have my r+ once everyone give r+.
Attachment #823886 - Flags: review+
(In reply to Vivien Nicolas (:vingtetun) (:21) from comment #24)
> Comment on attachment 823886 [details] [review]
> WIP 1
> 
> Seems like it miss a 'navigator' somewhere. This is ugly but as a temp
> solution to not break anything it sounds good.

Hi Vivien, thanks for pointing out the missing part. As what I have mentioned on Github, this part will be updated by Bug 928325 and Arthur is working on it now. In this way, I will keep the file unchanged before landing this patch. THanks !!
(In reply to Alive Kuo [:alive][11/4-11/8 at SFO ww.] from comment #26)
> Comment on attachment 823886 [details] [review]
> WIP 1
> 
> I already stated my concern.
> you will automatically have my r+ once everyone give r+.

Hi Alive, thanks for your quick reply and review.

I understand your concern and maybe it is also a good time to discard some legacy code due to new API change. 

Hope this change is acceptable to all of you. Thanks :)
Target Milestone: 1.3 Sprint 4 - 11/8 → 1.3 Sprint 5 - 11/22
Comment on attachment 823886 [details] [review]
WIP 1

Thanks Ej!

r=me with the comments addressed, please.
Attachment #823886 - Flags: review?(ferjmoreno) → review+
(In reply to Fernando Jiménez Moreno [:ferjm] from comment #29)
> Comment on attachment 823886 [details] [review]
> WIP 1
> 
> Thanks Ej!
> 
> r=me with the comments addressed, please.

Thanks Fernando, I have updated the code :)
Attachment #823886 - Flags: review?(borja.bugzilla) → review+
Comment on attachment 823886 [details] [review]
WIP 1

Hi Tim,  

Because Kaze is missing and there is a code change in shared/js/tz_select.js and needs to be reviewed as well. 

This change focus on Gecko API change and we have to make sure there is no problem before landing Gecko's API.

After asking Arthur, he told me that you may can help me review this part. 

Can you help me review this or tell me is there anyone else I can ask for help ?

Thanks :)
Attachment #823886 - Flags: review?(kaze) → review?(timdream)
Attachment #823886 - Flags: review?(timdream) → review+
Thanks all, this patch is landed on Gaia/master : d58504c98824427fa391d80724fb04ff4356a92c
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Forgot to take care of apps/settings/call.js in this patch. Once the DSDS changes in the API get landed the call setting panel in the setting panel will be broken. I'll take care of it in bug 928294.
(In reply to José Antonio Olivera Ortega [:jaoo] from comment #33)
> Forgot to take care of apps/settings/call.js in this patch. Once the DSDS
> changes in the API get landed the call setting panel in the setting panel
> will be broken. I'll take care of it in bug 928294.

Ignore this comment, I had not seen the changes in apps/settings/js/utils.js file. Sorry for the noise.
Blocks: 938422
Blocks: 938440
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: