The default bug view has changed. See this FAQ.

[Messages] User doesn't receive any notification about incoming message if native modal dialog is shown

RESOLVED FIXED

Status

Firefox OS
Gaia::SMS
P2
normal
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: azasypkin, Assigned: azasypkin)

Tracking

(Blocks: 1 bug)

unspecified
ARM
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(blocking-b2g:2.0M+, b2g-v2.0 affected, b2g-v2.0M fixed, b2g-v2.1 affected, b2g-v2.2 affected)

Details

(Whiteboard: [sms-sprint-2.2S1][sms-sprint-2.2S3])

Attachments

(7 attachments)

Since native (window.alert or window.confirm) modal dialogs block app execution it won't react to any new incoming message until dialog is dismissed. 

This problem seems quite severe especially if user switches to other app or Home Screen when such dialog is shown. Then user will miss all incoming messages until he returns to Messages app and dismisses modal dialog or Messages app is killed by system/user. Obviously messages are stored in DB and will be shown once user dismisses modal dialog.

So the following cases are affected:

1. If user receives class-0 message and doesn't dismiss it (window.alert is used for class-0 messsages);
2. If user tries to attach large file and doesn't dismiss "File too large" dialog (window.alert is used for "File too large" dialog);
3. If user tries to delete any message via long tap context menu, but doesn't confirm deletion (window.confirm is used);
4. If user taps on "error" icon of failed message and doesn't confirm resending (window.confirm is used).

To fix this we'll probably have to switch to CustomDialog everywhere we use native modal dialogs.

[Blocking Requested - why for this release]: User may miss notifications about incoming messages that sounds quite serious
(Assignee)

Comment 1

2 years ago
Created attachment 8530119 [details] [review]
GitHub pull request URL (v2.0m)

Hey Steve,

I've asked to verify this patch in bug 1105129 comment 8 to check whether it works for class-0 message case, but can you please provide your early feedback on the approach itself?

It's wip patch for v2.0m, for master it should be updated a bit, since l10n lib updated, thus CustomDialog too.

I've left few explanations on GitHub.

Thanks!
Assignee: nobody → azasypkin
Status: NEW → ASSIGNED
Attachment #8530119 - Flags: feedback?(schung)
(Assignee)

Updated

2 years ago
Duplicate of this bug: 1105129
(Assignee)

Comment 3

2 years ago
Renominating to v2.0m? instead as duped bug 1105129 is v2.0m+
blocking-b2g: 2.1? → 2.0M?
Whiteboard: [sms-sprint-2.2S1]

Comment 4

2 years ago
Created attachment 8530251 [details]
mtklog_20141128_1955.rar

bug 1105129 test result: 
  Send a class 0 message to the MS. MS have not show the class 0 message, it just open the sms app (See the screenshot in the attachment).
(Assignee)

Comment 5

