Page MenuHomePhabricator

Clear button invisible in AbuseFilter date/time inputs
Closed, ResolvedPublicBUG REPORT

Description

The date/time input widgets on Special:AbuseLog, Special:AbuseFilter/examine, Special:AbuseFilter/test, etc. (searching for datetime in the extension repo also returns AbuseFilterViewRevert.php, which I'm not sure renders which page) lack the OOUI clear icon on the clear button. oojs-ui.styles.icons-interactions should be added to dependencies.

Current:

abuselog.png (380×370 px, 6 KB)

After running mw.loader.load( 'oojs-ui.styles.icons-interactions' ):

abuselog2.png (380×370 px, 6 KB)

Event Timeline

Daimona subscribed.

I can not reproduce on itwp, likely because something else is already loading the module, but I can reproduce locally. However, it feels wrong-ish to have to declare this dependency manually. AbuseFilter creates these fields via HTMLForm (example), which is as easy as adding a structured entry to an array. The fact that datetime also requires loading a specific module seems an implementation detail that the caller needs not know about. Also, IIUC, these modules are meant to be loaded when creating widgets on the JS side, but everything here is done in PHP. Perhaps this is a regression in MW core / HTMLForm? Either way, loading the module in AF doesn't feel like the right solution.

Change 731352 had a related patch set uploaded (by Nardog; author: Nardog):

[mediawiki/core@master] Fix invisible DateTimeInputWidget clear button

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

Change 731352 merged by jenkins-bot:

[mediawiki/core@master] Fix invisible DateTimeInputWidget clear button

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

Nardog claimed this task.