Notification of new mail is not shown, if the duration is 1.0 second

RESOLVED FIXED in Thunderbird 53.0

Status

Thunderbird
Mail Window Front End
--
minor
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: Tahtu, Assigned: aceman)

Tracking

45 Branch
Thunderbird 53.0

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

2 years ago
Created attachment 8817167 [details]
Unbenannt.png

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:50.0) Gecko/20100101 Firefox/50.0
Build ID: 20161129173726

Steps to reproduce:

I configured the New-Mail-Notification to be shown for 1.0 seconds.


Actual results:

Nothing!

The notification will not be shown and I don't hear the sound.

But I see it, if I increase the time. If I set it to 1.5 seconds, I see it sometimes. If I set it to 2.0 I see it often - but not always.


Expected results:

Bad question...

... indeed the notification should be show and the sound should be played.
(Reporter)

Updated

2 years ago
Severity: normal → minor

Comment 1

2 years ago
yeah. confirm no visible alert at 1.0 secs.  (But I only did one test pass with 45.5.0)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Notification of new mail is now shown, if the duration is 1.0 second → Notification of new mail is not shown, if the duration is 1.0 second
(Reporter)

Comment 2

2 years ago
I'm using 45.5.1
Maybe this happens because of the fade-in/fade-out animations.
(Assignee)

Comment 4

2 years ago
The comment at https://dxr.mozilla.org/comm-central/rev/8881e860371794a64312b206e086ec10f7f9a827/mailnews/base/content/newmailalert.js#13 says the time should be without the animation.

Can you set the pref alerts.disableSlidingEffect to false to disable the animation and see what happens?
(Assignee)

Comment 5

2 years ago
At https://dxr.mozilla.org/comm-central/rev/8881e860371794a64312b206e086ec10f7f9a827/mailnews/base/content/newmailalert.js#137 I'd think we include the animation time in the total time. event.elapsedTime is 0 at the START of the animation, at the end it contains the duration of the animation. See https://developer.mozilla.org/en-US/docs/Web/API/AnimationEvent/elapsedTime and https://drafts.csswg.org/css-animations/#eventdef-animationevent-animationend

So if the animation takes 1 second, we fade out the notification immediately.
(Assignee)

Comment 6

2 years ago
(In reply to Richard Marti (:Paenglab) from comment #3)
> Maybe this happens because of the fade-in/fade-out animations.

Will you make the patch when you found the culprit? :)

Or do we want to change the spec and have the timeout include the animation time (but currently it is only the initial fade-in animation). In that case we would need to disallow setting the timeout to a low value as 1.0. In any case, I didn't find css which would set the duration of the animation. Can you add such so that some change of implicit duration doesn't surprise us in the future :)
(Reporter)

Comment 7

