Page MenuHomePhabricator

Change dropdown to searchbox in NotifyTranslators
Closed, ResolvedPublic8 Estimated Story Points

Description

https://meta.wikimedia.org/wiki/Special:NotifyTranslators displays a dropdown with each and every page that can be translated. This is very big, and hard to search. Could we have a searchbox instead?

Event Timeline

We can use the entity selector that we have on Special:MessageGroupStats: https://meta.wikimedia.org/wiki/Special:MessageGroupStats that offers a much better user experience.

Wangombe changed the task status from Open to In Progress.Mar 11 2024, 7:31 AM
Wangombe claimed this task.

Change 1011029 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/Translate@master] Add entity selector as a resource module.

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

Change 1011030 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/TranslationNotifications@master] Special:NotifyTranslators: Use entity selector for selecting message groups

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

Change #1014991 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/Translate@master] Entity selector: Add ability to filter for message groups

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

Change #1014991 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/Translate@master] Entity selector: Add ability to filter by message groups

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

Change #1011029 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Add entity selector as a resource module

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

Change #1014991 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Entity selector: Add ability to filter by message groups

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

Change #1024261 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/Translate@master] Entity selector: Fix unintentional change in regex

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

abi_ changed the point value for this task from 4 to 8.Apr 25 2024, 9:08 AM

Increasing the story points to reflect the increase in the scope of work

Change #1024261 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Entity selector: Fix unintentional change in regex

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

We should show information to the user about the status of the page i.e discouraged, and prevent submission of the form in such a case. We can use this approach to prevent scope creep with the filtering logic within the Entity Selector.

We should show information to the user about the status of the page i.e discouraged, and prevent submission of the form in such a case. We can use this approach to prevent scope creep with the filtering logic within the Entity Selector.

Adding some more context: When the user selects a page, we want to display more information about what the priority languages are (T358600: Display priority languages for the translatable page for which notification is being sent) or whether its discouraged by fetching these details via an API. When JS is disabled the selector does not have discouraged groups so that case is already handled.

Two things can be done:

  • Warn the user (warning)
  • Warn the user and don’t allow submitting the form (error)

And @abi_ listed two cases:

  • Discouraged group. Since the the extension hasn’t allowed sending notifications about such groups, and the no-JS experience continues not allowing them, I think it’s clear that these should be treated as errors.
  • Group with priority languages.
    • Group with enforced priority languages. Probably it shouldn’t be allowed to send notifications to non-priority languages (error). This means that when a group with enforced priority languages is selected:
      • All languages should be changed to say All priority languages
      • All languages except should be changed to say All priority languages except and only allow selecting priority languages
      • Only selected languages should only allow selecting priority languages
      • The no-JS experience should at least filter out non-priority languages and reject a request if no language is left, but preferably display a confirmation if any languages were filtered out (but some remain).
      • Consequently, if a group has zero priority languages (T359975), no notifications can be sent about it.
    • Group with non-enforced priority languages. I think it’s enough to warn the user if they are about to send notifications to non-priority languages (including when they use All languages or All languages except). An extra convenience could be an option in the warning to switch to Only selected languages and fill in the field with all priority languages with one click.

I think that summarizes my thoughts well. We should implement T358600: Display priority languages for the translatable page for which notification is being sent first, and then get back to working again on this one.

We've decided to take a simpler approach for now until we implement T358600: Display priority languages for the translatable page for which notification is being sent. When a user selects a discouraged message group, we are displaying an error:

Update notiication message:

The selected translatable page is discouraged. Sending notifications to discouraged pages is not allowed.


image.png (685×1 px, 62 KB)

Instead of the notification on the top right, we've now added an inline error message:


image.png (1×921 px, 40 KB)

Also added some validation to ensure empty values are not selected:


image.png (1×956 px, 46 KB)

Change #1011030 merged by jenkins-bot:

[mediawiki/extensions/TranslationNotifications@master] Special:NotifyTranslators: Use entity selector for selecting message groups

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

Change #1033402 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/TranslationNotifications@master] SpecialNotifyTranslators: Fix group id in dropdown

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

Change #1034610 had a related patch set uploaded (by Abijeet Patro; author: Abijeet Patro):

[mediawiki/extensions/TranslationNotifications@wmf/1.43.0-wmf.6] SpecialNotifyTranslators: Fix group id in dropdown

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

Change #1033402 merged by jenkins-bot:

[mediawiki/extensions/TranslationNotifications@master] SpecialNotifyTranslators: Fix group id in dropdown

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

Change #1034610 merged by jenkins-bot:

[mediawiki/extensions/TranslationNotifications@wmf/1.43.0-wmf.6] SpecialNotifyTranslators: Fix group id in dropdown

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

Mentioned in SAL (#wikimedia-operations) [2024-05-22T07:33:30Z] <kartik@deploy1002> Started scap: Backport for [[gerrit:1034610|SpecialNotifyTranslators: Fix group id in dropdown (T253984)]]

Mentioned in SAL (#wikimedia-operations) [2024-05-22T07:36:13Z] <kartik@deploy1002> abi and kartik: Backport for [[gerrit:1034610|SpecialNotifyTranslators: Fix group id in dropdown (T253984)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-05-22T07:56:10Z] <kartik@deploy1002> Finished scap: Backport for [[gerrit:1034610|SpecialNotifyTranslators: Fix group id in dropdown (T253984)]] (duration: 22m 42s)