Page MenuHomePhabricator

Allow case sensitivity configuration for TextMatchEditCheck
Closed, ResolvedPublic

Description

Another improvement to TextMatchEditCheck: allow individual rules (internally called matchItems) to specify their own case-sensitivity.

Event Timeline

Change #1197373 had a related patch set uploaded (by Medelius; author: Medelius):

[mediawiki/extensions/VisualEditor@master] TextMatchEditCheck: Case sensitivity improvements

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

Change #1197375 had a related patch set uploaded (by Medelius; author: Medelius):

[VisualEditor/VisualEditor@master] WIP: findText optimization for sets using Intl.Collator

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

Change #1197376 had a related patch set uploaded (by Medelius; author: Medelius):

[VisualEditor/VisualEditor@master] Make findText’s set condition use locale for lowercasing.

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

Change #1197376 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Make findText’s set condition use locale for lowercasing.

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

Change #1198410 had a related patch set uploaded (by Medelius; author: Medelius):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (b70ee4a11)

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

Change #1198410 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (b70ee4a11)

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

Change #1197373 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] TextMatchEditCheck: Case sensitivity improvements

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

QA: I’ve been keeping this doc updated with notes on TextMatch. The Testing/Demoing instructions section might be particularly helpful for you. Please let me know if you have any questions that aren’t covered there.

The code normalizes both map-based queries (words + replacements) and array-based queries at the start, so I don't anticipate any behavioral difference between the two. However, testing both types is probably a good idea.

Change #1197375 abandoned by Medelius:

[VisualEditor/VisualEditor@master] WIP: findText optimization for sets using Intl.Collator

Reason:

No longer considering this solution.

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

QA: I’ve been keeping this doc updated with notes on TextMatch. The Testing/Demoing instructions section might be particularly helpful for you. Please let me know if you have any questions that aren’t covered there.

The code normalizes both map-based queries (words + replacements) and array-based queries at the start, so I don't anticipate any behavioral difference between the two. However, testing both types is probably a good idea.

Thanks @medelius, for the detailed documentation with test instructions, it helped me a lot. I checked the case sensitivity configuration for both array-based and map-based queries. No issues found there.

I just wanted to confirm one thing, does invalidmode mean it will show only dismiss button as an action on the edit check dialog?

I'm glad it helped.

Yes, that's correct. Any mode that's not one of the defined ones - "info", "delete", "replace" - will default to the dismiss action.

Ryasmeen edited projects, added Verified; removed Editing QA.

Understood, thanks!