2 years ago
(In reply to :aceman from comment #6)
> In that case we would need to disallow setting the timeout to a low value as
> 1.0.

I didn't check this, bug I have believe the notification is shown more than one second, if I set it to 1.0 seconds. Maby I think this, since the animated fade in / fade out. But maybe it will shown longer.

Nevertheless, if I set the time to 2.0 seconds, I do not have every time the notification too. In rarely cases, I miss the notification in this case too.

I would be happy to have 1.0 seconds notification. I hear a sound, look to the notification, and want to go ahead with my work. Every longer time of the notification bothers me...


PS
Thank you for working on this problem!
Have you tried this:

(In reply to :aceman from comment #4)
> Can you set the pref alerts.disableSlidingEffect to false to disable the
> animation and see what happens?

To be sure deactivating animation helps.
Flags: needinfo?(mozilla.5.tahtu)
(In reply to :aceman from comment #6)
> (In reply to Richard Marti (:Paenglab) from comment #3)
> > Maybe this happens because of the fade-in/fade-out animations.
> 
> Will you make the patch when you found the culprit? :)

The animation is set in toolkit. It would be better (and safer) if you could do this in JS than me.

> Or do we want to change the spec and have the timeout include the animation
> time (but currently it is only the initial fade-in animation). In that case
> we would need to disallow setting the timeout to a low value as 1.0. In any
> case, I didn't find css which would set the duration of the animation. Can
> you add such so that some change of implicit duration doesn't surprise us in
> the future :)

Or could we set a minimum there the animations are used? Something like 3 seconds?
(Reporter)

Comment 10

2 years ago
(In reply to Richard Marti (:Paenglab) from comment #8)
> To be sure deactivating animation helps.

Is this a question to me? If yes, how can I deactivate the animation?
(Assignee)

Comment 11

2 years ago
(In reply to Richard Marti (:Paenglab) from comment #8)
> (In reply to :aceman from comment #4)
> > Can you set the pref alerts.disableSlidingEffect to false to disable the
> > animation and see what happens?
> 
> To be sure deactivating animation helps.

Sorry, the value should be "true" to disable it.

(In reply to Richard Marti (:Paenglab) from comment #9)
> (In reply to :aceman from comment #6)
> > (In reply to Richard Marti (:Paenglab) from comment #3)
> > > Maybe this happens because of the fade-in/fade-out animations.
> > 
> > Will you make the patch when you found the culprit? :)
> 
> The animation is set in toolkit. It would be better (and safer) if you could
> do this in JS than me.

Can't we set it in our newmailalert.css? I mean to set it to a fixed value like 1 seconds.
 
> > Or do we want to change the spec and have the timeout include the animation
> > time (but currently it is only the initial fade-in animation). In that case
> > we would need to disallow setting the timeout to a low value as 1.0. In any
> > case, I didn't find css which would set the duration of the animation. Can
> > you add such so that some change of implicit duration doesn't surprise us in
> > the future :)
> 
> Or could we set a minimum there the animations are used? Something like 3
> seconds?

But then we would have different durations for when the notification is fully visible (e.g. only 1 second excluding the animation, or 2seconds in current calculation where fadeout is not counted). With the pref set, there would be no animation and notification is fully shown for 3 seconds.
(Assignee)

Comment 12

2 years ago
(In reply to mozilla.5.tahtu from comment #10)
> (In reply to Richard Marti (:Paenglab) from comment #8)
> > To be sure deactivating animation helps.
> 
> Is this a question to me? If yes, how can I deactivate the animation?

Yes, go into tools->options->advanced->general->config editor. Find alerts.disableSlidingEffect and set it to true.
(Reporter)

Comment 13

2 years ago
(In reply to Richard Marti (:Paenglab) from comment #8)
> To be sure deactivating animation helps.

If I deactive the animation, I see the notification. I tested this tree times with 1.0 seconds.

Now, I feel 1.0 seconds is one second. So my feeling about too long showing the notification based on the animation.
(Assignee)

Comment 14

2 years ago
I think this needs to define the specification for the feature, whether the notification time includes the fadein/out animation, or not. E.g. on my Linux the notification text is NOT readable while it is fading.
OS: Unspecified → All
Hardware: Unspecified → All

Comment 15

2 years ago
I think it makes sense to exclude the fadein/out time from the notification time.
(Reporter)

Comment 16

2 years ago
(In reply to mozilla.5.tahtu from comment #13)
> (In reply to Richard Marti (:Paenglab) from comment #8)
> > To be sure deactivating animation helps.
> 
> If I deactive the animation, I see the notification. I tested this tree
> times with 1.0 seconds.

Today, I missed multiple notifications ... while I set the notification time to 1.5 seconds.
(Reporter)

Comment 17

2 years ago
(In reply to mozilla.5.tahtu from comment #16)
> Today, I missed multiple notifications ... while I set the notification time
> to 1.5 seconds.

The animation is still deactivated on my system.
When I set the notification to 1 sec I see them clearly and with animation at the start and the end. Could this be an issue with your graphics driver? What system (CPU/graphics) do you have?
(Reporter)

Comment 19

2 years ago
(In reply to Richard Marti (:Paenglab) from comment #18)
> When I set the notification to 1 sec I see them clearly and with animation
> at the start and the end. Could this be an issue with your graphics driver?
> What system (CPU/graphics) do you have?

I have a MacBook with Intel Core i5-2435M CPU @ 2.40 GHz and Intel HD Graphics 3000.

For the graphic, I installed the lastest update last week. But I missed the notification before that update too.

If I don't see the notification, I also do not hear a sound of the notification.
(In reply to Tahtu from comment #19)
> If I don't see the notification, I also do not hear a sound of the
> notification.

Then this isn't an issue with the appearing time when also no sound is played.
(Reporter)

Comment 21

2 years ago
(In reply to Richard Marti (:Paenglab) from comment #20)
> Then this isn't an issue with the appearing time when also no sound is
> played.

... but if I set the time to 2.0 or more seconds, I mostly get the notification.

But Ok, seems here are no people who are interessed or able to fix this bug.

Have a nice live!
(Assignee)

Comment 22

2 years ago
That's and interesting conclusion when we proposed what changes to implement here.
Assignee: nobody → acelists
(Assignee)

Comment 23

2 years ago
Created attachment 8819555 [details] [diff] [review]
patch

Exclude animation time from the time the new mail alert is shown, as per the spec in the newmailalert.js file.

The animation duration for the fade in is defined in newmailalert.css to be 2 seconds. So for alert time of 1 we closed the notification immediately after it faded in.

I also personally often do not see the alert but that is random and with a higher alert time specified. That should be investigated in another bug.
Attachment #8819555 - Flags: review?(richard.marti)
Comment on attachment 8819555 [details] [diff] [review]
patch

Review of attachment 8819555 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good and does what we want. Thank you!
Attachment #8819555 - Flags: review?(richard.marti) → review+
(Assignee)

Comment 25

2 years ago
Thanks.
Status: NEW → ASSIGNED
Flags: needinfo?(mozilla.5.tahtu)
Keywords: checkin-needed

Updated

2 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 53.0
You need to log in before you can comment on or make changes to this bug.