[Contacts] Send a message without contact list - Select the number to add it to new contact - Add contact screen appears twice

RESOLVED DUPLICATE of bug 848771

Status

Firefox OS
Gaia::Contacts
--
critical
RESOLVED DUPLICATE of bug 848771
5 years ago
5 years ago

People

(Reporter: Leo, Assigned: evanxd)

Tracking

unspecified
ARM
Gonk (Firefox OS)

Firefox Tracking Flags

(blocking-b2g:leo+)

Details

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
1. Title : Send a message without contact list - Select the number to add it to new contact - Add contact screen appears twice
2. Precondition : 
3. Tester's Action : Send a message without contact list(Messages > Send Message > Enter number and message > Send) > Select the number
4. Detailed Symptom (ENG.) : Add contact screen appears twice.(Add contact - Contacts - Select Contact - Add contact)
6. Expected : Only Add contact screen should be displayed.
7. Reproducibility: Y
1) Frequency Rate : 100%
8. Gaia revision :
(Reporter)

Updated

5 years ago
blocking-b2g: --- → leo?
Blocking for now. Very easy to reproduce. Need engineering estimate of what needs to happen for UI to go directly to activity, and for screenshotting to show activity UI.
blocking-b2g: leo? → leo+
(Reporter)

Comment 2

5 years ago
Created attachment 718230 [details]
screen shot
Taken.
Assignee: nobody → alive
The first 'add contact' is the screenshot. As #1 said, the contact should go to new-contact page directly instead of doing some transition...
Tracking note:

I am upset to see this URL
app://communications.gaiamobile.org/contacts/index.html?new#view-contact-form?tel=0123456789

Duplicate '?' makes no sense.

The UI should render 'view-contact-form' directly instead of 'view-contacts-list' first when it's launched as an activity. And this should be achieved by changing the hash. We are making a detour.

I am trying to find a minimum and risk-less and reasonable way to show new contact UI directly.
And this should be achieved by changing the hash. => And this shouldn't be achieved by changing the hash

(In reply to Alive Kuo [:alive] (PTO during 3/27~4/7) from comment #5)
> Tracking note:
> 
> I am upset to see this URL
> app://communications.gaiamobile.org/contacts/index.html?new#view-contact-
> form?tel=0123456789
> 
> Duplicate '?' makes no sense.
> 
> The UI should render 'view-contact-form' directly instead of
> 'view-contacts-list' first when it's launched as an activity. And this
> should be achieved by changing the hash. We are making a detour.
> 
> I am trying to find a minimum and risk-less and reasonable way to show new
> contact UI directly.
Looks like Evan has a solution so deassign myself.
Assignee: alive → nobody
Evan, can you work on this?
Assignee: nobody → evanxd
Flags: needinfo?(evanxd)
(Assignee)

Comment 9

5 years ago
Hi, Tim and Alive,

OK, let me do this.
Flags: needinfo?(evanxd)
(Assignee)

Comment 10

5 years ago
Hi Alive,

I'm just researching this issue to find a good solution.
But I had fixed bugs in Contact App.
(In reply to Evan Tseng from comment #10)
> Hi Alive,
> 
> I'm just researching this issue to find a good solution.
> But I had fixed bugs in Contact App.

Evan, could you update the status of the bug? Thanks.
Flags: needinfo?(evanxd)
(Assignee)

Comment 12

5 years ago
I'm working on creating a new page for the webcontacts/contact Web Activity in Contacts App.
It's a good way for other Apps request the Web Activity to Contacts App.
Flags: needinfo?(evanxd)
(Assignee)

Comment 13

5 years ago
Hi Alberto Pastor,

I'm working on this bug.

My solution is that I'm creating a new page "new.html" in Contacts App for handling the Web Activity of creating new contact.
And the content of manifest.webapp is like below.
"new": {
  "filters": {
    "type": "webcontacts/contact"
  },
  "disposition": "inline",
  "href": "/contacts/new.html",
  "returnValue": true
}

The solution could let the Web Activity boot faster.
For example, the "new.html" page will not import fb_init.js an any useless js file.

And the code might be more clear, 
because we don't need to handle different modes(Web Activity mode, App mode) in the "index.html" page in Contacts App.

How do you think of the solution?
Currently contact app has a mozvisibilitychange event listener.
When it sees document.mozHidden is switching to be true, it would cancel the activity request.

This results in: if bug 846850 is fixed, when contact app is launched as inline activity, it would soonly close itself when the user picks photo from another inline activity.

Evan, please also fix this if possible since you are going to do some non-trivial change to the activity of contact. I could also fix this after your fix is done if you don't want to do this in this bug.

Comment 16

5 years ago
Dup ? Bug 848771
Flags: needinfo?(leo.bugzilla.gaia)
(Assignee)

Comment 17

5 years ago
I'm working on creating a new page "update.html" for handling the "update webcontacts/contact" Web Activity. It's almost done.

Comment 18

5 years ago
Evan, are you sure is not already solved by Bug 848771?
(Assignee)

Comment 19

5 years ago
Hi Alberto,

Yes, this issue is already solved by Bug 848771.
Thanks. :)

And I also have a patch for this issue in the page: https://github.com/evanxd/gaia/commit/71e717ce2a1194f0d20fc6677b68b6a2b1151cc0

I created a new page "new.html" and refactoried the code for handling the new webcontacts/contact Web Activity.

The time to load of the patch is more short than this patch(https://github.com/mozilla-b2g/gaia/commit/3551291cfb1bd25a640619198ce0846f21a27fbf).
And you could see this in the following video.

How do you think that I could create a new issue for landing this patch?
(Assignee)

Comment 20

5 years ago
Created attachment 729453 [details]
Time to load for handling the new webcontacts/contact Web Activity.
(Assignee)

Comment 22

5 years ago
Hi Alberto,

I also created a new page "update.html" for handling the update Web Activity.

The patch is in the page:
https://github.com/evanxd/gaia/commit/9b7c4444ceea7b08b389c17252bbec786638471a

And the same question, how do you think that I could create a new issue for landing this patch?
(Assignee)

Updated

5 years ago
Flags: needinfo?(leo.bugzilla.gaia) → needinfo?(alberto.pastor)

Comment 23

5 years ago
Hi Evan. I think moving activities handling to a new file is a good idea, but we need to take care of avoid regressions. I would suggest creating a new bug for every of those patches, explaining the refactor and the time wins, and attach a Pull Request. I'll review them and land them as soon as we are sure everything is fine. Thanks!
Flags: needinfo?(alberto.pastor)
(Assignee)

Comment 24

5 years ago
Hi Alberto,

I'll create a new bug for these patches.

And I will mark as duplicate as Bug 848771.

Thanks for your review.
(Assignee)

Updated

5 years ago
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 848771
You need to log in before you can comment on or make changes to this bug.