2 years ago
(In reply to ruihua.zhang from comment #4)
> Created attachment 8530251 [details]
> mtklog_20141128_1955.rar
> 
> bug 1105129 test result: 
>   Send a class 0 message to the MS. MS have not show the class 0 message, it
> just open the sms app (See the screenshot in the attachment).

Okay, thanks, will flash v2.0 + v2.0m gaia to see what is going on.
(Assignee)

Comment 6

2 years ago
(In reply to ruihua.zhang from comment #4)
> Created attachment 8530251 [details]
> mtklog_20141128_1955.rar
> 
> bug 1105129 test result: 
>   Send a class 0 message to the MS. MS have not show the class 0 message, it
> just open the sms app (See the screenshot in the attachment).

Okay I see the problem: looks like patch ("class0.diff") from archive in attachment 8530251 [details] is different from what we asked to test in bug 1105129 comment 11.

Could you please try with the correct one? You can also use attachment 8530119 [details] [review]

Thanks!
Flags: needinfo?(ruihua.zhang.hz)

Comment 7

2 years ago
Created attachment 8530732 [details]
mtklog_20141201_1010.rar

(In reply to Oleg Zasypkin [:azasypkin] from comment #6)

My mistake. I had try the correct one and the result is the same:
The Class1 message can be received and display on the status bar,when you click it or enter SMS app to read the Class1 message, MS will display the Class0 message firstly, after you press OK key, then you can read the Class1 message.
Flags: needinfo?(ruihua.zhang.hz)

Comment 8

2 years ago
(In reply to ruihua.zhang from comment #7)
> Created attachment 8530732 [details]
> mtklog_20141201_1010.rar
> 
> (In reply to Oleg Zasypkin [:azasypkin] from comment #6)
> 
> My mistake. I had try the correct one and the result is the same:
> The Class1 message can be received and display on the status bar,when you
> click it or enter SMS app to read the Class1 message, MS will display the
> Class0 message firstly, after you press OK key, then you can read the Class1
> message.

Test result is OK.
(Assignee)

Comment 9

2 years ago
(In reply to ruihua.zhang from comment #8)
> (In reply to ruihua.zhang from comment #7)
> > Created attachment 8530732 [details]
> > mtklog_20141201_1010.rar
> > 
> > (In reply to Oleg Zasypkin [:azasypkin] from comment #6)
> > 
> > My mistake. I had try the correct one and the result is the same:
> > The Class1 message can be received and display on the status bar,when you
> > click it or enter SMS app to read the Class1 message, MS will display the
> > Class0 message firstly, after you press OK key, then you can read the Class1
> > message.
> 
> Test result is OK.

Great, thanks for checking!

Comment 10

2 years ago
Created attachment 8531011 [details]
screenshot_20141202.png

I just found a problem. Yesterday we had merge P2 patch from MTK, which include the patch of bug 1087116(make alert scrollable). Base on this, I use this patch and do a test again. I send a class 0 message to MS like the bug 1087116, and the result like the attachment(all the newline is replaced by blank).

Could you make some optimization?
(In reply to ruihua.zhang from comment #10)
> Created attachment 8531011 [details]
> screenshot_20141202.png
> 
> I just found a problem. Yesterday we had merge P2 patch from MTK, which
> include the patch of bug 1087116(make alert scrollable). Base on this, I use
> this patch and do a test again. I send a class 0 message to MS like the bug
> 1087116, and the result like the attachment(all the newline is replaced by
> blank).
> 
> Could you make some optimization?

Thanks for reporting, will see what we can do here.
It'll be nice when Fx implements html5 <dialog> element so that we can base CustomDialog on it some day. Not now though.
See Also: → bug 840640

Comment 13

2 years ago
(In reply to Oleg Zasypkin [:azasypkin] from comment #12)
> It'll be nice when Fx implements html5 <dialog> element so that we can base
> CustomDialog on it some day. Not now though.

Hi Oleg,
Thanks for the help. do you mean we will fix this "newline is replaced by blank" after bug 840640 is fixed?
Since partner is requesting this in 2.0M and device release date is soon. Can we have temp fix for 2.0M now?
(In reply to Josh Cheng [:josh] from comment #13)
> (In reply to Oleg Zasypkin [:azasypkin] from comment #12)
> > It'll be nice when Fx implements html5 <dialog> element so that we can base
> > CustomDialog on it some day. Not now though.
> 
> Hi Oleg,
> Thanks for the help. do you mean we will fix this "newline is replaced by
> blank" after bug 840640 is fixed?
> Since partner is requesting this in 2.0M and device release date is soon.
> Can we have temp fix for 2.0M now?

Hey Josh,

Sorry for the confusion, comment 12 is just for the record, once our bright "<dialog>" future comes :) 

For now, yeah, we'll fix both issues (comment 0 and comment 10) with what we have available already. So once I get feedback from Steve, I'll proceed with the full v2.0m and master patches.

Comment 15

2 years ago
(In reply to Oleg Zasypkin [:azasypkin] from comment #14)
> (In reply to Josh Cheng [:josh] from comment #13)
> > (In reply to Oleg Zasypkin [:azasypkin] from comment #12)
> > > It'll be nice when Fx implements html5 <dialog> element so that we can base
> > > CustomDialog on it some day. Not now though.
> > 
> > Hi Oleg,
> > Thanks for the help. do you mean we will fix this "newline is replaced by
> > blank" after bug 840640 is fixed?
> > Since partner is requesting this in 2.0M and device release date is soon.
> > Can we have temp fix for 2.0M now?
> 
> Hey Josh,
> 
> Sorry for the confusion, comment 12 is just for the record, once our bright
> "<dialog>" future comes :) 
> 
> For now, yeah, we'll fix both issues (comment 0 and comment 10) with what we
> have available already. So once I get feedback from Steve, I'll proceed with
> the full v2.0m and master patches.

Hi Oleg,

Is there any update?
Oleg is in holiday for 2 days to recover from his travel time. He'll be back tomorrow!
Comment on attachment 8530119 [details] [review]
GitHub pull request URL (v2.0m)

The overall implementation looks good, but Jenny would prefer to display the latest message on the top, so we might need to adjust the way we handle the queue or stack.
Attachment #8530119 - Flags: feedback?(schung) → feedback+
(In reply to Steve Chung [:steveck] from comment #17)
> Comment on attachment 8530119 [details] [review]
> GitHub pull request URL (v2.0m, wip)
> 
> The overall implementation looks good, but Jenny would prefer to display the
> latest message on the top, so we might need to adjust the way we handle the
> queue or stack.

Thanks for feedback! Will update patch with Jenny's request then.

Hey Josh, is too late to introduce new l10n strings in v2.0m patch? It's not really critical for this patch, but we need to know anyway.

Thanks!
Flags: needinfo?(jocheng)

Comment 19

2 years ago
Hi Oleg,
I am afraid it's too late for l10n strings work for 2.0M. Can we avoid it? 
If an l10n work for this patch is mandatory. I can try to negotiate with partner to do it by themselves after we provide patch. 
Please let me know your preference. Thank you!
Flags: needinfo?(jocheng)
(In reply to Josh Cheng [:josh] from comment #19)
> Hi Oleg,
> I am afraid it's too late for l10n strings work for 2.0M. Can we avoid it? 
> If an l10n work for this patch is mandatory. I can try to negotiate with
> partner to do it by themselves after we provide patch. 
> Please let me know your preference. Thank you!

Okay, got it. So I'll just use existing l10n strings from other places, but with the content I need :) I think it should be fine as v2.0m only solution.

Thanks!

Comment 21

2 years ago
Dear Oleg,
It’s closing to Woodduck device launch and partner is requesting patch for this bug asap. 
Could you provide a rough ETA date so I can come back to partner?
Thank you very very much!
blocking-b2g: 2.0M? → 2.0M+
Flags: needinfo?(azasypkin)
(In reply to Josh Cheng [:josh] from comment #21)
> Dear Oleg,
> It’s closing to Woodduck device launch and partner is requesting patch for
> this bug asap. 
> Could you provide a rough ETA date so I can come back to partner?
> Thank you very very much!

v2.0m patch will be ready for review in hour or so. I think we'll tightly collaborate with Steve to finish review and land it tomorrow.
Flags: needinfo?(azasypkin)
Comment on attachment 8530119 [details] [review]
GitHub pull request URL (v2.0m)

Hey Steve,

I've updated this patch with the following changes:

* I've found out that if we use our own Dialog instead of shared/custom_dialog we'll fulfil Jenny's requirement for free without any additional code, so I switched to it;

* Added/updated a bunch of unit tests + fix I've mentioned in bug 1069135 comment 69 to run utils test in full, we can get rid of this fix if we re-land patch for bug 1069135;

* Utils.alert/confirm have Promise return results to comply with use cases where we use modal dialogs;

* Using "sms-hacky-2.0.properties" to define required l10n strings (confirmed with :flod);

* Added CSS change to preserve line breaks inside long class-0 messages.


Ruihua Zhang could you please test the latest patch in the meantime and confirm that it works as you expect? 

Thanks!
Attachment #8530119 - Attachment description: GitHub pull request URL (v2.0m, wip) → GitHub pull request URL (v2.0m)
Flags: needinfo?(ruihua.zhang.hz)
Attachment #8530119 - Flags: review?(schung)

Comment 24

2 years ago
(In reply to Oleg Zasypkin [:azasypkin] from comment #23)
> Comment on attachment 8530119 [details] [review]
> GitHub pull request URL (v2.0m)
> 
> Hey Steve,
> 
> I've updated this patch with the following changes:
> 
> * I've found out that if we use our own Dialog instead of
> shared/custom_dialog we'll fulfil Jenny's requirement for free without any
> additional code, so I switched to it;
> 
> * Added/updated a bunch of unit tests + fix I've mentioned in bug 1069135
> comment 69 to run utils test in full, we can get rid of this fix if we
> re-land patch for bug 1069135;
> 
> * Utils.alert/confirm have Promise return results to comply with use cases
> where we use modal dialogs;
> 
> * Using "sms-hacky-2.0.properties" to define required l10n strings
> (confirmed with :flod);
> 
> * Added CSS change to preserve line breaks inside long class-0 messages.
> 
> 
> Ruihua Zhang could you please test the latest patch in the meantime and
> confirm that it works as you expect? 
> 
> Thanks!

The newline in class0 message display normal. The class0 message scrollable if the message is longer than the screen. The class1 message can be received if the MS receive the class0 message and press home key.

Test result is ok. Thanks!
Flags: needinfo?(ruihua.zhang.hz)
(In reply to ruihua.zhang from comment #24)
> (In reply to Oleg Zasypkin [:azasypkin] from comment #23)
> > Comment on attachment 8530119 [details] [review]
> > GitHub pull request URL (v2.0m)
> > 
> > Hey Steve,
> > 
> > I've updated this patch with the following changes:
> > 
> > * I've found out that if we use our own Dialog instead of
> > shared/custom_dialog we'll fulfil Jenny's requirement for free without any
> > additional code, so I switched to it;
> > 
> > * Added/updated a bunch of unit tests + fix I've mentioned in bug 1069135
> > comment 69 to run utils test in full, we can get rid of this fix if we
> > re-land patch for bug 1069135;
> > 
> > * Utils.alert/confirm have Promise return results to comply with use cases
> > where we use modal dialogs;
> > 
> > * Using "sms-hacky-2.0.properties" to define required l10n strings
> > (confirmed with :flod);
> > 
> > * Added CSS change to preserve line breaks inside long class-0 messages.
> > 
> > 
> > Ruihua Zhang could you please test the latest patch in the meantime and
> > confirm that it works as you expect? 
> > 
> > Thanks!
> 
> The newline in class0 message display normal. The class0 message scrollable
> if the message is longer than the screen. The class1 message can be received
> if the MS receive the class0 message and press home key.
> 
> Test result is ok. Thanks!

Thanks!
Quick update: since new patch for bug 1069135 has been just landed - I've rebased my PR on it to remove redundant changes.
Comment on attachment 8530119 [details] [review]
GitHub pull request URL (v2.0m)

The patch looks fine, although I'm wondering that the new alert's styling would be sightly different then the original window alert, ruihua.zhang already gave positive feedback per his/her testing. So I think the styling is not a serious concern here. Thanks for the great efforts!
Attachment #8530119 - Flags: review?(schung) → review+
Maybe do a quick ui-review with Fang?
(In reply to Steve Chung [:steveck] from comment #27)
> Comment on attachment 8530119 [details] [review]
> GitHub pull request URL (v2.0m)
> 
> The patch looks fine, although I'm wondering that the new alert's styling
> would be sightly different then the original window alert, ruihua.zhang
> already gave positive feedback per his/her testing. So I think the styling
> is not a serious concern here. Thanks for the great efforts!

Thanks for review!

(In reply to Julien Wajsberg [:julienw] from comment #28)
> Maybe do a quick ui-review with Fang?

Yeah, let's try - I'll prepare some screenshots shortly. + anyway it would be better to wait until bug 1110682 is resolved to be sure that all tests are green.
Created attachment 8535617 [details]
Dialogs (top - before the patch, bottom - after the patch)

Hey Fang,

We need your expert advice here :)

Some history behind the change: 

In Messages we use two types of dialogs: our custom dialog (#1, #2 and #3 on the screenshot) and native modal dialogs (#4, #5, #6). Since native modal dialogs have a bunch of technical limitations we decided to use the same non-native dialogs everywhere in Messages. That is the reason why dialogs #4, #5 and #6 changed their appearance. Top row is what we had in Messages before the patch, bottom row - with the patch applied.

As engineer I tend to have the same style for all dialogs (as in bottom row), but what are your thoughts on this?

Thanks!
Attachment #8535617 - Flags: ui-review?(fshih)

Updated

2 years ago
Priority: -- → P2

Updated

2 years ago
Blocks: 1080337
No longer blocks: 1107999

Comment 31

2 years ago
Dear Fang,
Could you help to provide review feedback as this is partner blocker bug. Thanks!
Flags: needinfo?(fshih)

Comment 32

2 years ago
Comment on attachment 8535617 [details]
Dialogs (top - before the patch, bottom - after the patch)

Hi Oleg, 
I agree with you that we use the same style for all the dialogs. But is there any reason that we have custom dialog on #1, #2, #3 at the beginning? We should have the same style design for all of our dialogs like other apps. The custom dialogs would conflict our common UI design. Can we change it back? 
Thanks!
Flags: needinfo?(fshih)
Attachment #8535617 - Flags: ui-review?(fshih) → ui-review-
(In reply to Fang Shih [:grasspizza] from comment #32)
> Comment on attachment 8535617 [details]
> Dialogs (top - before the patch, bottom - after the patch)
> 
> Hi Oleg, 
> I agree with you that we use the same style for all the dialogs. But is
> there any reason that we have custom dialog on #1, #2, #3 at the beginning?
> We should have the same style design for all of our dialogs like other apps.
> The custom dialogs would conflict our common UI design. Can we change it
> back? 
> Thanks!

Hey Fang,

Mmm, as far as I remember we always (at least last several months) used our custom dialogs for cases #1, #2 and #3 (this patch doesn't change it).

I agree that we should use the same dialogs for all apps, to give you current state of things, I've investigated through all dialogs we have in gaia a bit, here some observations: 

There are 3 "types" of dialogs that are used across the apps and every type has somewhat _different_ styles

* Gecko "native" dialogs (window.alert/window.confirm) - unfortunately we should avoid such dialogs due to technical limitations (dialogs #4, #5 and #6 used these styles previously);

* Custom gaia dialogs that are located in shared folder and some apps use it (SMS never used it);

* App-specific custom dialogs that are located in specific app folder (SMS and some other apps).

So, what styles should we use as common ground? Do we have any spec or something on this?

Also probably we can handle this in a separate bug.
Flags: needinfo?(fshih)

Comment 34

2 years ago
After an offline discussion with Oleg. We will change all the dialogs to the same style with the current common UI: http://buildingfirefoxos.com/building-blocks/confirm.html
And All the "OK" button should be blue. 

Thanks!
Flags: needinfo?(fshih)
(In reply to Fang Shih [:grasspizza] from comment #34)
> After an offline discussion with Oleg. We will change all the dialogs to the
> same style with the current common UI:
> http://buildingfirefoxos.com/building-blocks/confirm.html
> And All the "OK" button should be blue. 
> 
> Thanks!

Thanks Fang!

Hey Josh, we're going to land this patch on v2.0m without style updates as it seems quite urgent. Could you please confirm that you're fine with this and whether you need separate v2.0m patch for style changes mentioned in comment 34?

We'll definitely do style changes for the master patch :)

Thanks!
Flags: needinfo?(jocheng)

Comment 36

2 years ago
Dear Oleg,
Partner has tried the patch and they are fine with the current solution. I think we do not need separate v2.0m patch for style changes mentioned in comment 34. I'll help to communicate with partner later.
Thank you very much!

@Fang,
Thank you too!
Flags: needinfo?(jocheng)
(In reply to Josh Cheng [:josh] from comment #36)
> Dear Oleg,
> Partner has tried the patch and they are fine with the current solution. I
> think we do not need separate v2.0m patch for style changes mentioned in
> comment 34. I'll help to communicate with partner later.
> Thank you very much!
> 
> @Fang,
> Thank you too!

Okay, thanks!

v2.0m: https://github.com/mozilla-b2g/gaia/commit/09097552f236b1482ce469b4c7d92d80d0706f83

Working on master patch at the moment. Will be ready soon.
status-b2g-v2.0M: affected → fixed
Created attachment 8538336 [details]
Updated dialogs (master).zip

Hey Fang,

I've updated styles for dialogs inside Messages app, it has affected main dialogs inside apps, so asking for careful ui-review here :) 

Archive contains several screenshots for main dialogs that have changed, on the left side is what we had before patch, on the right side - with this patch. Especially I'm wondering if you're ok with "Remove recipient" and "Delete single message" dialog changes.

Please, ping me on IRC if you have any questions/suggestions/doubts.

Thanks a lot!
Attachment #8538336 - Flags: ui-review?(fshih)
Created attachment 8538338 [details] [review]
GitHub pull request URL (master)

Steve,

Here is the master patch that contains the same changes as in v2.0m one + style updates + some unexpected refactoring (left some clarifying comments at GitHub) :) Would you mind to review it?

Arnau, I'm proposing small style change in shared confirm.css to make confirm buttons _more_ centered and remove some js code in Messages to support single-button-confirm dialog. Can you please check if it looks fine for you?

Thanks!
Attachment #8538338 - Flags: review?(schung)
Attachment #8538338 - Flags: review?(rnowmrch)

Comment 40

2 years ago
Comment on attachment 8538336 [details]
Updated dialogs (master).zip

Thanks for the screenshots! Looks good!
The changed you've made looks fine to me as well! Thanks A lot!
Attachment #8538336 - Flags: ui-review?(fshih) → ui-review+
Comment on attachment 8538338 [details] [review]
GitHub pull request URL (master)

The BB part looks good but needs minor tweaks commented in github.
Thanks Oleg!
Attachment #8538338 - Flags: review?(rnowmrch) → review+
Hi Oleg, overall loks good, but I'll need more time to test on device. Since Bug 1018111 landed with some alert option changes, could you please rebase your patch based on this? Thanks!
Flags: needinfo?(azasypkin)
(In reply to Steve Chung [:steveck] from comment #42)
> Hi Oleg, overall loks good, but I'll need more time to test on device. Since
> Bug 1018111 landed with some alert option changes, could you please rebase
> your patch based on this? Thanks!

Thanks! No worries, take your time. I've rebased PR on the latest master :)
Flags: needinfo?(azasypkin)
Comment on attachment 8538338 [details] [review]
GitHub pull request URL (master)

The patch is really great that the styling of hte dialog could be unified. About your question for the deletion dialog, I think we could fire another bug for it. Thanks for the awsome work!
Attachment #8538338 - Flags: review?(schung) → review+
(In reply to Steve Chung [:steveck] from comment #44)
> 
> The patch is really great that the styling of hte dialog could be unified.
> About your question for the deletion dialog, I think we could fire another
> bug for it. Thanks for the awsome work!

Create bug 1115243 for it.
Whiteboard: [sms-sprint-2.2S1] → [sms-sprint-2.2S1][sms-sprint-2.2S3]
(In reply to Steve Chung [:steveck] from comment #44)
> Comment on attachment 8538338 [details] [review]
> GitHub pull request URL (master)
> 
> The patch is really great that the styling of hte dialog could be unified.
> About your question for the deletion dialog, I think we could fire another
> bug for it. Thanks for the awsome work!

Thanks for review! Nits fixed, Treeherder is green.

Master: https://github.com/mozilla-b2g/gaia/commit/322ef5116a5827a30c9a3cd9b842449a9c66a5b3
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
(Assignee)

Updated

2 years ago
Depends on: 1116101
(Assignee)

Updated

2 years ago
Depends on: 1116736
Depends on: 1125525
Did this land in v2.0m ?
Flags: needinfo?(azasypkin)
(In reply to Julien Wajsberg [:julienw] from comment #47)
> Did this land in v2.0m ?

Yes, sorry forgot to paste the link.

v2.0m: https://github.com/mozilla-b2g/gaia/commit/09097552f236b1482ce469b4c7d92d80d0706f83
Flags: needinfo?(azasypkin)
You need to log in before you can comment on or make changes to this bug.