Page MenuHomePhabricator

Subscribe/Unsubscribe newsletter floating dialog disappears too soon
Closed, ResolvedPublic

Description

@Peteforsyth says:

In the test instance, when I click "Subscribe," there's a popup notification with some text, but it goes away very quickly. This is frustrating if you want to absorb the information but can't read quickly enough. Any way to have it stay?

Tested in http://newsletter-test.wmflabs.org/wiki/Special:Newsletters

I agree that the time for that floating dialog could be longer, or as Pete say just make it stay until it is clicked.

Details

Related Gerrit Patches:
mediawiki/extensions/Newsletter : masterReverted floating dialog duration to 5s
mediawiki/extensions/Newsletter : masterDisabled autoHide in Newsletter's floating dialogs

Event Timeline

QuimGil created this task.Jan 6 2017, 10:12 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 6 2017, 10:12 AM

Also, I just realized that this floating dialog is the same that appears when marking a page as patrolled. Is this a standard MediaWiki component? If it is, then I would not touch the behavior that makes it disappear after some time, for consistency.

Filip claimed this task.Jan 9 2017, 7:30 AM
Filip added subscribers: 01tonythomas, Filip.

@QuimGil: @01tonythomas: Hmm, in test wiki, subscribed to newsletter, and I does not get any pop-up notification.

MtDu added a subscriber: MtDu.Jan 9 2017, 11:19 AM

@FilipGCI
You need to go to Special:Newsletters, and subscribe/unsubscribe in order to get the pop-up dialog

Change 331255 had a related patch set uploaded (by Filip):
Disabled autoHide in Newsletter's floating dialogs

https://gerrit.wikimedia.org/r/331255

Filip added a comment.Jan 9 2017, 2:30 PM

@MtDu: Thanks you!

MtDu added a comment.Jan 9 2017, 4:27 PM

The change now looks ok, but I don't think we should show it forever. See https://doc.wikimedia.org/mediawiki-core/master/js/#!/api/mw.notification. There is an option called autoHideSeconds, which defaults to 5. That is what is causing the problem. I think we should change it to 10.

Filip added a comment.Jan 9 2017, 4:36 PM

@MtDu: But this is for notification. We can't create notification from this class. Look at comments in this code, we should use mw.notify, with does not have this option.

Filip added a comment.Jan 9 2017, 5:37 PM

@MtDu: We can also create new notification, change its autoHideSecounds, and notification.notify(), but its not a good solution. I think, hide on click is better solution, simplier, and code its clean.

Filip added a comment.Jan 9 2017, 7:44 PM

@QuimGil: (For disappear time solution) Ok, we can't just edit parameter of notification. Notifications should be fired form mw.notify, which does not have setting AutoHideSecounds. And we can't just make new notification, and edit this parameter, becouse this class is not meant to be used like that. So lets keep code correct, and use this 'on-click disappear' solution.

Florian closed this task as Resolved.Jan 9 2017, 8:14 PM

Change 331255 merged by jenkins-bot:
Disabled autoHide in Newsletter's floating dialogs

https://gerrit.wikimedia.org/r/331255

Very good, thank you!

Filip added a comment.Jan 13 2017, 5:20 PM

@01tonythomas @QuimGil: @MtDu Its not a good solution. So:
In T155228 I'm fixing this bug with autoHideSeconds T155228 . When this will be merged, we should use this option here. The only problem is older MW releases.

Change 332090 had a related patch set uploaded (by MtDu):
Extend floating dialog duration to 10s

https://gerrit.wikimedia.org/r/332090

@01tonythomas: @QuimGil: @MtDu: After T155228 we wanted to modify this setting, but I see, messages got edited. ^^ I'm not sure. Anyway, thanks @MtDu for help with this!

Filip added a comment.Jan 17 2017, 7:20 PM

I think this should be reverted to 5s? T154770 complicated this...

Qgil added a subscriber: Qgil.Jan 18 2017, 7:02 AM

Yeah, I think this is partially my bad because I was asking to increase the time and then I proposed to cut the text, in different tasks. Five seconds should be enough for the current, shorter text. Sorry!

Change 332090 merged by jenkins-bot:
[mediawiki/extensions/Newsletter@master] Reverted floating dialog duration to 5s

https://gerrit.wikimedia.org/r/332090