Updated Echo to master. Clicked on the alert icon in toolbar. Clicked again to close it. Repeated this several times.
The network logs looks like as below
I believe it is not intentional to fetch messages on every open and close of icon.
• santhosh | |
Sep 7 2015, 4:15 AM |
F2551878: fbstatus1.png | |
Sep 7 2015, 4:15 AM |
Updated Echo to master. Clicked on the alert icon in toolbar. Clicked again to close it. Repeated this several times.
The network logs looks like as below
I believe it is not intentional to fetch messages on every open and close of icon.
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Only send api request if the popup is opening | mediawiki/extensions/Echo | master | +6 -3 |
It *is* intentional to fetch new messages on the opening of the flyout (Echo has been doing this since ever), but not on closing.
<s>Clicking the badge doesn't close it, it triggers a reopen.</s> (Edit: Sorry, that's not true. I'm investigating now to see if the widget allows for differentiating between toggle "on" and toggle "off".)
That said, this should be fixed now, as I've added a safeguard against pulling multiple times while there's an ongoing request.
Change 236693 had a related patch set uploaded (by Mooeypoo):
Only send api request if the popup is opening
My investigation was fruitful, there's a fix now. The popup will now only send an API request when it is being opened, not when it is closed. There is a safeguard against multiple consecutive clicks, so the API request will not be sent if one is already underway.
The popup will now only send an API request when it is being opened, not when it is closed.
Checked in betalabs. No additional API requests when Alert/Messages popups are closed.
Double (or multiple subsequent) clicks will send additional requests though.