User talk:Evad37/FFDcloser.js

Latest comment: 7 years ago by Evad37 in topic No response

Testing edit

  Resolved

@Evad37 and Jo-Jo Eumerus, hey, thought it would be good to centralize feedback here.

  1. It would be good to have an option for hiding closed discussions (especially when hunting for the one that needs closure in a stack of dozens) – perhaps include something like User:Mr.Z-man/hideClosedAFD.js?
    I made User:Czar/hideClosedFFD.js to do the collapsing, but I'm not sure how best to collapse the headings before each closed section czar 20:08, 23 July 2016 (UTC)Reply
  2. Tried to close the multi Wikipedia:Files_for_discussion/2016_May_26#Two_files and got this error: "FFDcloser says: API error: invalidtitle" Didn't get the edit summary right either, possibly because the heading wasn't a link? diff) Had to delete the two manually czar 19:39, 23 July 2016 (UTC)Reply
  3. Should also bold the keep rationale in the template: [1]
  4. I'd also consider not reloading the page after each image is processed (you lose your place, have to reset any toggles like hiding closed discussions, etc.) The tool on Commons marks the item as processed and adds a notice that it'll update on page refresh. (That way you can just keep going through the queue.)
  5. qDel works but it takes a while to process—not sure how the Commons and AFD scripts handle it, but they're much faster and might be worth copying czar 20:34, 23 July 2016 (UTC)Reply
1: Done, including section headings. I've adapted the code from your page into the script. - Evad37 [talk] 03:17, 24 July 2016 (UTC)Reply
2: Handling a multiple file nomination is a bit more complicated... but I have an idea of how it could be done.
@Czar: Done, should work with multi-file discussions now - Evad37 [talk] 13:29, 24 July 2016 (UTC)Reply
3: Should be easy enough to fix.
Done, the result/comment in {{oldffdfull}} is now bolded - Evad37 [talk] 03:30, 24 July 2016 (UTC)Reply
4: Will have to investigate, but doesn't seem to hard.
Done, discussions which have been closed will have the heading striked-out and a note of the close (replacing the close options) - Evad37 [talk] 05:33, 24 July 2016 (UTC)Reply
5: Will have to investigate. I'm not really an expert in code efficiency, but will take a look. - Evad37 [talk] 03:20, 24 July 2016 (UTC)Reply
  • Working well for me! Thanks for your work! A thought: I can't tell whether the confirmation of deletion is the pop-up or the change in HTML. The pop-up seems redundant and it would be best just to have the HTML change serve as the confirmation czar 20:22, 24 July 2016 (UTC)Reply
  • Also if the image is already deleted and I am just closing the discussion (Delete with comment), I get this pop-up: "FFDcloser says: API error: missingtitle", though it closes the section just fine anyway. czar 20:37, 24 July 2016 (UTC)Reply
    Thank you for testing and providing useful feedback. I think I'll change the message delivery to be via the html changes only, and try to differentiate between warnings (something may have gone wrong) and errors (something has definitely gone wrong) - Evad37 [talk] 00:58, 25 July 2016 (UTC)Reply
    Done - Evad37 [talk] 11:21, 25 July 2016 (UTC)Reply
    @Czar: - Evad37 [talk] 00:50, 26 July 2016 (UTC)Reply
  • Relisting with a comment doesn't need to add the signature twice [2] (fixed) czar 16:13, 26 July 2016 (UTC)Reply
    Okay. I only coded it with that way because of what the {{relist}} documentation said. - Evad37 [talk] 00:18, 27 July 2016 (UTC)Reply
  • Should probably handle cases like this, probably by not posting the template outside of filespace? czar 17:32, 26 July 2016 (UTC)Reply
    Yeah, I'll look at adding namespace sanity checks before performing edits or deletes - Evad37 [talk] 00:18, 27 July 2016 (UTC)Reply
    @Czar: Done. If no files are detected by the script, it will only offer "[Close]", which will just close the FFD section without making any other edits. - Evad37 [talk] 05:46, 27 July 2016 (UTC)Reply
  • None of the buttons work on Wikipedia:Files_for_discussion/2016_May_16#File:Soad_Hosny.27s_Birth_Certificate.jpg – perhaps an issue with the file name? czar 18:12, 26 July 2016 (UTC)Reply
Same for Wikipedia:Files_for_discussion/2016_May_16#File:20091104_Alisa_Weilerstein_-_Kod.C3.A1ly.27s_Sonata_for_Solo_Cello.2C_Op._8_-_3._Allegro_molto_vivace.ogg czar 19:26, 26 July 2016 (UTC)Reply
I think the apostrophes are mucking things up; I think I'll need to encode & decode them within the script - Evad37 [talk] 00:18, 27 July 2016 (UTC)Reply
Done - Evad37 [talk] 03:25, 27 July 2016 (UTC)Reply

No file detected edit

  Resolved

