Closed Bug 991114 Opened 10 years ago Closed 10 years ago

[Contacts] Invalid text when user delete multiple contacts

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:2.0+, b2g-v2.0 fixed)

VERIFIED FIXED
1.4 S6 (25apr)
blocking-b2g 2.0+
Tracking Status
b2g-v2.0 --- fixed

People

(Reporter: lolimartinezcr, Assigned: crdlc)

References

Details

Attachments

(2 files)

Today's (4/2) master build:
Device: Hamachi
BuildId: 20140401065548
Gaia: f9a44b5
Gecko: f1b5b05
Platform version: 31.0a1

Reproducible 100%

Pre-requisites:
Saved contacts

STR
1) Tap Contacts aplication.
2) Tap on "Settings".
3) Tap "Delete Contacts" button.
4) Tap "Select all" button.

Actual result:
Screen attached with title "The page at app://communications.gaiamobile.org says"

Expected result:
Screen attached with valid title.
Attached image 2014-04-02-11-05-49.png
blocking-b2g: --- → 1.5?
triage: 1.5+ to make sure this is fixed for a newly landed feature
blocking-b2g: 1.5? → 1.5+
Blocks: 956219
Some updates:

It looks like a common problem for all apps that use "entry_points" in manifest. Regarding this particular case, originally contacts app has "app.config.origin" that is equal to "http://communications.gaiamobile.org:8080". In [1] it becomes equal to "http://communications.gaiamobile.org:8080/contacts/index.html". 

When alert\prompt\... is called it's caught by [2] where "evt.detail.title" initially is set to "The page at http://communications.gaiamobile.org:8080 says:". Afterwards there is an attempt to make title more useful at [3] and here we'll literally have:

"'The page at http://communications.gaiamobile.org:8080 says:'.contains('http://communications.gaiamobile.org:8080/contacts/index.html')" that can't be true for both "config.url" and "config.origin".

Hey Ghislain, as you created this title extraction code, could you please advise on what b2g\gaia part doesn't work correctly here?

[1] https://github.com/mozilla-b2g/gaia/blob/33b5bcb1a092172c983ef178766869aba738ad4d/apps/system/js/browser_config_helper.js#L70
[2] https://github.com/mozilla-b2g/gaia/blob/33b5bcb1a092172c983ef178766869aba738ad4d/apps/system/js/app_modal_dialog.js#L26
[3] https://github.com/mozilla-b2g/gaia/blob/33b5bcb1a092172c983ef178766869aba738ad4d/apps/system/js/app_modal_dialog.js#L455-L459
Flags: needinfo?(aus)
triage: obvious UI problem, this stays as 2.0+
As mentioned by Cristian in https://bugzilla.mozilla.org/show_bug.cgi?id=1000756#c0, there is 2 UI issues to be solved here:
1) "The page at app://communications.gaiamobile.org says:" like title
2) Cancel | OK (blue - recommendation) buttons. These should be Cancel | Remove (red - danger)
Assignee: nobody → crdlc
Attached file 18632.html
Thanks for your review
Attachment #8411695 - Flags: review?(francisco.jordano)
Status: NEW → ASSIGNED
Comment on attachment 8411695 [details]
18632.html

Amazing work, tested and working perfect
Attachment #8411695 - Flags: review?(francisco.jordano) → review+
Flags: in-moztrap+
Merged in master:

https://github.com/mozilla-b2g/gaia/commit/d9490266f44f5727566a942e290e138f2f90823a
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.4 S6 (25apr)
(In reply to Oleg Zasypkin [:azasypkin] from comment #3)
> When alert\prompt\... is called it's caught by [2] where "evt.detail.title"
> initially is set to "The page at http://communications.gaiamobile.org:8080
> says:". Afterwards there is an attempt to make title more useful at [3] and
> here we'll literally have:
> 
> "'The page at http://communications.gaiamobile.org:8080
> says:'.contains('http://communications.gaiamobile.org:8080/contacts/index.
> html')" that can't be true for both "config.url" and "config.origin".
> 
> Hey Ghislain, as you created this title extraction code, could you please
> advise on what b2g\gaia part doesn't work correctly here?

Oleg, that'd be an issue with the code I wrote, unfortunately. It should test for the scheme + host part of the URL but not it's full path. The code as written works for single origin applications but not for multi-app in one (such as contacts!). If you could file a bug and CC me on it I'll bring it up in the Systems FE triage next week.
Flags: needinfo?(aus)
See Also: → 1001269
(In reply to Ghislain Aus Lacroix [:aus] from comment #10)
> (In reply to Oleg Zasypkin [:azasypkin] from comment #3)
> > When alert\prompt\... is called it's caught by [2] where "evt.detail.title"
> > initially is set to "The page at http://communications.gaiamobile.org:8080
> > says:". Afterwards there is an attempt to make title more useful at [3] and
> > here we'll literally have:
> > 
> > "'The page at http://communications.gaiamobile.org:8080
> > says:'.contains('http://communications.gaiamobile.org:8080/contacts/index.
> > html')" that can't be true for both "config.url" and "config.origin".
> > 
> > Hey Ghislain, as you created this title extraction code, could you please
> > advise on what b2g\gaia part doesn't work correctly here?
> 
> Oleg, that'd be an issue with the code I wrote, unfortunately. It should
> test for the scheme + host part of the URL but not it's full path. The code
> as written works for single origin applications but not for multi-app in one
> (such as contacts!). If you could file a bug and CC me on it I'll bring it
> up in the Systems FE triage next week.

Sure, filed a bug 1001269.

Thanks!
Tested and working
1.5
Hamachi
Gecko: 7db7603
Gaia: facd91d
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: