Page MenuHomePhabricator

Adding and removing whitespace in certain situations is annoying
Closed, ResolvedPublic

Description

Could we please have the bot not remove whitespace as it did in [https://en.wikipedia.org/w/index.php?title=Departures_(2008_film)&curid=21088389&diff=754185676&oldid=754148951 these] [https://en.wikipedia.org/w/index.php?title=Ed_the_Happy_Clown&curid=5348994&diff=755760075&oldid=748200879 edits?] It's really annoying, and only makes it harder to scan the citations for those of us maintaining the articles. I also notice it adds whitespace before each of the fields—why would it do that? The bot should not be arbitrarily changing formatting styles—editors choose these styles to better enable them to maintain these pages.

Event Timeline

The bot is also adding whitespace after each line. That definitely shouldn't be happening.

I can attempt to have it detect parameter alignment. The bot cannot anticipate everyone's different formatting preferences.

The bot needs to deconstruct the template so it can accurately parse and edit the template values correctly, and reliably. It attempts to re-assemble the template in a readable format when making the edit. It tries to comply with how the source was formatted earlier while making some non-controversial whitespace modifications to unify the templates.

Can't it just leave formatting alone? "Non-controversial" is definitely debateable—it makes extra work for editors to have this stripped out. These kinds of edits would not be allowed by human editors.

Can't it just leave formatting alone?

Not really per the comment I edited above. Conventional methods with regex in my experience make the problem even worse. The bot is capable of detecting multiline templates and keep the multiline, or keep it single line. I can add parameter alignment for multiline templates, it will take a bit to implement though. It tries to be gentle with the formatting, but all templates are formatted differently, so do please understand it's impossible to retain original formatting in all cases.

Can, for example, a template be added to articles to tell the bot to pass over them? I'd rather not have a bot cause me work like this on FAs that I've already put considerable work into and try to maintain.

Considering the diff you just cited, it would be better not to, and try to address this issue instead. Forcing the bot to skip those articles would undermine the consensus that formed to develop this bot in the first place. There is a strong local and global consensus to have IABot run. It is preserving sources after all. I can understand to have the values all line up for readability, and it's something I am willing to do to keep the users working with the bot happy, but the other whitespace seems very minor and uncontroversial. The whitespace at the start of each line was something I encountered the most on Wikipedia when I did my initial research on cite formatting for the bot.

How about this—a template to tell the bot to put this stuff on the talk page to leave to the maintaining editors to deal with.

Aklapper renamed this task from Whitespace to Adding and removing whitespace in certain situations is annoying.Dec 20 2016, 11:42 AM

I like that idea. Leaving messages on talk only is already a supported feature. Making it accessable via template would be easy.

I like that idea. Leaving messages on talk only is already a supported feature. Making it accessable via template would be easy.

So I added the following templates, {{cbtalkonly}} and {{cbnotalk}}. Place either one of them on the main article somewhere, and the bot will comply. If you want to pick out an article for me to test on tomorrow, please list it here. I would like to test this change before proceeding to the next bug.

These features have now been added. {{cbtalkonly}} leaves a message on the talk page only, and {{cbnotalk}} edits the main article already. Place either one of these on the main article somewhere to activate the restriction.

It looks like you've already gotten to it. Thanks a lot, by the way!