User talk:SD0001/W-Ping

Latest comment: 5 months ago by SD0001 in topic More than 1 ping

Some feedback

edit

@SD0001: <- "ping", lol - thanks for creating this. I wanted to give you some feedback (based on this version), if that's okay.

  1. The "snooze" and "dismiss" links don't seem to do anything - my guess is that the way you have the event handler set up isn't working properly. Can I suggest, potentially, having the link's "target" be the invocation of the function via 'javascript:'? Either way, you should know that it doesn't seem to work
  2. Nothing is shown if there are no changes on the watchlist, even if it is later refreshed (via show new changes, not webpage refresh) - likely caused by line 213 adding the pings based on the changes
  3. Console errors reported that the API call on line 222 failed - "Cannot read property 'get' of undefined" - likely caused by line 26 not setting the API as a variable
  4. When saving a new ping, the user is told that it is being scheduled, but the window closes without confirmation that it was saved
  5. The cancel button doesn't always appear

Sorry if this sounds harsh - it isn't meant like that. I'm glad that you have created this, and look forward to using it. Thanks so much, --DannyS712 (talk) 05:43, 20 October 2019 (UTC)Reply

@DannyS712: Thanks for the bug reports. It is very much appreciated. I took the liberty of changing your bulleted list to numbered list so that I can respond easily.
  • #3: that was some weird bug. I had var api defined in the outermost scope and initialized to new mw.Api() as soon as mediawiki.api was loaded. It was working alright when I tested the script through my localhost import. But not when imported from the wiki script page. I don't know why. Anyway, I have changed things now so that everything is put inside a WPing global object - and it appears to work now.
  • #1: just a consequence of #3 - the console error was stopping the event handlers from being attached (which appears later in the code).
  • #2: nice catch! fixed.
  • #4: Actually, this is by design. The window autocloses if the operation is successful - so that the user doesn't have to close it themself. If the operation is not successful, on the other hand, the window will display an error and not not autoclose. But yeah, maybe this isn't the best user experience.
  • #5: Cancel button is supposed to appear only if a ping was already set for the page before, so that you can cancel that ping from occurring. It won't be shown if you're trying to set up a ping for the page for the first time. Again, this is perhaps a bit confusing and not the best UX. I think I should just clarify this in the documentation.

SD0001 (talk) 09:58, 20 October 2019 (UTC)Reply

Work for logs?

edit

@SD0001:, if I want to set a reminder to look at some user logs right now I have to set the reminder on the user. Anyway the script could be made to appear in a menu on log pages as well? Best, Barkeep49 (talk) 20:43, 5 August 2020 (UTC)Reply

  Done @Barkeep49: it should now work on logs and contribs pages as well. SD0001 (talk) 10:52, 23 August 2020 (UTC)Reply
Thanks SD0001. It's much appreciated. Best,Barkeep49 (talk) 15:57, 23 August 2020 (UTC)Reply

Thanks!

edit

This is such a great tool. I use it constantly. —valereee (talk) 12:05, 20 June 2021 (UTC)Reply

Feature request

edit

2, 3, 6 months, and even a year buttons would be nice. Some of us operate in long term projects. Why not? Piotr Konieczny aka Prokonsul Piotrus| reply here 13:40, 5 October 2021 (UTC)Reply

Did I miss a config step?

edit

Hi, I just imported it, and I see it in the "More" dropdown. But, when I click it, in the box that pops up, I see the header, "Schedule a watchlist ping for User:SD00001/W-Ping". Shouldn't it say, "schedule a watchlist ping for User:Mathglot?" I'm afraid to set one, because I'm worried that it will end up on your Watchlist instead of mine. Did I miss a configuration step somewhere? Or am I just misreading the intent of that header? If the latter, and it's not too hard, a modification to supply the user id (or no id) might be less confusing. (I'd still like to see the name of your script somewhere, maybe a linked, small-font footer or something.) Thanks, Mathglot (talk) 08:08, 27 July 2023 (UTC)Reply

@Mathglot Apologies for delayed response - only seeing this now.
The header shows the name of the currently open page. If you invoke it while viewing your user page, it will indeed say "schedule a watchlist ping for User:Mathglot". This page name (along with the ping reason) would show up on your watchlist at the designated time. By the way, it is not possible for any script or tool to modify someone else's watchlist. – SD0001 (talk) 09:26, 9 November 2023 (UTC)Reply
edit

Please add a link to Upcoming watchlist pings after the Pings title in the watchlist output — GhostInTheMachine talk to me 11:52, 1 December 2023 (UTC)Reply

Add "added"

edit

It would be good if the list of pings showed the date/time that an item was added — GhostInTheMachine talk to me 11:56, 1 December 2023 (UTC)Reply

... and are sorted by the date/time due — GhostInTheMachine talk to me 09:30, 29 December 2023 (UTC)Reply

More than 1 ping

edit

I maintain WP:URLREQ and frequently need to wait a week or month before I can proceed fixing link rot for a certain domain. Indeed, some domain needs to be checked every couple years. It would be great if I can enable an unlimited number of pings for this page. Currently each page can have only 1 ping, creating a new ping overwrites the old one. -- GreenC 23:12, 3 June 2024 (UTC)Reply

Short-term: maybe add a second ping on the wikipedia:URLREQ redirect? — GhostInTheMachine talk to me 05:48, 4 June 2024 (UTC)Reply
Each page is limited to one ping so it would get pretty messy. -- GreenC 16:21, 5 June 2024 (UTC)Reply
What would each ping be? Are you after a series of specific dates? How about extending a ping to have a repeat-interval? Currently all pings will have no repeat, so it should be forward compatible – although each ping would need to be acknowledged to enable the rollover — GhostInTheMachine talk to me 18:52, 5 June 2024 (UTC)Reply

I'm not a JS programmer, but looking at the source, on line #176 there is an associative array called opt[page] that uses the page name as the index value of the array, thus it is in-effect unique'ing the list of pages and allowing for only 1 page of each name. It looks similar, in function attachPings(). There are probably places in the code where this data structure would need to be replaced with one that can hold multiple entries for each page name. For example, make the associate array index very unique, like combining the pagename, time and reason into a single string, with separators like "{&}" so that it can be parsed. There might be other issues with multi-ping-single-page that I am not aware of, but if the data structure design is the only issue, it should not be too difficult. -- GreenC 16:43, 5 June 2024 (UTC)Reply

@SD0001: pinging in cases you didn't see it on your watchlist. -- GreenC 22:55, 5 June 2024 (UTC)Reply
Something like that, yes, but figuring out the UI is more of a problem. – SD0001 (talk) 09:26, 6 June 2024 (UTC)Reply