Page MenuHomePhabricator

Improvements to the editing interface
Open, Needs TriagePublic

Description

Reported by @Jules78120 on my talk page on meta (permalink), with my reply for completeness:

  1. [idea] Editing a filter is a chore because for long lines of regex, we have to scroll a lot. Idea: implementing automatic line wrap, as there is on coding softwares.
  2. [idea] For the same reason, idea: the edit window should be ''larger'' (it is ridiculously small on my 21.5 inchees screen) and ''resizable''.
  3. [bug] There are two edit software in Abusefilter. With the first one, sometimes (apparently because of some special letters) the mouse cursor is not shown where it is really. This is super-annoying, obviously.
  1. I think implementing line wrap might be doable. As a workaround, what I usually do is to break down regexps using string concatenation ("+"), which, I recognize, has some drawbacks.
  2. This is a good point, in particular making it resizable. However, I'm not sure if Ace editor (the one with syntax highlighting) is resizable, I'd have to check the docs.
  3. Yep, this is a known bug. And actually, this is also a bug in Ace editor, see for instance [https://github.com/ajaxorg/ace/issues/3037 here] and [https://github.com/ajaxorg/ace/issues/4434 here]. OTOH, I just tried to reproduce the bug but I haven't been able. I'm sure it used to happen more frequently in the past, and for more special characters. Unfortunately, there's not much we can do about that :-/

Event Timeline

Change 885069 had a related patch set uploaded (by Samtar; author: Samtar):

[mediawiki/extensions/AbuseFilter@master] abusefilter.css: Increase the default abusefilter editor width

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

Special:GraphSandbox loads WikiEditor wholesale, including the toolbar with the wrapping toggle button, unlike AbuseFilter which just borrows Ace from CodeEditor. That seems like an easier route than reinventing the wheel just for AbuseFilter. That way "Check syntax" can be real-time (T271717).

FYI, if that can help, @Od1n created a Javascript code that makes the Abusefilter edit window resizable.

Test wiki created on Patch demo by EpicPupper using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/d977752339/w

Test wiki on Patch demo by EpicPupper using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/d977752339/w/

Change 888349 had a related patch set uploaded (by Gerrit Patch Uploader; author: Jean-Luc Hassec):

[mediawiki/extensions/AbuseFilter@master] Make Ace filter editor resizable

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

Change 888349 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] Make Ace filter editor resizable

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

Change 885069 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] abusefilter.css: Increase the default abusefilter editor width

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