@Evad37: Every single request I have looked at says no file detected...is this expected? -- Amanda (aka DQ) 09:02, 7 August 2016 (UTC)Reply

No, that's just a fallback for unusual cases where the script can't determine any files (e.g. Wikipedia:Files for discussion/2016 May 15 § Question by User:PETEYTHEREF). Amanda, can you tell me which skin and browser you're using, and link to an example discussion where you're seeing this? And do you see "no file detected" messages at WP:FFD#Recent_nominations? Thanks, Evad37 [talk] 09:55, 7 August 2016 (UTC)Reply
(Actually, I see you're using your vector.js rather than common.js, so that probably rules out skin-compatibility issues... - Evad37 [talk] 09:59, 7 August 2016 (UTC))Reply
I am seeing the same error message, BTW. Jo-Jo Eumerus (talk, contributions) 10:02, 7 August 2016 (UTC)Reply
@DeltaQuad and Jo-Jo Eumerus: In Special:Preferences#mw-prefsection-rendering, do you have "Auto-number headings" ticked? - Evad37 [talk] 10:39, 7 August 2016 (UTC)Reply
Yes. Jo-Jo Eumerus (talk, contributions) 10:51, 7 August 2016 (UTC)Reply
@DeltaQuad and Jo-Jo Eumerus:: I've update the code to account for numbered headings, so it should hopefully be working now - Evad37 [talk] 13:11, 7 August 2016 (UTC)Reply
I was also, and this has fixed it. Thanks. -- Amanda (aka DQ) 06:54, 8 August 2016 (UTC)Reply
Are the line breaks something the template can handle? I've removed them from a dozen multinoms, which tend to sit if no one can easily close them czar 09:55, 15 January 2017 (UTC)Reply
@Czar: Took a bit of effort, but the script can now handle (single) linebreaks between items, e.g. see Wikipedia:Files_for_discussion/2017_January_10#TV3_Group_logos now offering proper closure options. - Evad37 [talk] 14:56, 15 January 2017 (UTC)Reply

Relists at top of page edit

  Resolved

Right now relists are added to the top of the page rather than the bottom. Is this by design? czar 17:19, 1 September 2016 (UTC)Reply

All the other XfD processes have newer discussions above older discussion, I didn't realise that FfD was the other way around. I'll look into adjusting the script later today. - Evad37 [talk] 23:08, 1 September 2016 (UTC)Reply
Also, Czar, collapsing old discussions when closed as "Relist" can cause problems – see User talk:Evad37/TFDcloser.js#Found a glitch – so I'll similarly change this script to remove the old discussion instead (which is the other option at WP:FFDAI#Relisting) - Evad37 [talk] 23:18, 1 September 2016 (UTC)Reply
@Czar:   Done - Evad37 [talk] 08:52, 5 September 2016 (UTC)Reply

Re-creates deleted talk page edit

 
  Acknowledged

@Evad37, sometimes a discussion has already been partially closed, and I'll use the "custom keep" rationale to close it out, only to find that the tool re-creates a talk page notice on the deleted file's talk page. E.g., two-file FfD: one file was already deleted as F5 (fair use not in use), and the other is ready to keep. I'll close with a custom keep rationale, and the talk page of the deleted F5 talk page will be re-created, when it should just be skipped. Thanks for your help with this tool—saves a lot of time! czar 19:59, 26 December 2016 (UTC)Reply

The script expects that for "keep"-type closes, the old ffd template should be added to the talk page (which gets created if it doesn't already exist). It should be possible to fix this by first doing a check to see that the File: page actually exists. - Evad37 [talk] 07:57, 27 December 2016 (UTC)Reply

Relists and indents edit

  Resolved

Not sure if this is the js or the template, but the Relist template breaks formatting when (1) the editor adds a comment in the prompt, and (2) the template adopts the previous indentation level. For example, Wikipedia:Files for discussion/2016 December 24#File:Skyler Day 2016.jpg czar 08:56, 15 January 2017 (UTC)Reply

@Czar: I've set it to add a linebreak just before the Relist template is added, which should stop it adopting any indentation. Per this edit [3], this should also solve the formatting of the relist comment. - Evad37 [talk] 09:53, 15 January 2017 (UTC)Reply
Thanks! It seems to be adding excessive space in some cases: [4] czar 06:56, 26 January 2017 (UTC)Reply
Hopefully this edit [5] should fix it - Evad37 [talk] 07:47, 26 January 2017 (UTC)Reply

Talk pages edit

 
  Acknowledged

Not sure if it's on every file, but sometimes I delete a file and the talk page is not deleted with it. (They should always be deleted with the file as G8.) czar 10:08, 20 January 2017 (UTC)Reply

That's on the to-do list for version 2. I think the "sometimes" is because a lot of the time file talk pages haven't been created in the first place. - Evad37 [talk] 16:04, 20 January 2017 (UTC)Reply

No response edit

  Resolved