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.

Event Timeline

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 added subscribers: 01tonythomas, Filip.

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

@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

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.

@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.

@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.

@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.

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

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

@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!

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

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