Last Comment Bug 779176 - Activities doesn't work with different entry points (not using href)
: Activities doesn't work with different entry points (not using href)
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla17
Assigned To: [:fabrice] Fabrice Desré
: Jason Smith [:jsmith]
Mentors:
Depends on:
Blocks: 715814 788125
  Show dependency treegraph
 
Reported: 2012-07-31 09:41 PDT by Francisco Jordano [:arcturus] [:francisco]
Modified: 2012-09-14 18:22 PDT (History)
12 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
+


Attachments
patch (1.58 KB, patch)
2012-08-07 18:10 PDT, [:fabrice] Fabrice Desré
mounir: review+
Details | Diff | Splinter Review

Description Francisco Jordano [:arcturus] [:francisco] 2012-07-31 09:41:14 PDT
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/17.0 Firefox/17.0
Build ID: 20120723030606

Steps to reproduce:

We need the support for activities working from multiple entry points.

In the documentation we had the 

href: can be used to register an activity handler in another page. Needs to be same origin. 

that maybe we could use to define this.

Or support in the entry point declaration the activity.
Comment 1 Dietrich Ayala (:dietrich) 2012-08-06 09:04:29 PDT
Why is this a blocker? What V1 requirements are blocked on support for this?
Comment 2 Dietrich Ayala (:dietrich) 2012-08-06 09:06:13 PDT
Apparently it's required to integrate Contacts with the Dialer.
Comment 3 [:fabrice] Fabrice Desré 2012-08-07 18:10:06 PDT
Created attachment 649909 [details] [diff] [review]
patch

Francisco, can you try a build with this patch, and adding the "href" property in the activity. It works there, but I'd like to be sure this is what you actually need.
Comment 4 Francisco Jordano [:arcturus] [:francisco] 2012-08-08 00:41:49 PDT
Thanks Fabrice, will try today and will let you know.

Cheers!.
Comment 5 Francisco Jordano [:arcturus] [:francisco] 2012-08-08 06:34:23 PDT
Hi Fabrice,

I tried the patch against the latest m-c, and this is the idea that we were proposing but currently is not working as expected.

I setup a email activity (I was working with them) in the following way:

"new": {
      "filters": {
        "type": "test"
      },
      "disposition": "window",
      "href": "ep/mail.html"
    }

My idea is trying to launch the file 'mail.html' inside the 'ep' folder (right now in apps i have: apps/mail/ep) to handle this activity.

I get a light-blue screen of death cause the system is trying to open the following page:

email.gaiamobile.com/index.html/ep/mail.html

So seems that we are always apending the launch_attribute from the original path and since we did a change that we added always the 'index.html' to the launch_path attribute, the 'href' seems to me that needs to be absolute path from the origin, not just the launch path.

Also tried the following trick, and everything worked as expected:

"new": {
      "filters": {
        "type": "test"
      },
      "disposition": "window",
      "href": "/../ep/mail.html"
    }

Cheers!
Francisco.
Comment 6 Francisco Jordano [:arcturus] [:francisco] 2012-08-08 06:55:14 PDT
Forget anything about previous comment, somehow I was trying with an old copy of my b2g.

After realising that it was behaving as the old version, retried with the patched one and works like charm.

Following the example above:

"new": {
      "filters": {
        "type": "test"
      },
      "disposition": "window",
      "href": "ep/mail.html"
    }

It's opening correctly email.gaiamobile.org/ep/mail.html

Thanks a lot!

(In reply to francisco.jordano from comment #5)
> Hi Fabrice,
> 
> I tried the patch against the latest m-c, and this is the idea that we were
> proposing but currently is not working as expected.
> 
> I setup a email activity (I was working with them) in the following way:
> 
> "new": {
>       "filters": {
>         "type": "test"
>       },
>       "disposition": "window",
>       "href": "ep/mail.html"
>     }
> 
> My idea is trying to launch the file 'mail.html' inside the 'ep' folder
> (right now in apps i have: apps/mail/ep) to handle this activity.
> 
> I get a light-blue screen of death cause the system is trying to open the
> following page:
> 
> email.gaiamobile.com/index.html/ep/mail.html
> 
> So seems that we are always apending the launch_attribute from the original
> path and since we did a change that we added always the 'index.html' to the
> launch_path attribute, the 'href' seems to me that needs to be absolute path
> from the origin, not just the launch path.
> 
> Also tried the following trick, and everything worked as expected:
> 
> "new": {
>       "filters": {
>         "type": "test"
>       },
>       "disposition": "window",
>       "href": "/../ep/mail.html"
>     }
> 
> Cheers!
> Francisco.
Comment 7 [:fabrice] Fabrice Desré 2012-08-08 11:15:02 PDT
Comment on attachment 649909 [details] [diff] [review]
patch

Not sure why we used fullLaunchPath here.. (and the startPoint support in this function looks broken also anyway, I'll file a bug).
Comment 8 [:fabrice] Fabrice Desré 2012-08-09 08:40:11 PDT
https://hg.mozilla.org/integration/mozilla-inbound/rev/66b421cf32b9
Comment 9 Ryan VanderMeulen [:RyanVM] 2012-08-09 15:00:57 PDT
https://hg.mozilla.org/mozilla-central/rev/66b421cf32b9

Note You need to log in before you can comment on or make changes to this bug.