Page MenuHomePhabricator

Replace use deprecated Xml::fieldset and Xml::buildForm in AbuseFilter
Closed, ResolvedPublic

Description

The functions Xml::fieldset and Xml::buildForm are soft-deprecated and must be removed, before the functions are hard-deprecated.

While Xml::fieldset can be replaced with functions of the Html class, the usage Xml::buildForm should be replaced with OOUI or Codex widgets, maybe by using a HtmlForm

Event Timeline

Change #1222818 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/AbuseFilter@master] Replace deprecated Xml::fieldset

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

Change #1222818 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] Replace deprecated Xml::fieldset

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

Change #1236828 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/AbuseFilter@master] Replace deprecated Xml::buildForm for edit form on Special:AbuseFilter

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

Change #1236828 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] Replace deprecated Xml::buildForm for edit form on Special:AbuseFilter

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

It looks like the latest patch introduced a side effect. The interface labels are too wide now.

Before:

Previous edit interface.PNG (499×1 px, 24 KB)

Previous edit interface (html).PNG (299×402 px, 14 KB)

After:

Current edit interface.PNG (343×1 px, 21 KB)

Current edit interface (html).PNG (415×400 px, 22 KB)

Something like the following at least works, although hardcoded width constraints elsewhere need to be handled separately.

#mw-abusefilter-editing-form > fieldset:first-child > .oo-ui-fieldLayout > .oo-ui-fieldLayout-body {
	> .oo-ui-fieldLayout-header {
		flex: 0 1 15em;
		max-width: 20%;
		overflow-wrap: break-word;
	}

	> .oo-ui-fieldLayout-field {
		flex: 1 1 auto;
		white-space: normal;
		overflow-wrap: break-word;
	}
}

Change #1238795 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/AbuseFilter@master] On Special:AbuseFilter/<id> use a bigger column for form fields

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

This is the normal OOUI styling, which defines the right column as 60%

This is the normal OOUI styling, which defines the right column as 60%

This is not normal, it must be fixed ASAP.

As Dragoniez and codenamenoreste have already said, this either has to be amended or reverted. We can't be expected to work with filters like this.

This is also completely broken on my phone. . The Ace editor is about one pixel wide. (Android, Firefox 149)

This is also completely broken on my phone. . The Ace editor is about one pixel wide. (Android, Firefox 149)

This is also the same case for me.

IMG_6121.png (2×1 px, 883 KB)

IMG_6122.png (2×1 px, 757 KB)

While I don't doubt that this styling is consistent with the normal styling of OOUI, I don't think this is a net positive for those working with abuse filters on projects. As others have said, there should be a revert on this, unless someone is able to whip up a quick fix to this to enable people to get back to their normal workload. Broken on my PC on Chrome v144.0.7559.133.